Jump to content
  • 0

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


sotf

Question


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

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!

Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  81
  • Topics Per Day:  0.02
  • Content Count:  1654
  • Reputation:   583
  • Joined:  08/09/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

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


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

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?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

hmm I think I will try the script first, thank you! Will test it out as soon as possible

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

trunk/src\map\itemdb.h

	ITEMID_SKULL_ = 7420,
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  43
  • Topics Per Day:  0.01
  • Content Count:  173
  • Reputation:   9
  • Joined:  11/14/12
  • Last Seen:  

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

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...