Hello all,

do someone have any idea how i make all (insured/blessed) items stay on paperdoll after resurrecting and not drop in the backpack.

thanx
 
Last edited:
You could apply a bool on the death check where the items are moved into the bag, sorry I don't know where that's located right now.
If the item is equip and insured or blessed ext, then have a bool for on the object basewearable, would be my guess, for equiptOnRes. That's normally false, unless the conditions where true. Then when you go to res person, check all items in bag/inventory and if the equiptOnRes is true put it back on.

Now if you don't want to edit the basewearable to add the bool to it, for whatever reason, you could instead use an XMLData attachment, or a new attachment, if the attachment is there, equip.

There also should be an event for death, I think there's also an event for res.

Subscribe to the events and using the attachments you wouldn't need to make any edits, just add a custom script
 
Last edited:
You could apply a bool on the death check where the items are moved into the bag, sorry I don't know where that's located right now.
If the item is equip and insured or blessed ext, then have a bool for on the object basewearable, would be my guess, for equiptOnRes. That's normally false, unless the conditions where true. Then when you go to res person, check all items in bag/inventory and if the equiptOnRes is true put it back on.

Now if you don't want to edit the basewearable to add the bool to it, for whatever reason, you could instead use an XMLData attachment, or a new attachment, if the attachment is there, equip.

There also should be an event for death, I think there's also an event for res.

Subscribe to the events and using the attachments you wouldn't need to make any edits, just add a custom script



thank you for replay, hope someone else give more details. i searched everywhere but coudln't find anything yet.
 
You're going to need to do some core edits in your server console so make sure you have its source code before continuing; also keep in mind that you should ALWAYS back up the files before editing them! ;)

I would think it is as simple as copying the line in the Mobile.cs script and following the format of the methods in Item.cs. Here is what you might want to search for and a suggestion on adding your new code:

Item.cs
search for this: DeathMoveResult

public virtual DeathMoveResult OnParentDeath(Mobile parent)
public virtual DeathMoveResult OnInventoryDeath(Mobile parent)

...and you would add something like this:
public virtual DeathMoveResult OnParentRes(Mobile parent)

Mobile.cs
search for this: KeepsItemsOnDeath

public virtual bool KeepsItemsOnDeath { get { return m_AccessLevel > AccessLevel.Player; } }

...and you would add something like this:
public virtual bool KeepsItemsOnRes { get { return m_AccessLevel > AccessLevel.Player; }
 
Last edited:
Back