Jump to content
  • 0

Autolooting Skull's PvP


Sapito Sucio

Question


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  172
  • Reputation:   87
  • Joined:  04/10/12
  • Last Seen:  

Well,i tried to modify my SRC, to get an automatic autoloot of Skulls

I tried this:

in 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;
map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
}

to this

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;
 map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
 // Warfare Autoloot Skull
 if (src && src->type == BL_PC) {
 struct map_session_data *ssd = (struct map_session_data *)src;
 pc_additem( ssd, &item_tmp, 1);
 } else {
 map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0);
 }
}

When i try to compile, i get this error:

nueva carpeta\rathena\src\map\pc.c(6472): error C2198: 'pc_additem' : too few arguments for a call

What can i do ?

btw..

I use rAthena SVN

Edited by Kusoo
Link to comment
Share on other sites

4 answers to this question

Recommended Posts


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

try change

pc_additem( ssd, &item_tmp, 1);

into

pc_additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT)))

you need 1 more parameter for log part.

  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

try change

pc_additem( ssd, &item_tmp, 1);

into

pc_additem(sd, &item_tmp, 1, LOG_TYPE_SCRIPT)))

you need 1 more parameter for log part.

I think must be LOG_TYPE_PICKDROP_PLAYER

  • Upvote 1
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:  

not sure..i use the LOG_TYPE_SCRIPT because the skull will be added directly into player inventory..

doesnt feel like the LOG_TYPE_PICKDROP match for this situation ...since player doesnt need to pick it ?

so i prefer to use LOG_TYPE_SCRIPT

anyway ..just let the @TS to select which way he way haha

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  11
  • Topics Per Day:  0.00
  • Content Count:  172
  • Reputation:   87
  • Joined:  04/10/12
  • Last Seen:  

Thanks @Emistry & @Lilith !!

I did this:

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;

map_addflooritem(&item_tmp,1,sd->bl.m,sd->bl.x,sd->bl.y,0,0,0,0 // <---To avoid the Skull were dropped

if (src && src->type == BL_PC) {

struct map_session_data *ssd = (struct map_session_data *)src;

pc_additem(ssd, &item_tmp, 1, LOG_TYPE_SCRIPT);

} else {

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

}

And it works :D!

PS:Sorry about my

Thx!

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