- script SearchSystem -1,{
mes "[ Find Monster ]";
mes "Select";
next;
set .@select,select("- Monster","- Item");
if (.@select == 1) {
set .@id,callfunc("Mobidsearch");
if (.@id == 1) {
mes "[ Find Monster ]";
mes "^FF0000Monster Not Found!^000000";
close;
}
} else if (.@select == 2) {
set .@id,callfunc("Itemsearch");
if (.@id == 1) {
mes "[ Find Monster ]";
mes "^FF0000Item Not Found!^000000";
close;
}
set .@id,callfunc("Mobitemsearch",.@id);
if (.@id == 1) {
mes "[ Find Monster ]";
mes "^FF0000Item not found! ID: "+.@id+"^000000";
close;
}
}
set .@id,callfunc("Mobmapsearch",.@id);
if (.@id == 1) {
mes "[ Find Monster ]";
mes "^FF0000Monster not found in map!^000000";
close;
}
end;
OnInit:
waitingroom "Find Monster",0;
end;
}
function script Mobidsearch {
mes "[ Find Monster ]";
mes "Please enter ID or Monster Name";
next;
input .@mobsearch$;
if (mobidsearch[.@mobsearch$] == "null") return 1;
set .@menu$,"";
for(set .@i,0; .@i < getarraysize(@mobidsearch_id); set .@i,.@i+1)
set .@menu$,.@menu$+(@mobidsearch_id[.@i]?"- "+getmonsterinfo(@mobidsearch_id[.@i],0)+" ("+@mobidsearch_id[.@i]+") Lv."+getmonsterinfo(@mobidsearch_id[.@i],1)+":":":");
set .@mobid,select(.@menu$) - 1;
next;
set .@mobid,@mobidsearch_id[.@mobid];
deletearray @mobidsearch_id[0],255;
return .@mobid;
}
function script Itemsearch {
mes "[ Find Monster ]";
mes "Please enter ID or Item Name";
next;
input .@itemsearch$;
if (itemsearchid[.@itemsearch$] == "null") return 1;
set .@menu$,"";
for(set .@i,0; .@i < getarraysize(@itemsearch_id); set .@i,.@i+1)
set .@menu$,.@menu$+(@itemsearch_id[.@i]?"- "+getitemname(@itemsearch_id[.@i])+""+(getiteminfo(@itemsearch_id[.@i],2) == 4 || getiteminfo(@itemsearch_id[.@i],2) == 5?"["+getitemslots(@itemsearch_id[.@i])+"]":"")+" ("+@itemsearch_id[.@i]+"):":":");
set .@id,select(.@menu$) - 1;
set .@id,@itemsearch_id[.@id];
deletearray @itemsearch_id[0],255;
return .@id;
}
function script Mobitemsearch {
set .@id,getarg(0);
if (getitemname(.@id) == "null") return 1;
if (mobitemsearch[.@id]) return 1;
set .@menu$,"";
if (@mobitemsearch_id[0] < 1) {
mes "[ Find Monster ]^FF0000";
if (getiteminfo(.@id,2) == 4 || getiteminfo(.@id,2) == 5)
mes ""+getitemname(.@id)+" ["+getitemslots(.@id)+"]";
else
mes ""+getitemname(.@id)+"";
mes "No drop from monster!^000000";
close;
}
for(set .@i,0; .@i < getarraysize(@mobitemsearch_id); set .@i,.@i+1)
set .@menu$,.@menu$+"- "+getmonsterinfo(@mobitemsearch_id[.@i],0)+" ("+@mobitemsearch_id[.@i]+") ["+@mobitemsearch_per$[.@i]+"]:";
next;
set .@id,select(.@menu$) - 1;
set .@id,@mobitemsearch_id[.@id];
deletearray @mobitemsearch_id[0],255;
deletearray @mobitemsearch_per$[0],255;
return .@id;
}
function script Mobmapsearch {
set .@id,getarg(0);
if (getmonsterinfo(.@id,0) == "null") return 1;
if (mobmapsearch[.@id]) return 1;
if (@mobmapsearch$[0] == "") return 1;
mes "[ Find Monster ]";
mes "Monster : "+getmonsterinfo(.@id,0)+" ["+.@id+"]";
mes "Level : "+getmonsterinfo(.@id,1)+"";
mes "HP : "+getmonsterinfo(.@id,2)+"";
mes "EXP : "+getmonsterinfo(.@id,3)+"";
mes "Job EXP : "+getmonsterinfo(.@id,4)+"";
mes "Attack : "+getmonsterinfo(.@id,5)+"-"+getmonsterinfo(.@id,6)+"";
mes "Def : "+getmonsterinfo(.@id,7)+"";
mes "Mdef : "+getmonsterinfo(.@id,8)+"";
mes "^FF0000No size available^000000";
set .@menu$,"";
for(set .@i,0; .@i < getarraysize(@mobmapsearch$); set .@i,.@i+1)
set .@menu$,.@menu$+"- "+@mobmapsearch$[.@i]+" ["+@mobmapsearchcount[.@i]+"]:";
next;
set .@id,select(.@menu$) - 1;
set .@mobwarp$,@mobmapsearch$[.@id];
deletearray @mobmapsearch$[0],255;
deletearray @mobmapsearchcount[0],255;
dispbottom "Go to: "+.@mobwarp$+"";
warp .@mobwarp$,0,0;
return 0;
}
prontera,150,182,4 duplicate(SearchSystem) [ Find Monster]#1 756