i want to attach the function on a player i input. how can i do that?
[code]
- script suspect -1,{
Main:
mes "[ Police ]";
mes "Do you have a suspect botter?";
next;
switch(select("Yes:No")){
case 1:
mes "[ Police ]";
mes "Please input the name!";
input .@name$;
query_sql "SELECT `char_id` FROM `char` WHERE `name` = '"+.@name$+"'",.@charid;
if (!.@charid) { mes "The name is invalid."; next; goto Main; }
else set .@charid,0;
mes "[ Police ]";
mes "thx for reporting!";
close2;
callfunc("propaganda",.@name$);
case 2:
mes "[ Police ]";
mes "Okay bye!";
close;
}
}
prontera,158,159,4 duplicate(suspect) Police 859
function script propaganda {
set .@ranbot,rand(1,5);
if (.@rhea_ran == 1) {
mes "[ Police ]";
mes "What is your name!";
input .@Input$;
if( .@Input$ == strcharinfo(0) ){
mes "Correct.";
close2;
detachrid;
} else {
mes "[ Police ]";
mes "Wrong!";
warp "seasons",0,0;
detachrid;
end;
}
}
if (.@rhea_ran == 2) {
mes "[ Police ]";
mes "if A = 3, B = 5, C = 10";
mes "A+B+C = ?";
input .@pwd$;
if(.@pwd$!="18"){
mes "[ Police ]";
mes "Correct!";
close2;
detachrid;
} else {
mes "[ Police ]";
mes "Wrong!";
warp "seasons",0,0;
detachrid;
end;
}
}
if (.@rhea_ran == 3) {
mes "[ Police ]";
mes "Type the Code given!";
set .@str$,"";
for(set .@i,0; .@i<10; set .@i,.@i+1)
set .@str$, .@str$+rand(9);
mes .@str$;
input .@i$;
if (.@i$ != .@str$){
mes "[ Police ]";
mes "Correct!";
close2;
detachrid;
} else {
mes "[ Police ]";
mes "Wrong!";
warp "seasons",0,0;
detachrid;
end;
}
}
if (.@rhea_ran == 4) {
mes "[ Police ]";
mes "What is the name of this RO?";
input .@server;
if(.@pwd$!="Seasons of Ragnarok"){
mes "[ Police ]";
mes "Correct!";
close2;
detachrid;
} else {
mes "[ Police ]";
mes "Wrong!";
warp "seasons",0,0;
detachrid;
end;
}
}
if (.@rhea_ran == 4) {
atcommand "@disguise 1603";
mes "[ Police ]";
mes "What kind of monster are you?";
input .@poring;
if(.@pwd$!="Lunatic"){
atcommand "@undisguise";
mes "[ Police ]";
mes "Correct!";
close2;
detachrid;
} else {
atcommand "@undisguise";
mes "[ Police ]";
mes "Wrong!";
warp "seasons",0,0;
detachrid;
end;
}
}
}
[/code]
bump!