Jump to content
  • 0

Mob item drop.


Mr BrycE

Question


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

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.

Link to comment
Share on other sites

4 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  50
  • Topics Per Day:  0.01
  • Content Count:  1702
  • Reputation:   238
  • Joined:  09/05/12
  • Last Seen:  

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;
}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

i just saw the makeitem in the doc. but i'll try this.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   3
  • Joined:  02/24/12
  • Last Seen:  

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)

 

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  125
  • Topics Per Day:  0.03
  • Content Count:  595
  • Reputation:   23
  • Joined:  02/23/12
  • Last Seen:  

sorry for the late reply, thanks patskie

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...