Nerks Posted September 14, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 07/29/17 Last Seen: December 5, 2017 Share 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 Link to comment Share on other sites More sharing options...
0 crazyarashi Posted September 14, 2017 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 20 hours ago Share 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 Link to comment Share on other sites More sharing options...
0 Nerks Posted September 14, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 07/29/17 Last Seen: December 5, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
0 crazyarashi Posted September 14, 2017 Group: Developer Topic Count: 50 Topics Per Day: 0.02 Content Count: 776 Reputation: 239 Joined: 02/11/17 Last Seen: 20 hours ago Share 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 Link to comment Share on other sites More sharing options...
0 Nerks Posted September 15, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 07/29/17 Last Seen: December 5, 2017 Author Share 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 Link to comment Share on other sites More sharing options...
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
Link to comment
Share on other sites
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.