Jump to content
  • 0

pk item drop


MuffinEater

Question


  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/15/16
  • Last Seen:  

when Player ( A ) killed by Player ( B )  , Player (A) will drop item equipped and inventory,

chance's are based on level
if level 150 to 200  50% chance( Random 1 - 5pcs )  dropping of item
201 up will 100% chance ( Random 5 - 10pcs ) dropping of item

149 below wont be affected.

Thanks in advance.

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  281
  • Reputation:   14
  • Joined:  10/14/13
  • Last Seen:  

This? but its not yet modified according to your request.

 

EDIT: or you can just configure it here, just follow the guide 

Edited by Aureon
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.01
  • Content Count:  38
  • Reputation:   0
  • Joined:  03/15/16
  • Last Seen:  

i try this script

///////////////////////////////////////////////////////////////////////////////////
// Custom script for Item drops on player's death
// --------------------------------------------------------------------------------
// Created by Brian ([email protected])
// for original use on eAthena Stable 12623
///////////////////////////////////////////////////////////////////////////////////
- script DeathHandle -1,{
OnPCDieEvent:

	//Set this variable to pass on to the next script
	set $plrdead$, strcharinfo(0);
	//Get map info
	getmapxy(@mapname$,@mapx,@mapy,0);

	//Remove all cards and unequip everything
	//Ideally, we wouldn't do this, however there's no good way to drop
	//an item that has cards compounded onto it. A bit inconvienant, but
	//it works.
	for (set @i,0; @i < 10; set @i,@i+1) {
		successremovecards @i;
	}
	nude;
	//Figure out how many items to take
	getinventorylist;
	//Change "/3" to reflect the amount of items to drop
	//1 = 100%, 2 = 50%, 3 = 33%, 4= 25%, etc.
	set $@drops,(@inventorylist_count*(100/100));
	//Let's not make it easy for players to dup.
	if(@inventorylist_count==0) goto ENDPOS;
	//This is the loop that goes through the inventory dropping items
	for(set $@iterations,0; $@iterations < $@drops; set $@iterations,$@iterations+1) {
		//Update inventory variables
		getinventorylist;

		//Randomly choose an item in the inventory array
		set $@randselect, rand(0,@inventorylist_count);

		//Drop the item, on the ground, at the location you died.
		makeitem @inventorylist_id[$@randselect],@inventorylist_amount[$@randselect],@mapname$,@mapx,@mapy;

		//Take the item out of your inventory.
		delitem @inventorylist_id[$@randselect],@inventorylist_amount[$@randselect];
	}

ENDPOS:
	end;
}

but if you got 30pcs of jellopy and 30pcs of red potion it drop all how i can change that into random amount? 

Edited by MuffinEater
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...