Engraving Tool Fix

Discussion in 'Suggestions and Requests' started by Dragon Slayer, Feb 12, 2015.

  1. Dragon Slayer

    Dragon Slayer Grandmaster Member

    Code:
            public override void OnDoubleClick(Mobile from)
            {
                base.OnDoubleClick(from);
               
                if (!from.NetState.SupportsExpansion(Expansion.ML))
                {
                    from.SendLocalizedMessage(1072791); // You must upgrade to Mondain's Legacy in order to use that item.               
                    return;
                }
                if (IsChildOf(from.Backpack) || Parent == from)
                {
                    if (this.m_UsesRemaining > 0)
                    {
                        from.SendLocalizedMessage(1072357); // Select an object to engrave.
                        from.Target = new InternalTarget(this);
                    }
                    else
                    {
                        from.SendLocalizedMessage(1042544); // This item is out of charges.
                    }
                }
                else
                {
                    from.SendLocalizedMessage(1042001); // That must be in your pack for you to use it.
                }
            }
    Since Boardsword published 89
    they have changed engraving tools to require them to be in back pack here is the fix
     
  2. Ravenwolfe

    Ravenwolfe Administrator Staff Member JustUO Developer

    Fixed for next commit, thanks!
     
  3. Dragon Slayer

    Dragon Slayer Grandmaster Member

    Np im just trying to keep things updated with uo figure I post them here
     
    • Like Like x 1
  4. Tasanar

    Tasanar Super Contributor

    Do these tools even work? Even with this fix to EngravingTools.cs it always tells me - this is not the correct item for this tool. (tried them all)
     
  5. Dian

    Dian Administrator

    Will have to look into this.. Thanks for the heads up :)
     
    • Like Like x 1
  6. Punkte

    Punkte Distinguished Member

    Its a weapon engraving tool. You'll need to use it on weapons.
    Works for me in game.
     
    • Agree Agree x 1
  7. Tasanar

    Tasanar Super Contributor

    No not the weapon one the container ones by type
     
    • Agree Agree x 1
  8. Neshoba

    Neshoba Super Contributor

    ive got the engraving tools not sure where they came from ,,you can spawn them and see them get gump to engrave but it want work on any of the items targeted made a change at line 93 and added comment there to see change for reference (( weapon engraver works )) the spellbook engraver food engraver metalcontainer engraver and leather engraver is getting gump but sayin you cannot engrave this item when targeted in pack ,,attached my file a little help with getting the rest of it would be greatly appreaciated

    commented// and added Neshoba where I made changes cant seem to get past this error
    ----------------------------------------------------------------------------
    JustUO - [http://www.playuo.org] Version 1.0
    Publish 4
    Core: .NET Framework Version 4.0.30319
    Core: Optimizing for 2 processors
    RandomImpl: CSPRandom (Software)
    Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
    Errors:
    + Items/- Misc/EngravingTools.cs:
    CS1513: Line 111: } expected
    Scripts: One or more scripts failed to compile or no script files were found.
    - Press return to exit, or R to try again.
     

    Attached Files:

    Last edited: Jan 6, 2016
  9. Nass

    Nass Renowned Member

  10. Nass

    Nass Renowned Member

    Isn't this funny? I thought I'd looked and looked and as soon as I ask, I find it. Servuo has fixed it and it works on JustUO.

    At line 32 add
    Code:
             private string m_EngravedText = string.Empty;
    
            [CommandProperty(AccessLevel.GameMaster)]
            public string EngravedText
            {
                get { return this.m_EngravedText; }
                set
                {
                    if (value != null)
                        this.m_EngravedText = value;
                    else
                        this.m_EngravedText = string.Empty;
                    this.InvalidateProperties();
                }
            }
    If you don't have numbers, search for
    public override bool IsAccessibleTo(Mobile m)​
    and toss it in above that.

    Change line 10 from
    public abstract class BaseContainer : Container​
    to
    public abstract class BaseContainer : Container, IEngravable​

    I hope this helps someone somewhere sometime.
     
    Last edited: Apr 16, 2017
  11. Nass

    Nass Renowned Member

    Hmm, it's become a bit sad. I didn't realize that doing that would engrave but not show.

    Do a search for:
    I can't reach that.

    Including the lines above and below so you can see the placing better:

    Code:
                    from.LocalOverheadMessage(MessageType.Regular, 0x3B2, 1019045); // I can't reach that.
            }
    
    		public override void AddNameProperty(ObjectPropertyList list)
    		{
    			base.AddNameProperty(list);
    
    			if(!String.IsNullOrEmpty(this.EngravedText))
    			{
    				list.Add(1072305, this.EngravedText); // Engraved: ~1_INSCRIPTION~
    			}
    		}
    
    		public virtual void Open(Mobile from)
    I also found that if you want to make boxes for plants, you might want to go to Scripts\Misc\ProfanityProtection.cs and get rid of prick and ass or your engraving might look a bit odd. *Oddly, it worked before but I've checked it now and I again see: $#!@#ly Pear Cactus. I've checked the file and it shows the changes. The only other place I can see using the profanity filter is checking against names and I don't think that should affect my boxes. It's like reboot is taking away my changes but I can see them in the files.

    But now it gets sadder. I can see the engraving and everything looks fine but it only lasts until reboot. Does anyone know what I'd need to change to get it to stay on past reboot?
     

Share This Page