Hello, can anyone help me with adding a new option in Warper NPC. I would like to add input box in the Warper NPC where people can simply add the name of the map they would like to warp to. This is similar to @warp command but I love to have an option for warper too with the restrictions of warper to ofc.
I actually found a nearly the same script from @AnnieRuru but its a hassle and tiring to code all the maps manually. I will attach the code below.
prontera,155,186,5 script TestWarp 100,{
setarray .@map$, "prontera", "morocc", "alberta", "aldebaran", "izlude";
setarray .@x, 156, 156, 192, 140, 128;
setarray .@y, 191, 93, 147, 143, 146;
set .@arraysize, getarraysize(.@map$);
mes "[Warp Agent]";
mes "Type the map name you'd like to warp to for example pay_fild02, thor_v03^0000FF";
for ( .@i = 0; .@i < .@arraysize; .@i++ )
mes ( .@i +1 )+". "+ .@map$[.@i];
next;
input .@warp$;
.@i = 0;
while ( .@warp$ != .@map$[.@i] && .@i < .@arraysize ) .@i++;
if ( .@i == .@arraysize ) {
mes "[Warp Agent]";
mes "Invalid Map";
close;
}
mes "[Test Warper]";
mes "You are now warping to "+ .@map$[.@i] +" town";
close2;
warp .@map$[.@i], .@x[.@i], .@y[.@i];
end;
}
Now the attached photo below is an illustration of what I'd like to have on warper.
Question
ItsRas
Hello, can anyone help me with adding a new option in Warper NPC. I would like to add input box in the Warper NPC where people can simply add the name of the map they would like to warp to. This is similar to @warp command but I love to have an option for warper too with the restrictions of warper to ofc.
I actually found a nearly the same script from @AnnieRuru but its a hassle and tiring to code all the maps manually. I will attach the code below.
prontera,155,186,5 script TestWarp 100,{ setarray .@map$, "prontera", "morocc", "alberta", "aldebaran", "izlude"; setarray .@x, 156, 156, 192, 140, 128; setarray .@y, 191, 93, 147, 143, 146; set .@arraysize, getarraysize(.@map$); mes "[Warp Agent]"; mes "Type the map name you'd like to warp to for example pay_fild02, thor_v03^0000FF"; for ( .@i = 0; .@i < .@arraysize; .@i++ ) mes ( .@i +1 )+". "+ .@map$[.@i]; next; input .@warp$; .@i = 0; while ( .@warp$ != .@map$[.@i] && .@i < .@arraysize ) .@i++; if ( .@i == .@arraysize ) { mes "[Warp Agent]"; mes "Invalid Map"; close; } mes "[Test Warper]"; mes "You are now warping to "+ .@map$[.@i] +" town"; close2; warp .@map$[.@i], .@x[.@i], .@y[.@i]; end; }
Now the attached photo below is an illustration of what I'd like to have on warper.
Hope you guys could help me. Thanks in advance.
Link to comment
Share on other sites
1 answer to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.