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.

  1. gametec
    Offline

    gametec Active Member

    Joined:
    Feb 5, 2014
    Messages:
    325
    Likes Received:
    45
    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,080
    Likes Received:
    157
    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:
    325
    Likes Received:
    45
    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
    Last edited: Apr 16, 2018
  4. Lokai
    Offline

    Moderator ServUO Developer

    Joined:
    Dec 4, 2014
    Messages:
    1,080
    Likes Received:
    157
    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
Addons Brass Orrery (animated solar system) Dec 8, 2018
Script Support FS taming bod system dont show animals needed. Dec 6, 2018
Script Support Easy Way to Disable new Runic Loot System? Nov 16, 2018
Custom Releases Summoning System v2.0 beta Oct 6, 2018
Custom Releases PVP Tournament System [Paid] Sep 24, 2018
Custom Releases In Game Tracking System Sep 22, 2018
Custom Releases Passive Item System Sep 4, 2018