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

Add Balaced to two handed melee

Discussion in 'Script Support' started by RedDragon, Jan 13, 2014.

  1. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    Publish Number:
    54
    Hello friends,
    how can i add Balaced to two handed melee weapons and remove it from throwing?

    Thanks for your help.
     
  2. RedBeard
    Offline

    RedBeard Active Member

    Joined:
    May 19, 2013
    Messages:
    381
    Likes Received:
    73
    You can make a new base class for two-handed weapons Take a look at BaseRanged script and find this bit of code in BaseWeapon:

    Code (C#):
    1. if (Core.ML && this is BaseRanged && ((BaseRanged)this).Balanced)
    2.                 list.Add(1072792); // Balanced
    You can also make them custom two-handed weapons that carry the property, might be easier and require less Distro modification
     
    • Like Like x 1
  3. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    Two Handed Weapon is...? BaseTwoHanded?
     
  4. Hank
    Offline

    Hank Active Member

    Joined:
    Nov 14, 2013
    Messages:
    971
    Likes Received:
    153
    He is talking about BaseWeapon.cs

    Search for the line(s) of code he provided in that.
     
  5. RedDragon
    Offline

    RedDragon Member

    Joined:
    Dec 19, 2013
    Messages:
    34
    Likes Received:
    1
    yeah, but, now what i must do?
    something like this: ?

    Code (C#):
    1. if (Core.ML && this is BaseRanged && ((BaseRanged)this).Balanced)
    2. list.Add(1072792); // Balanced
    3. if (Core.ML && this is BaseTwoHanded && ((BaseTwoHanded)this).Balanced)
    4. list.Add(1072792); // Balanced
     
    #5 RedDragon, Jan 13, 2014
    Last edited: Jan 13, 2014
  6. RedBeard
    Offline

    RedBeard Active Member

    Joined:
    May 19, 2013
    Messages:
    381
    Likes Received:
    73
    Yes in BaseWeapon you would need that portion, and your BaseTwoHanded.cs would reflect that property as well. [See how its expressed in BaseRanged as an example.]
     
Similar Threads: Add Balaced
Forum Title Date
Script Support adding item on char creation depending on race Thursday at 9:58 AM
Script Support Add Custom Loot Drops to Your Bag or Monster Jul 9, 2018
Custom Releases In-game way to add Sovereigns to the new UO Store Jun 27, 2018
Script Support Trying to add the following 2 scripts to RunUO Server 2.6 . . . Jun 17, 2018
ServUO Discussion New publish on UO adds some CC/EC bug fixes. Jun 13, 2018
Script Support Add type door May 20, 2018
3rd Party Discussions Question about adding graphics/items with UOFiddler May 19, 2018