Jump to content
  • 0

[How?] Drop other item instead of skulls in PVP


Question

Posted

Hi Good day rAthena! It's nice to ba back :D

I hope you guys can help me again on this one, I plan to add some quest items on my server but I want this one quest requirement be dropped on pvp room when a player is killed. Just like those skulls dropping when a player died.

 

Is it possible?

 

I am not really sure if I posted on the right section, to mods, please feel free to move wherever this topic should be :D

Thanks in advance!

6 answers to this question

Recommended Posts

Posted

I prefer to use script rather than changing the source file, because it will be overwritten everytime I do an 'SVN Update'  /ok

Something like this maybe:

OnPCDieEvent:
getmapxy( .@map$, .@x, .@y, 0 );
if (.@map$ == "your_pvp_map") {
makeitem 909, 1, .@map$, .@x, .@y;
end;
Posted

trunk/src/map/pc.c

	if(battle_config.bone_drop==2

|| (battle_config.bone_drop==1 && map[sd->bl.m].flag.pvp))

{

struct item item_tmp;

memset(&item_tmp,0,sizeof(item_tmp));

item_tmp.nameid=ITEMID_SKULL_;

item_tmp.identify=1;

item_tmp.card[0]=CARD0_CREATE;

item_tmp.card[1]=0;

item_tmp.card[2]=GetWord(sd->status.char_id,0); // CharId

item_tmp.card[3]=GetWord(sd->status.char_id,1);

map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);

}

Change 'nameid' (item ID) and set the card slots to 0.
Posted

ah so let's say I want them to drop jellopy(909) instead of skull...

 

	if(battle_config.bone_drop==2
		|| (battle_config.bone_drop==1 && map[sd->bl.m].flag.pvp))
	{
		struct item item_tmp;
		memset(&item_tmp,0,sizeof(item_tmp));
		item_tmp.nameid=909;
		item_tmp.identify=1;
		item_tmp.card[0]=0;
		item_tmp.card[1]=0;
		item_tmp.card[2]=0;
		item_tmp.card[3]=0;
		map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
	}

 

did I do it right?

Posted

I'm marking this thread as solved. Thank you everyone!

 

I tried the script first because it's the easiest way to go, but I'll take note of Emistry's and Euphy's posts! Thank you guys! You're the bests! :D

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...