Sapito Sucio Posted August 7, 2012 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
Emistry Posted August 7, 2012 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
Lilith Posted August 7, 2012 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
Emistry Posted August 7, 2012 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
Sapito Sucio Posted August 7, 2012 Author 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
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 Kusoo4 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.