i just want to enable last warp will be random if you warp on a field or dungeons. and if you last warp for towns or guild warp it will warp you on the default last warp function?
example.
if i use last warp for fields on dungeons.
warp lastwarp$,0,0;
but if i last warp for towns of guild castles.
warp lastwarp$,lastwarpx,lastwarpy;
thanks in advance.
just like this script. it will warp you on a random cell if you last warp for field and dungeons map. but if you warp for towns it will warp you on same cell.
// By [Gm]Xeon.
// Features:
//Warp to fields, dungeons and towns
//Charge fees to warp to fields/dungeons/towns, and can set the fee increase per level for dungeons
//Require the user to have visited the specific place before they can warp there
//Remember the list of recent warps
//Future Ideas: Map warp by map name, saved favorites list
- script Warp Agent#Base::warpra 859,{
mes "[Warper]";
mes "Hello, where can i take you?";
next;
L_Main:
set @recent, 0;
set @temp$, "";
for (set @i, 0; @i < getarraysize($@qw_fullnames$); set @i, @i+1) {
set @temp$, @temp$+((@i>0)?":":"")+$@qw_fullnames$[@i];
}
menu @temp$,-,"Recent",L_Recent,"Exit",L_Exit;
set @type$, $@qw_shortnames$[@menu-1];
goto L_Sel;
L_Recent:
if (!$@qw_recent_list) {
mes "[Warper]";
mes "Recent warps is currently disabled!";
next;
goto L_Main;
}
set @temp$, "";
for (set @i, 0; @i < $@qw_recent_list; set @i, @i+1) {
if (getd("#qw_recent_type_"+@i+"$") != "") set @temp$, @temp$+((@i>0)?":":"")+getd("#qw_recent_type_"+@i+"$")+"->"+getd("$@qw_"+getd("#qw_recent_type_"+@i+"$")+"_names$["+getd("#qw_recent_sel1_"+@i)+"]")+((getd("$@qw_"+getd("#qw_recent_type_"+@i+"$")+"_levels"))?"->"+(getd("#qw_recent_sel2_"+@i)+1):"");
}
menu @temp$,-,"^000000Back",L_Main;
set @type$, getd("#qw_recent_type_"+(@menu-1)+"$");
if (@type$ == "") goto L_Recent;
set @sel1, getd("#qw_recent_sel1_"+(@menu-1));
set @sel2, getd("#qw_recent_sel2_"+(@menu-1));
set @recent, 1;
L_Sel:
if (!getd("$@qw_"+@type$+"_enable")) {
mes "[Warper]";
mes "Sorry, warping to "+@type$+" is currently disabled!";
next;
goto L_Main;
}
L_FirstSel:
if (!@recent) {
set @temp$, "";
for (set @i, 0; @i < getd("$@qw_"+@type$+"_size"); set @i, @i+1) { set @sel1, @i; set @temp$, @temp$+((@i>0)?":":"")+((getd("$@qw_"+@type$+"_levels"))?"":((callsub(S_CheckAccessed,0) || !getd("$@qw_"+@type$+"_quest"))?"^339900":"^FF0000"))+getd("$@qw_"+@type$+"_names$["+@i+"]"); }
menu @temp$,-,"Back",L_Main;
set @sel1, @menu-1;
}
L_SecondSel:
if (getd("$@qw_"+@type$+"_levels")&&!@recent) {
set @temp$, "";
for (set @i, 0; @i < getd("$@qw_"+@type$+"_count["+@sel1+"]"); set @i, @i+1) {
set @temp$, @temp$+((@i>0)?":":"")+((callsub(S_CheckAccessed,@i) || !getd("$@qw_"+@type$+"_quest"))?"^339900":"^FF0000")+getd("$@qw_"+@type$+"_names$["+@sel1+"]")+" "+(@i+1);
}
if (getd("$@qw_"+@type$+"_fee") > 0 || getd("$@qw_"+@type$+"_feelv") > 0) dispbottom "Current fee system: "+getd("$@qw_"+@type$+"_fee")+" initial"+((@type$=="dungeons")?", "+getd("$@qw_"+@type$+"_feelv")+" per floor.":".");
menu @temp$,-,"^000000Back",L_FirstSel;
set @sel2, @menu-1;
}
if (getd("$@qw_"+@type$+"_quest") && !callsub(S_CheckAccessed,@sel2)) { //Quest warp achieved
mes "[Warper]";
mes "You must first have visited this area to be able to warp there!";
next;
if (@recent) goto L_Main;
if (!getd("$@qw_"+@type$+"_levels")) { goto L_FirstSel; } else { goto L_SecondSel; }
}
set @fee, getd("$@qw_"+@type$+"_fee")+((@type$=="dungeons"&&sel2>0)?getd("$@qw_"+@type$+"_feelv")*sel2:0);
if (Zeny < @fee) {
mes "[Warper]";
mes "You don't have enough zeny!";
mes "You need: "+@fee+" zeny!";
next;
if (@recent) goto L_Main;
if (!getd("$@qw_"+@type$+"_levels")) { goto L_FirstSel; } else { goto L_SecondSel; }
}
set @x, 0; set @y, 0;
if (getd("$@qw_"+@type$+"_coords")) {
set @x, getd("$@qw_"+@type$+"_x["+@sel1+"]");
set @y, getd("$@qw_"+@type$+"_y["+@sel1+"]");
}
if (getd("$@qw_"+@type$+"_fee") > 0 || getd("$@qw_"+@type$+"_feelv") > 0) set Zeny, Zeny-@fee;
if (!@recent) {
for (set @i, $@qw_recent_list-1; @i > 0; set @i, @i-1) {
setd("#qw_recent_type_"+@i+"$", getd("#qw_recent_type_"+(@i-1)+"$")); setd("#qw_recent_sel1_"+@i, getd("#qw_recent_sel1_"+(@i-1))); setd("#qw_recent_sel2"+@i, getd("#qw_recent_sel2_"+(@i-1)));
}
set #qw_recent_type_0$, @type$; set #qw_recent_sel1_0, @sel1; set #qw_recent_sel2_0, @sel2;
}
warp getd("$@qw_"+@type$+"_prefix$["+@sel1+"]")+((getd("$@qw_"+@type$+"_mode["+@sel1+"]")<2&&getd("$@qw_"+@type$+"_levels"))?((getd("$@qw_"+@type$+"_count["+@sel1+"]")>9)?((@sel2<9)?"0":""):"")+(@sel2+getd("$@qw_"+@type$+"_mode["+@sel1+"]")):""),@x,@y;
close;
S_CheckAccessed:
return getd("#qw_accessed_"+getd("$@qw_"+@type$+"_prefix$["+@sel1+"]")+((getd("$@qw_"+@type$+"_mode["+@sel1+"]")<2&&getd("$@qw_"+@type$+"_levels"))?((getd("$@qw_"+@type$+"_count["+@sel1+"]")>9)?((getarg(0)<9)?"0":""):"")+(getarg(0)+getd("$@qw_"+@type$+"_mode["+@sel1+"]")):""));
L_Exit:
close;
OnPCLoadMapEvent:
getmapxy(@map$,@ignore,@ignore,0);
setd("#qw_accessed_"+@map$,1);
end;
OnInit:
if (strnpcinfo(2)!="Base") end;
//Note: X mode (map name ending), 0=starts at 0, 1=starts at 1, 2=no ending
//#qw_accessed_MAPNAME is a boolean of whether they visited the specified map...
set $@qw_recent_list, 3;
setarray $@qw_fullnames$[0], "Fields", "Dungeons", "Towns";
setarray $@qw_shortnames$[0], "fields", "dungeons", "towns";
set $@qw_fields_enable, 1;
set $@qw_fields_quest, 0;
set $@qw_fields_fee, 0;
set $@qw_fields_feelv, 0;
setarray $@qw_fields_names$[0], "Aldebaran", "Amatsu", "Ayoyatha", "Comodo", "Einbroch", "Geffen", "Gonryun", "Hugel", "Jawaii", "Lighthalzen", "Louyang", "Morocc", "Nameless Island", "Niflheim", "Odin Temple", "Payon", "Prontera", "Rachel", "Umbala", "Veins", "Yuno";
setarray $@qw_fields_prefix$[0], "mjolnir_", "ama_fild01", "ayo_fild0", "cmd_fild0", "ein_fild", "gef_fild", "gon_fild01", "hu_fild0", "jawaii", "lhz_fild0", "lou_fild01", "moc_fild", "nameless_n", "nif_fild0", "odin_tem0", "pay_fild", "prt_fild", "ra_fild", "um_fild0", "ve_fild0", "yuno_fild";
setarray $@qw_fields_count[0], 12, 1, 2, 9, 10, 14, 1, 7, 1, 3, 1, 22, 1, 2, 3, 11, 11, 13, 4, 7, 12; //Check if > 10, if so then add 0 in front of map end if < 9
setarray $@qw_fields_mode[0], 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1;
set $@qw_fields_size, getarraysize($@qw_fields_names$);
set $@qw_fields_coords, 0;
set $@qw_fields_levels, 1;
// (Cut out beach dungeon, glast heim and Dimensional Gorge)
set $@qw_dungeons_enable, 1;
set $@qw_dungeons_quest, 0;
set $@qw_dungeons_fee, 0;
set $@qw_dungeons_feelv, 0;
setarray $@qw_dungeons_names$[0], "Abbey, Cursed Monastery", "Abyss Lakes", "Amatsu Lakes", "Anthell", "Ayoyatha Dungeons", "Byalan Dungeon", "Clock Tower", "Coal Mines", "Culverts", "Einbroch Dungeons", "Gefenia", "Geffen Dungeon", "Gonryun Dungeon", "Hidden Dungeon", "Ice Dungeon", "Juperos Dungeon", "Juperos Core", "Kiel Dungeon", "Lighthalzen", "Louyang Dungeons", "Magma Dungeon", "Orc Dungeon", "Payon Dungeon", "Pyramids", "Rachel Sanctuary", "Sphinx", "Sunken Ship", "Thanatos Tower", "Thor Volcano", "Toy Factory", "Turtle Dungeon", "Umbala Dungeon", "Moscovia Dungeon";
setarray $@qw_dungeons_prefix$[0], "abbey0", "abyss_0", "ama_dun0", "anthell0", "ayo_dun0", "iz_dun0", "c_tower", "mjo_dun0", "prt_sewb", "ein_dun0", "gefenia0", "gef_dun0", "gon_dun0", "prt_maze0", "ice_dun0", "juperos_0", "jupe_core", "kh_dun0", "lhz_dun0", "lou_dun0", "mag_dun0", "orcsdun0", "pay_dun0", "moc_pryd0", "ra_san0", "in_sphinx", "treasure0", "tha_t", "thor_v0", "xmas_dun0", "tur_dun0", "um_dun0", "mosk_dun0";
setarray $@qw_dungeons_count[0], 3, 3, 3, 2, 2, 5, 4, 3, 4, 2, 4, 4, 3, 3, 4, 2, 1, 2, 3, 3, 2, 2, 5, 6, 5, 5, 2, 12, 3, 2, 4, 2, 3;
setarray $@qw_dungeons_mode[0], 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1;
set $@qw_dungeons_size, getarraysize($@qw_dungeons_names$);
set $@qw_dungeons_coords, 0;
set $@qw_dungeons_levels, 1;
set $@qw_towns_enable, 1;
set $@qw_towns_quest, 0;
set $@qw_towns_fee, 0;
set $@qw_towns_feelv, 0;
setarray $@qw_towns_names$[0], "Alberta", "Aldebaran", "Amatsu", "Ayothaya", "Comodo", "Einbroch", "Einbech", "Geffen", "Gonryun", "Hugel", "Izlude", "Lighthalzen", "Louyang", "Morocc", "Prontera", "Payon", "Umbala", "Lutie", "Yuno";
setarray $@qw_towns_prefix$[0], "alberta", "aldebaran", "amatsu", "ayothaya", "comodo", "einbroch", "einbech", "geffen", "gonryun", "hugel", "izlude", "lighthalzen", "louyang", "morocc", "prontera", "payon", "umbala", "xmas", "yuno";
setarray $@qw_towns_x[0], 27, 145, 197, 149, 188, 64, 70, 119, 150, 96, 128, 158, 210, 159, 156, 152, 130, 148, 160;
setarray $@qw_towns_y[0], 236, 120, 86, 118, 161, 200, 95, 66, 130, 145, 111, 92, 108, 93, 191, 75, 130, 131, 168;
set $@qw_towns_size, getarraysize($@qw_towns_names$);
set $@qw_towns_coords, 1;
set $@qw_towns_levels, 0;
for (set .@i, 0; .@i < getarraysize($@qw_shortnames$); set .@i, .@i+1) {
for (set .@n, 0; .@n < getd("$@qw_"+$@qw_shortnames$[.@i]+"_size") && getd("$@qw_"+$@qw_shortnames$[.@i]+"_quest"); set .@n, .@n+1) {
for (set .@v, 0; .@v < ((!getd("$@qw_"+$@qw_shortnames$[.@i]+"_levels"))?1:getd("$@qw_"+$@qw_shortnames$[.@i]+"_count["+.@n+"]")); set .@v, .@v+1) {
debugmes .@i;
setmapflag getd("$@qw_"+$@qw_shortnames$[.@i]+"_prefix$["+.@n+"]")+((getd("$@qw_"+$@qw_shortnames$[.@i]+"_mode["+.@n+"]")<2&&getd("$@qw_"+$@qw_shortnames$[.@i]+"_levels"))?((getd("$@qw_"+$@qw_shortnames$[.@i]+"_count["+.@n+"]")>9)?((.@v<9)?"0":""):"")+(.@v+getd("$@qw_"+$@qw_shortnames$[.@i]+"_mode["+.@n+"]")):""), mf_loadevent;
}
}
}
end;
}
alberta,31,240,4 duplicate(warpra) Warp Agent#01 859
aldebaran,145,118,4 duplicate(warpra) Warp Agent#02 859
amatsu,192,81,1 duplicate(warpra) Warp Agent#03 859
ayothaya,144,117,6 duplicate(warpra) Warp Agent#04 859
comodo,194,158,4 duplicate(warpra) Warp Agent#05 859
einbroch,59,205,4 duplicate(warpra) Warp Agent#06 859
einbroch,243,189,2 duplicate(warpra) Warp Agent#07 859
einbech,135,249,4 duplicate(warpra) Warp Agent#08 859
geffen,115,66,4 duplicate(warpra) Warp Agent#9 859
gonryun,151,130,4 duplicate(warpra) Warp Agent#10 859
izlude,133,117,4 duplicate(warpra) Warp Agent#11 859
hugel,88,151,5 duplicate(warpra) Warp Agent#12 859
lighthalzen,155,79,6 duplicate(warpra) Warp Agent#13 859
louyang,210,106,4 duplicate(warpra) Warp Agent#14 859
morocc,156,95,4 duplicate(warpra) Warp Agent#15 859
prontera,161,192,4 duplicate(warpra) Warp Agent#16 859
payon,182,110,4 duplicate(warpra) Warp Agent#17 859
umbala,132,130,4 duplicate(warpra) Warp Agent#18 859
xmas,150,136,4 duplicate(warpra) Warp Agent#19 859
yuno,137,162,4 duplicate(warpra) Warp Agent#20 859
ama_dun01,233,9,1 duplicate(warpra) Warp Agent#21 859
moc_fild04,207,331,4 duplicate(warpra) Warp Agent#22 859
ayo_fild02,279,154,4 duplicate(warpra) Warp Agent#23 859
izlu2dun,104,82,4 duplicate(warpra) Warp Agent#24 859
prt_sewb1,125,253,4 duplicate(warpra) Warp Agent#25 859
mjolnir_02,85,363,4 duplicate(warpra) Warp Agent#26 859
einbech,81,101,1 duplicate(warpra) Warp Agent#27 859
glast_01,370,308,4 duplicate(warpra) Warp Agent#28 859
yuno_fild03,37,135,4 duplicate(warpra) Warp Agent#29 859
niflheim,32,161,4 duplicate(warpra) Warp Agent#30 859
gef_fild10,71,339,4 duplicate(warpra) Warp Agent#31 859
pay_arche,39,135,4 duplicate(warpra) Warp Agent#32 859
moc_ruins,64,166,4 duplicate(warpra) Warp Agent#33 859
moc_fild19,106,97,4 duplicate(warpra) Warp Agent#34 859
alb2trea,73,101,4 duplicate(warpra) Warp Agent#35 859
tur_dun01,148,239,4 duplicate(warpra) Warp Agent#36 859
lhz_dun01,157,285,4 duplicate(warpra) Warp Agent#37 859
hu_fild05,186,210,4 duplicate(warpra) Warp Agent#38 859
yuno_fild07,221,179,4 duplicate(warpra) Warp Agent#39 859
tha_scene01,139,194,1 duplicate(warpra) Warp Agent#40 859
odin_tem01,96,149,4 duplicate(warpra) Warp Agent#41 859
Question
Brynner
i just want to enable last warp will be random if you warp on a field or dungeons. and if you last warp for towns or guild warp it will warp you on the default last warp function?
example.
if i use last warp for fields on dungeons.
warp lastwarp$,0,0;
but if i last warp for towns of guild castles.
warp lastwarp$,lastwarpx,lastwarpy;
thanks in advance.
just like this script. it will warp you on a random cell if you last warp for field and dungeons map. but if you warp for towns it will warp you on same cell.
Link to comment
Share on other sites
6 answers 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.