EL Dragon Posted February 20, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Share Posted February 20, 2014 how do I make a OnNPCKillEvent with if (killedrid !=MOB ID){ setarray .items[0],501,502,503,504,506,507,508 set .items, .items[rand(getarraysize(.items))]; getitem .@item_id,1; or ? makeitem .@item_id,1; and random item drop to 0,50% hope I can help someone, sorry for my bad english Quote Link to comment Share on other sites More sharing options...
sandbox Posted February 20, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted February 20, 2014 (edited) OnNPCKillEvent: if (killedrid != MOB ID){ setarray .items1[0],501,502,503,504,506,507,508; set .items, .items1[rand(getarraysize(.items1))]; getitem .items,1; set .@randitem,rand(1); if(.@randitem == 0) getitem 1234,1; //Change to what random item do you want to give end; Edited February 20, 2014 by sandbox Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted February 20, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Author Share Posted February 20, 2014 - script DropExtraTreasure -1,{ OnNPCKillEvent: if (killedrid != 1902){ setarray .items1[0],501,502,503,504,506,507,508; set .items, .items1[rand(getarraysize(.items1))]; getitem .items,1; set .@randitem,rand(1); if(.@randitem == 100) getitem .items1,1; //Change to what random item do you want to give end; } } the mob does not drop is if(.@randitem == 100) the drop change ? map server makes shows no error but it is not easy to pls help.... Quote Link to comment Share on other sites More sharing options...
sandbox Posted February 20, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted February 20, 2014 yes it won't drop, if you want it to specifically drop. find set .@randitem,rand(1); if(.@randitem == 100) getitem .items1,1; //Change to what random item do you want to give replace set .@randitem,rand(1); if(.@randitem == 1) { getmapxy(.@map$,.@x,.@y,0); makeitem .items1,1,.@map$,.@x,.@y; } //Change to what random item do you want to give Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted February 20, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Author Share Posted February 20, 2014 - script DropExtra -1,{ OnNPCKillEvent: if (killedrid != 1902){ setarray .items1[0],501,502,503,504,506,507,508; set .items, .items1[rand(getarraysize(.items1))]; getitem .items,1; set .@randitem,rand(1); if(.@randitem == 1) { getmapxy(.@map$,.@x,.@y,0); makeitem .items1,1,.@map$,.@x,.@y; end; } } does not go and I do not 100% but 0.50% Quote Link to comment Share on other sites More sharing options...
sandbox Posted February 20, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted February 20, 2014 sorry.. typo, change set .@randitem,rand(2); Quote Link to comment Share on other sites More sharing options...
EL Dragon Posted February 20, 2014 Group: Members Topic Count: 86 Topics Per Day: 0.02 Content Count: 591 Reputation: 146 Joined: 06/19/12 Last Seen: December 10, 2016 Author Share Posted February 20, 2014 end; } } does not go -.- Quote Link to comment Share on other sites More sharing options...
sandbox Posted March 1, 2014 Group: Members Topic Count: 38 Topics Per Day: 0.01 Content Count: 949 Reputation: 174 Joined: 06/12/12 Last Seen: Friday at 12:25 PM Share Posted March 1, 2014 Sorry for the late reply, But you are missing 1 closing brace } Quote Link to comment Share on other sites More sharing options...
Question
EL Dragon
how do I make a OnNPCKillEvent with
if (killedrid !=MOB ID){
setarray .items[0],501,502,503,504,506,507,508
set .items, .items[rand(getarraysize(.items))];
getitem .@item_id,1;
or ?
makeitem .@item_id,1;
and random item drop to 0,50%
hope I can help someone, sorry for my bad english
Link to comment
Share on other sites
7 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.