Yuna Posted October 15, 2017 Share Posted October 15, 2017 I'm looking for some help regarding making looted items from pets to go directly in to the character's inventory. So basically editing the petloot command to work like autoloot. Any help regarding this would be appreciated! Quote Link to comment Share on other sites More sharing options...
0 Skorm Posted October 17, 2017 Share Posted October 17, 2017 (edited) On 10/15/2017 at 5:20 AM, Alice Chan said: I'm looking for some help regarding making looted items from pets to go directly in to the character's inventory. So basically editing the petloot command to work like autoloot. Any help regarding this would be appreciated! Find line 1179 in pet.c should look something like this. } else { // Item Targeted, attempt loot if (!check_distance_bl(&pd->bl, target, 1)) { // Out of range if(!unit_walktobl(&pd->bl, target, 1, 1)) // Unreachable target. pet_unlocktarget(pd); return 0; } else { struct flooritem_data *fitem = (struct flooritem_data *)target; Comment out this part. if(pd->loot->count < pd->loot->max) { memcpy(&pd->loot->item[pd->loot->count++],&fitem->item,sizeof(pd->loot->item[0])); pd->loot->weight += itemdb_weight(fitem->item.nameid)*fitem->item.amount; map_clearflooritem(target); } add below. if (!pc_additem(sd, &fitem->item, fitem->item.amount, LOG_TYPE_PICKDROP_PLAYER)) { map_clearflooritem(target); } Edited October 18, 2017 by Skorm Quote Link to comment Share on other sites More sharing options...
0 Ahmad Rashidi Posted December 3, 2017 Share Posted December 3, 2017 (edited) thx the the script . its working fne . the loot goes to inventory. but i had another issue in [Error]: delete_timer error : function mismatch (nil)(unknown timer function) != 0x4fc6c0(map_clearflooritem_timer) [Error]: Memory manager: args of aFree 0x0x7fd18e53a5cc is invalid pointer map.cpp line 215 how to fix this ? and another problem is , after my pet loot the item . it direct goes to inventory , but when i use performance on pet ex: Poring . the item which poring loot will get double. 1.item direct to inventory 2.the same item but the one which poring hold and will drop after use perfomance command. Edited December 3, 2017 by Ahmad Rashidi adding more info Quote Link to comment Share on other sites More sharing options...
I'm looking for some help regarding making looted items from pets to go directly in to the character's inventory.
So basically editing the petloot command to work like autoloot. Any help regarding this would be appreciated!
Link to comment
Share on other sites