Hello, good afternoon, someone could help me in this script ?
good, I caught a CP IN Game and added an option to reset position of character, but when the menu appears for selection of characters something is wrong, when I select the first character it returns me the second and when I select the last in the list it returns me null, ie my repetition structure is in the index with a value more...
I do not know how to solve this , someone could give me some tips please ?
Ps: My english is bad but i understand with help of translater.
Ps²: I'm sorry if I was not clear in the words, I am willing to provide any iformação in the code for better understanding
query_sql "SELECT `name` FROM `char` WHERE `account_id` = '"+getcharid(3)+"'",@chars$;
case 3:
next;
mes .cp$;
mes "Selecione qual personagem você deseja resetar posição";
next;
switch(select("Escolher Personagem")) {
case 1:
for (.@i = 1; .@i < getarraysize(@chars$); .@i++) { //Here I ride the menu
.@menu$ = .@menu$ +" "+ @chars$[.@i];
.@menu$ = .@menu$ + ":";
}
.@escolha = select(.@menu$);
.@char$ = @chars$[.@escolha];
break;
}
mes .cp$;
mes "Deseja resetar a posição do personagem ^0000ff"+.@char$+"^000000?"; //Here I see that the return value is 1 more
next;
if (select("- ^0000ffSim^000000:- Não") == 2)
close;
query_sql "UPDATE `char` SET `last_map` = 'prontera', `last_x` = 50, `last_y` = 50 WHERE `name` = '"+.@char$+"'";
mes .cp$;
mes "Posição resetada !";
close;
Hello, good afternoon, someone could help me in this script ?
good, I caught a CP IN Game and added an option to reset position of character, but when the menu appears for selection of characters something is wrong, when I select the first character it returns me the second and when I select the last in the list it returns me null, ie my repetition structure is in the index with a value more...
I do not know how to solve this , someone could give me some tips please ?
Ps: My english is bad but i understand with help of translater.
Ps²: I'm sorry if I was not clear in the words, I am willing to provide any iformação in the code for better understanding
query_sql "SELECT `name` FROM `char` WHERE `account_id` = '"+getcharid(3)+"'",@chars$; case 3: next; mes .cp$; mes "Selecione qual personagem você deseja resetar posição"; next; switch(select("Escolher Personagem")) { case 1: for (.@i = 1; .@i < getarraysize(@chars$); .@i++) { //Here I ride the menu .@menu$ = .@menu$ +" "+ @chars$[.@i]; .@menu$ = .@menu$ + ":"; } .@escolha = select(.@menu$); .@char$ = @chars$[.@escolha]; break; } mes .cp$; mes "Deseja resetar a posição do personagem ^0000ff"+.@char$+"^000000?"; //Here I see that the return value is 1 more next; if (select("- ^0000ffSim^000000:- Não") == 2) close; query_sql "UPDATE `char` SET `last_map` = 'prontera', `last_x` = 50, `last_y` = 50 WHERE `name` = '"+.@char$+"'"; mes .cp$; mes "Posição resetada !"; close;Edited by TsuuuShare this post
Link to post
Share on other sites