From 338d92d4485818eec6975f85de6872cf89ed1611 Mon Sep 17 00:00:00 2001 From: Evil Puncker Date: Sat, 16 May 2015 08:50:57 -0300 Subject: updated warper --- npc/custom/warper.txt | 303 +++++++++++++++++++++++++++----------------------- 1 file changed, 163 insertions(+), 140 deletions(-) (limited to 'npc/custom') diff --git a/npc/custom/warper.txt b/npc/custom/warper.txt index 4e85119dd..0f28ef40b 100644 --- a/npc/custom/warper.txt +++ b/npc/custom/warper.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.4 +//= 1.4b //===== Description: ========================================= //= A complete - but very condensed - warper script. //= Some coordinates written by Tekno-Kanix and ToastOfDoom. @@ -14,6 +14,8 @@ //= 1.3 Added Renewal checks and Instances menu. //= Aligned coordinates with @go. //= 1.4 Added new Guild Dungeons. +//= 1.4a Slight edits. +//= 1.4b Added Wolfchev's Laboratory warp. //============================================================ - script Warper -1,{ @@ -24,15 +26,19 @@ function Go; function Disp; function Pick; function Restrict; // -------------------------------------------------- menu "Last Warp ^777777["+lastwarp$+"]^000000",-, - " ~ Towns",Towns, " ~ Fields",Fields, " ~ Dungeons",Dungeons, - " ~ Guild Castles",Castles, " ~ Guild Dungeons",Guild_Dungeons, - " ~ Instances",Instances, " ~ Special Areas",Special; + " ~ Towns",Towns, + " ~ Fields",Fields, + " ~ Dungeons",Dungeons, + " ~ Guild Castles",Castles, + " ~ Guild Dungeons",Guild_Dungeons, + " ~ Instances",Instances, + " ~ Special Areas",Special; if (lastwarp$ == "") message strcharinfo(0),"You haven't warped anywhere yet."; else warp lastwarp$,lastwarpx,lastwarpy; - close; + end; // ------------------- Functions ------------------- // * Go("",,); @@ -58,50 +64,51 @@ menu "Last Warp ^777777["+lastwarp$+"]^000000",-, // -------------------------------------------------- function Go { + lastwarp$ = getarg(0); + lastwarpx = getarg(1,0); + lastwarpy = getarg(2,0); warp getarg(0),getarg(1,0),getarg(2,0); - getmapxy(lastwarp$,lastwarpx,lastwarpy,0); end; } function Disp { if (getargcount() < 3) - set @menu$, getarg(0); + @menu$ = getarg(0); else { - set @menu$,""; - for(set .@i,getarg(1); .@i<=getarg(2); set .@i,.@i+1) - set @menu$, @menu$+getarg(0)+" "+.@i+":"; + @menu$ = ""; + for (.@i = getarg(1); .@i <= getarg(2); .@i++) + @menu$ = @menu$+getarg(0)+" "+.@i+":"; } return; } function Pick { - set .@warp_block,@warp_block; - set @warp_block,0; + .@warp_block = @warp_block; + @warp_block = 0; + .@select = select(@menu$); if (getarg(0) == "") { - set .@select, select(@menu$); - set .@i, .@select; - set .@map$, getarg(.@i); + .@i = .@select; + .@map$ = getarg(.@i); } else { - set .@select, select(@menu$); - set .@i, .@select-getarg(1,0); - set .@map$, getarg(0)+((.@i<10)?"0":"")+.@i; + .@i = .@select-getarg(1,0); + .@map$ = getarg(0)+((.@i<10)?"0":"")+.@i; } if (.@warp_block & (1<<.@select)) { message strcharinfo(0),"This map is not enabled in "+(RENEWAL?"":"Pre-")+"Renewal."; - close; + end; } - warp .@map$,@c[.@i*2],@c[.@i*2+1]; - getmapxy(lastwarp$,lastwarpx,lastwarpy,0); + .@x = @c[.@i*2]; + .@y = @c[.@i*2+1]; deletearray @c[0],getarraysize(@c); - end; + Go(.@map$,.@x,.@y); } function Restrict { if ((getarg(0) == "RE" && !RENEWAL) || (getarg(0) == "Pre-RE" && RENEWAL)) { if (getarg(1,0)) { - set @warp_block,0; - for(set .@i,1; .@i