Nerks Posted September 14, 2017 Posted September 14, 2017 Hi to all, Guys can you help me give me some example of script that the live npc detect if the player holding some specific item.... How the NPC detect the specific item on the specific MAP. Thank you for your help in advance. God Bless Quote
0 crazyarashi Posted September 14, 2017 Posted September 14, 2017 (edited) - script ItemCheck -1,{ OnPCLoadMapEvent: getmapxy(.@map$,.@mapx,.@mapy,0); if(.@map$!="prt_fild01") end; if(countitem(501) > 0){ //501 change to your item number warp "prontera",156,191; //warp to map when you have the item end; } } prt_fild01 mapflag loadevent Edited September 14, 2017 by crazyarashi Quote
0 Nerks Posted September 14, 2017 Author Posted September 14, 2017 It seems it load on first land on the map? it can check if i drop the item and i pick again and i drop again? ex. i pick candy = true then <condition> i drop candy = true then <condition> i pick again candy = true then <condition> i drop again candy = true then <condition> Quote
0 crazyarashi Posted September 14, 2017 Posted September 14, 2017 - script ItemCheck -1,{ OnPCLoadMapEvent: getmapxy(.@map$,.@mapx,.@mapy,0); if(.@map$!="prt_fild01") end; if(strcharinfo(3) == .@map$){ if(countitem(.item)){ mes "You have "+getitemname(.item)+" in your inventory."; next; mes "This is not allowed in this map"; warp "prontera",255,55; } else { addtimer(1000 * .time), ("ItemCheck")+"::OnPCLoadMapEvent"; } } OnInit: .item = 12345; .time = 3; end; } prt_fild01 mapflag loadevent 1 Quote
0 Nerks Posted September 15, 2017 Author Posted September 15, 2017 13 hours ago, crazyarashi said: - script ItemCheck -1,{ OnPCLoadMapEvent: getmapxy(.@map$,.@mapx,.@mapy,0); if(.@map$!="prt_fild01") end; if(strcharinfo(3) == .@map$){ if(countitem(.item)){ mes "You have "+getitemname(.item)+" in your inventory."; next; mes "This is not allowed in this map"; warp "prontera",255,55; } else { addtimer(1000 * .time), ("ItemCheck")+"::OnPCLoadMapEvent"; } } OnInit: .item = 12345; .time = 3; end; } prt_fild01 mapflag loadevent Thanks i'll try this one later Quote
Question
Nerks
Hi to all,
Guys can you help me give me some example of script that the live npc detect if the player holding some specific item....
How the NPC detect the specific item on the specific MAP.
Thank you for your help in advance.
God Bless
4 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.