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

[Socket System Help]

Discussion in 'Script Support' started by gametec, Apr 16, 2018 at 3:45 PM.

  1. gametec
    Offline

    gametec Active Member

    Joined:
    Feb 5, 2014
    Messages:
    300
    Likes Received:
    43
    The Problem:
    Lines 6-11:
    These lines will change every so often to accommodate the SocketMount and SocketCreature buffs....
    What I am having issues with is finding a way to have a creature utilize a HasBreath effect. This is just an example as I am just testing the system thus far. It's still very unstable, but works the way it should between Socket Mob and Gem interactions. I just can't seem to get the buffs added correctly.

    I've asked for assistance, but it's been a while since I've scripted anything new for RunUO, let alone ServUO and so I'm requesting a little help; pay for play negotiable if we get an end result. Thanks.

    Code (C#):
    1.  
    2. switch (Utility.Random(3))
    3. {
    4.     case 0:
    5.         {
    6.             bsm.UsedSockets += 1;
    7.             bsm.Hue = 68;
    8.             bsm.AugmentList = bsm.AugmentList + "\n" + m_Augmentation.Name;
    9.             from.SendMessage(55, "You have successfully enhanced the Socket Horse!");
    10.             bsm.ActiveSpeed = 5.0;
    11.             m_Augmentation.Delete();
    12.             break;
    13.         }
    14.     case 1:
    15.         {
    16.             from.SendMessage(55, "You have failed in your attempt to enhance the Socket Horse!");
    17.             m_Augmentation.Delete();
    18.             break;
    19.         }
    20.     case 2:
    21.         {
    22.             bsm.Kill();
    23.             from.SendMessage(55, "The power in the gem was too strong and killed your Socket Horse!");
    24.             m_Augmentation.Delete();
    25.             break;
    26.         }
    27. }
    28.  
     
  2. Lokai
    Offline

    Moderator ServUO Developer

    Joined:
    Dec 4, 2014
    Messages:
    1,005
    Likes Received:
    145
    Where do you actually try to buff the Horse? This line? : "bsm.ActiveSpeed = 5.0;"
     
  3. gametec
    Offline

    gametec Active Member

    Joined:
    Feb 5, 2014
    Messages:
    300
    Likes Received:
    43
    the buffs would go where that line is... that line was a test to see if I could change the ActiveSpeed and it worked. The problem I am having is that I get the error below ALL the time when trying to add breath attacks associated with each gem.

    If I just wanted to add BreathPoisonDamage to a mobile I can do it like this:
    Code (C#):
    1.  
    2. public virtual int BreathPoisonDamage { get { return 0; } }
    3.  
    So how would I add it to an item that modifies an attribute like that to a mobile? This is the main issue is that I don't know how to do it. So I have put my thinking cap on, tail between my legs, and I'm waiting for someone to teach me. lol

    Attached is the beta system... it's really not production server ready; I will release the final project when I fix these issues I am having. This is an alternative to MetaPets.... it allows you to use a non-xml socket system to add buffs to bonded pets using gems. I plan on extending this system for all pets, but at the moment it only covers a new class of mount called SocketMounts.
     

    Attached Files:

    #3 gametec, Apr 16, 2018 at 7:51 PM
    Last edited: Apr 16, 2018 at 8:02 PM
  4. Lokai
    Offline

    Moderator ServUO Developer

    Joined:
    Dec 4, 2014
    Messages:
    1,005
    Likes Received:
    145
    What you would probably need is to do one of the following:

    1. Change BaseCreature so that the readonly properties have both setters and getters.

    or

    2. In your derived classes, such as BaseSocketMount, override any "socketable" properties like this:

    Code (C#):
    1.      private int my_BreathPoisonDamage;
    2.      public override int BreathPoisonDamage { get { return my_BreathPoisonDamage; } }
    3.      public void SetBreathPoisonDamage( int damage )
    4.      {
    5.           my_BreathPoisonDamage = damage;
    6.      }
    Then, this would work:

    Code (C#):
    1. bsm.SetBreathPoisonDamage( Utility.Random(25, 50) );
     
    • Thanks! Thanks! x 1
Similar Threads: [Socket System
Forum Title Date
Bug Reports Young System Yesterday at 3:36 PM
Script Support Would like to add token to brittiana reward system. Thursday at 8:05 AM
Archived Bug Reports Arena System bug Mar 28, 2018
Script Support Xanthos Claim System... Mar 19, 2018
Script Support Looking for some pvm ranking,or points system. Mar 14, 2018
Archived Bug Reports Minor plant system bug Mar 2, 2018
Archived Bug Reports -luck items can trick Fame Based Point systems. Feb 23, 2018