Jump to content
  • 0

Petloot directly in Inventory


Yuna

Question


  • Group:  Members
  • Topic Count:  40
  • Topics Per Day:  0.01
  • Content Count:  96
  • Reputation:   5
  • Joined:  03/16/16
  • Last Seen:  

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

2 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  1268
  • Reputation:   382
  • Joined:  02/03/12
  • Last Seen:  

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

  • 0

  • Group:  Members
  • Topic Count:  4
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  04/22/17
  • Last Seen:  

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 by Ahmad Rashidi
adding more info
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...