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:
    365
    Likes Received:
    72
    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:
    972
    Likes Received:
    152
    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:
    365
    Likes Received:
    72
    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 Problem adding reward Yesterday at 2:06 PM
Script Support How to add cost to alchemystone.cs Yesterday at 9:59 AM
ServUO Discussion Server Crashes when I uses [add Saturday at 9:58 PM
Script Support Adding skill to an item *** Solved *** Dec 9, 2017
General Discussion How to add missing backpack on players? Nov 28, 2017
General Discussion addmin crashes when log in Nov 26, 2017
Script Support Lookpack.cs how to add random item Nov 14, 2017