Sapito Sucio Posted August 7, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 172 Reputation: 87 Joined: 04/10/12 Last Seen: 3 hours ago Share Posted August 7, 2012 (edited) 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 August 7, 2012 by Kusoo Quote Link to comment Share on other sites More sharing options...
Emistry Posted August 7, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10015 Reputation: 2348 Joined: 10/28/11 Last Seen: Thursday at 01:08 PM Share Posted August 7, 2012 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. 1 Quote Link to comment Share on other sites More sharing options...
Lilith Posted August 7, 2012 Group: Members Topic Count: 14 Topics Per Day: 0.00 Content Count: 407 Reputation: 159 Joined: 11/18/11 Last Seen: November 15, 2014 Share Posted August 7, 2012 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 1 Quote Link to comment Share on other sites More sharing options...
Emistry Posted August 7, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10015 Reputation: 2348 Joined: 10/28/11 Last Seen: Thursday at 01:08 PM Share Posted August 7, 2012 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 Quote Link to comment Share on other sites More sharing options...
Sapito Sucio Posted August 7, 2012 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 172 Reputation: 87 Joined: 04/10/12 Last Seen: 3 hours ago Author Share Posted August 7, 2012 (edited) 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 ! PS:Sorry about my Thx! Edited August 7, 2012 by Kusoo Quote Link to comment Share on other sites More sharing options...
Question
Sapito Sucio
Well,i tried to modify my SRC, to get an automatic autoloot of Skulls
I tried this:
in pc.c
to this
When i try to compile, i get this error:
What can i do ?
btw..
I use rAthena SVN
Edited by KusooLink to comment
Share on other sites
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.