1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Question

Discussion in 'General Discussion' started by mouradoski, Jan 21, 2017.

  1. mouradoski
    Offline

    mouradoski Member

    Joined:
    Jan 6, 2017
    Messages:
    56
    Likes Received:
    0
    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
     
    #1 mouradoski, Jan 21, 2017
    Last edited: Jan 21, 2017
  2. Talow
    Offline

    Talow Member

    Joined:
    Aug 30, 2014
    Messages:
    275
    Likes Received:
    22
    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
     
    #2 Talow, Jan 23, 2017
    Last edited: Jan 23, 2017
  3. mouradoski
    Offline

    mouradoski Member

    Joined:
    Jan 6, 2017
    Messages:
    56
    Likes Received:
    0


    thank you for replay, hope someone else give more details. i searched everywhere but coudln't find anything yet.
     
  4. mouradoski
    Offline

    mouradoski Member

    Joined:
    Jan 6, 2017
    Messages:
    56
    Likes Received:
    0
  5. gametec
    Offline

    gametec Active Member

    Joined:
    Feb 5, 2014
    Messages:
    247
    Likes Received:
    34
    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; }
     
    #5 gametec, Feb 22, 2017
    Last edited: Feb 22, 2017
Similar Threads: Question
Forum Title Date
General Discussion Question on stat caps. Saturday at 10:50 PM
Script Support Question about including custom Map files download (mul files) Thursday at 12:32 PM
3rd Party Support UO Enhanced Client Question Mar 30, 2017
Script Support Question regarding Gump Mar 29, 2017
New Join Forum Few Questions Mar 26, 2017
ServUO Discussion General ServUO questions Mar 23, 2017
Script Support 2 part help question Mar 22, 2017