Mr BrycE Posted October 2, 2013 Posted October 2, 2013 Will someone teach me how to spread the drop in the area where the monster is killed? NOT the normal item drop where the item and monster is in the same position. Quote
Patskie Posted October 2, 2013 Posted October 2, 2013 Try : - script Sample -1,{ OnInit: set .item_id,7227; set .amount,10; monster "prontera",0,0,"Poringer",1002,1,strnpcinfo(0)+"::OnKill"; end; OnKill: for (set .@i,0; .@i < .amount; set .@i,.@i+1) { do { set .@x, rand(1,500); set .@y, rand(1,500); } while (!checkcell("prontera",.@x,.@y,cell_chkpass)); makeitem .item_id,1,"prontera",.@x,.@y; } end; } Quote
Mr BrycE Posted October 2, 2013 Author Posted October 2, 2013 i just saw the makeitem in the doc. but i'll try this. Quote
Sunzuke Posted October 2, 2013 Posted October 2, 2013 I don't know how to get the monstres position besides patskies script but you could use the players position OnNPCKillEvent: if(killedrid == <monster id>) { attachrid(killerrid); if(getmapxy(@mapname$,@mapx,@mapy,0,"""+strcharinfo(0)+"")!=0) end; set @mapx,@mapx+rand(-15,15); if(@mapx < 0) set @mapx,0; set @mapy,@mapy+rand(-15,15); if(@mapy < 0) set @mapy,0; makeitem "<item name>",<amount>,""+@mapname$+"",@mapx,@mapy; } end; (not tested) Quote
Mr BrycE Posted October 3, 2013 Author Posted October 3, 2013 sorry for the late reply, thanks patskie Quote
Question
Mr BrycE
Will someone teach me how to spread the drop in the area where the monster is killed?
NOT the normal item drop where the item and monster is in the same position.
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.