Hello everyone, I would like to have the option in the tabs of my npc of: "Back", so if anyone who is looking for the map and ends up clicking wrong, can go back to the previous menu. but I've done everything, and it turns out that I couldn't solve it
I have a main menu, which has " Cities, Fields, Caves "
This one does not need to have a back button, as it is the main menu.
The next menu is, let's say: Fields > Prontera Field, Payon Field... etc, Back (As a last option)
Here, I believe it is easier, because I use this code:
menu "^3CB371[»]^000000 Campos de Amatsu.",F1, "^3CB371[»]^000000 Campos de Ayothaya",F2, "^3CB371[»]^000000 Campos de Bifrost", F3,
"^3CB371[»]^000000 Campos de Brasilis",F4, "^3CB371[»]^000000 Campos de Comodo",F5, "^3CB371[»]^000000 Campos de Dewata",F6,
"^3CB371[»]^000000 Campos de Eclage",F7, "^3CB371[»]^000000 Campos de Einbroch",F8, "^3CB371[»]^000000 Campos de El Dicastes",F9,
"^3CB371[»]^000000 Campos de Geffen",F10, "^3CB371[»]^000000 Campos de Kunlun",F11, "^3CB371[»]^000000 Campos de Hugel",F12,
"^3CB371[»]^000000 Campos de Lasagna",F13, "^3CB371[»]^000000 Campos de Lighthalzen",F14, "^3CB371[»]^000000 Campos de Luoyang",F15,
"^3CB371[»]^000000 Campos de Lutie",F16, "^3CB371[»]^000000 Campos de Malaya",F17, "^3CB371[»]^000000 Campos de Manuk",F18,
"^3CB371[»]^000000 Campos de Mjolnir",F19, "^3CB371[»]^000000 Campos de Moscovia",F20, "^3CB371[»]^000000 Campos de Niflheim",F21,
"^3CB371[»]^000000 Floresta de Payon",F22, "^3CB371[»]^000000 Campos de Prontera",F23, "^3CB371[»]^000000 Campos de Rachel",F24,
"^3CB371[»]^000000 Deserto de Sograt",F25, "^3CB371[»]^000000 Campos de Splendide",F26, "^3CB371[»]^000000 Campos de Umbala",F27,
"^3CB371[»]^000000 Campos de Veins",F28, "^3CB371[»]^000000 Campos de Juno",F29;
F1: setarray @c[2],190,197;
Disp("^3CB371[»]^000000 Campos de Amatsu",1,1); Pick("ama_fild");
F2: setarray @c[2],173,134,212,150;
Disp("^3CB371[»]^000000 Campos de Ayothaya",1,2); Pick("ayo_fild");
Here, I believe that the Menu, manages to have a ''Back'' button Easily...
But here comes the hard part!
F1: setarray @c[2],190,197;
Disp("^3CB371[»]^000000 Campos de Amatsu",1,1); Pick("ama_fild");
Here, in the "Pick" segment, it makes him create a new menu with the selection ama_fild01,ama_fild02 and here, in this part I would also like him to go back to the "Fields" menu... I will post the Functions of this system and if there is any way to Add "Back" in the Fields menu and in the End menu
function Go {
set lastwarp$, getarg(0);
set lastwarpx, getarg(1,0);
set lastwarpy, getarg(2,0);
warp getarg(0),getarg(1,0),getarg(2,0);
end;
}
function Disp {
if (getargcount() < 3)
set @menu$, getarg(0);
else {
set @menu$,"";
for (set .@i,getarg(1); .@i<=getarg(2); set .@i,.@i+1)
set @menu$, @menu$+getarg(0)+" "+.@i+":";
}
return;
}
function Pick {
set .@warp_block,@warp_block;
set @warp_block,0;
if((@f && .OnlyFirstFld) || (@d && .OnlyFirstDun)){
set .@select,1;
if(.@warp_block){
while(.@warp_block & (1<<.@select)){
.@select += 1;
}
}
}else{
set .@select, select(@menu$);
}
if (getarg(0) == "") {
set .@i, .@select;
set .@map$, getarg(.@i);
} else {
set .@i, .@select-getarg(1,0);
set .@map$, getarg(0)+((.@i<10)?"0":"")+.@i;
}
if (.@warp_block & (1<<.@select)) {
message strcharinfo(0),"Este mapa não está habilitado no modo "+((checkre(0))?"":"Pre-")+"Renewal.";
end;
}
set .@x, @c[.@i*2];
set .@y, @c[.@i*2+1];
deletearray @c[0],getarraysize(@c);
@f = false; @d = false;
Go(.@map$,.@x,.@y);
}
function Restrict {
if ((getarg(0) == "RE" && !checkre(0)) || (getarg(0) == "Pre-RE" && checkre(0))) {
if (getarg(1,0)) {
set @warp_block,0;
for (set .@i,1; .@i<getargcount(); set .@i,.@i+1)
set @warp_block, @warp_block | (1<<getarg(.@i));
} else {
message strcharinfo(0),"Este mapa não está habilitado no modo "+((checkre(0))?"":"Pre-")+"Renewal.";
end;
}
}
return;
}
function Ret {
}
Question
unnamed
Hello everyone, I would like to have the option in the tabs of my npc of: "Back", so if anyone who is looking for the map and ends up clicking wrong, can go back to the previous menu. but I've done everything, and it turns out that I couldn't solve it
I have a main menu, which has " Cities, Fields, Caves "
This one does not need to have a back button, as it is the main menu.
The next menu is, let's say: Fields > Prontera Field, Payon Field... etc, Back (As a last option)
Here, I believe it is easier, because I use this code:
menu "^3CB371[»]^000000 Campos de Amatsu.",F1, "^3CB371[»]^000000 Campos de Ayothaya",F2, "^3CB371[»]^000000 Campos de Bifrost", F3, "^3CB371[»]^000000 Campos de Brasilis",F4, "^3CB371[»]^000000 Campos de Comodo",F5, "^3CB371[»]^000000 Campos de Dewata",F6, "^3CB371[»]^000000 Campos de Eclage",F7, "^3CB371[»]^000000 Campos de Einbroch",F8, "^3CB371[»]^000000 Campos de El Dicastes",F9, "^3CB371[»]^000000 Campos de Geffen",F10, "^3CB371[»]^000000 Campos de Kunlun",F11, "^3CB371[»]^000000 Campos de Hugel",F12, "^3CB371[»]^000000 Campos de Lasagna",F13, "^3CB371[»]^000000 Campos de Lighthalzen",F14, "^3CB371[»]^000000 Campos de Luoyang",F15, "^3CB371[»]^000000 Campos de Lutie",F16, "^3CB371[»]^000000 Campos de Malaya",F17, "^3CB371[»]^000000 Campos de Manuk",F18, "^3CB371[»]^000000 Campos de Mjolnir",F19, "^3CB371[»]^000000 Campos de Moscovia",F20, "^3CB371[»]^000000 Campos de Niflheim",F21, "^3CB371[»]^000000 Floresta de Payon",F22, "^3CB371[»]^000000 Campos de Prontera",F23, "^3CB371[»]^000000 Campos de Rachel",F24, "^3CB371[»]^000000 Deserto de Sograt",F25, "^3CB371[»]^000000 Campos de Splendide",F26, "^3CB371[»]^000000 Campos de Umbala",F27, "^3CB371[»]^000000 Campos de Veins",F28, "^3CB371[»]^000000 Campos de Juno",F29; F1: setarray @c[2],190,197; Disp("^3CB371[»]^000000 Campos de Amatsu",1,1); Pick("ama_fild"); F2: setarray @c[2],173,134,212,150; Disp("^3CB371[»]^000000 Campos de Ayothaya",1,2); Pick("ayo_fild");
Here, I believe that the Menu, manages to have a ''Back'' button Easily...
But here comes the hard part!
F1: setarray @c[2],190,197; Disp("^3CB371[»]^000000 Campos de Amatsu",1,1); Pick("ama_fild");
Here, in the "Pick" segment, it makes him create a new menu with the selection ama_fild01,ama_fild02 and here, in this part I would also like him to go back to the "Fields" menu... I will post the Functions of this system and if there is any way to Add "Back" in the Fields menu and in the End menu
function Go { set lastwarp$, getarg(0); set lastwarpx, getarg(1,0); set lastwarpy, getarg(2,0); warp getarg(0),getarg(1,0),getarg(2,0); end; } function Disp { if (getargcount() < 3) set @menu$, getarg(0); else { set @menu$,""; for (set .@i,getarg(1); .@i<=getarg(2); set .@i,.@i+1) set @menu$, @menu$+getarg(0)+" "+.@i+":"; } return; } function Pick { set .@warp_block,@warp_block; set @warp_block,0; if((@f && .OnlyFirstFld) || (@d && .OnlyFirstDun)){ set .@select,1; if(.@warp_block){ while(.@warp_block & (1<<.@select)){ .@select += 1; } } }else{ set .@select, select(@menu$); } if (getarg(0) == "") { set .@i, .@select; set .@map$, getarg(.@i); } else { set .@i, .@select-getarg(1,0); set .@map$, getarg(0)+((.@i<10)?"0":"")+.@i; } if (.@warp_block & (1<<.@select)) { message strcharinfo(0),"Este mapa não está habilitado no modo "+((checkre(0))?"":"Pre-")+"Renewal."; end; } set .@x, @c[.@i*2]; set .@y, @c[.@i*2+1]; deletearray @c[0],getarraysize(@c); @f = false; @d = false; Go(.@map$,.@x,.@y); } function Restrict { if ((getarg(0) == "RE" && !checkre(0)) || (getarg(0) == "Pre-RE" && checkre(0))) { if (getarg(1,0)) { set @warp_block,0; for (set .@i,1; .@i<getargcount(); set .@i,.@i+1) set @warp_block, @warp_block | (1<<getarg(.@i)); } else { message strcharinfo(0),"Este mapa não está habilitado no modo "+((checkre(0))?"":"Pre-")+"Renewal."; end; } } return; } function Ret { }
Link to comment
Share on other sites
8 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.