EL Dragon Posted February 20, 2014 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
sandbox Posted February 20, 2014 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
EL Dragon Posted February 20, 2014 Author 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
sandbox Posted February 20, 2014 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
EL Dragon Posted February 20, 2014 Author 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
sandbox Posted February 20, 2014 Posted February 20, 2014 sorry.. typo, change set .@randitem,rand(2); Quote
sandbox Posted March 1, 2014 Posted March 1, 2014 Sorry for the late reply, But you are missing 1 closing brace } Quote
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
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.