I have this script and can't figure out what the problem is. what it does is count items in the loadmapevent and warping back the player when the items are in the array. I have also tried to add in a cart check, but it always seems to find a brynhild (2383) in my cart? I know it's in the array but it even finds it when my cart is empty..
What did I do wrong? Please help me great scripters.
- script Vanilla1 -1,{
OnPCLoadMapEvent:
getmapxy(.@map$,.@mapx,.@mapy,0);
if(.@map$ == "prtg_cas01"){
for(set .@i,0; .@i < getarraysize(.itemcheck); set .@i, .@i + 1){
if(countitem(.itemcheck[.@i])){
dispbottom "[ Info ] : item ["+getitemname(.itemcheck[.@i])+"] found (Inventory). Kicking..";
warp "prontera",200,180;
end;
}
query_sql("SELECT `nameid` FROM `cart_inventory` WHERE `char_id` = " + getcharid(0), .itemcheck[0]);
dispbottom "[ Info ] : item ["+getitemname(.itemcheck[.@i])+"] found (Cart). Kicking..";
warp "prontera",200,180;
end;
}
}
end;
OnInit:
setarray .itemcheck[0],2383,2204,20025,20026,20027,20028,20029,20030,20031,20032,20033;
end;
}
prtg_cas01 mapflag loadevent
Question
HristDead
Hi
I have this script and can't figure out what the problem is. what it does is count items in the loadmapevent and warping back the player when the items are in the array. I have also tried to add in a cart check, but it always seems to find a brynhild (2383) in my cart? I know it's in the array but it even finds it when my cart is empty..
What did I do wrong? Please help me great scripters.
Edited by HristDeadLink to comment
Share on other sites
10 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.