RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Working 7xGM Skillball (RunUO2.0Final)

romanthebrain

Sorceror
Working 7xGM Skillballs (RunUO2.0Final)

working 7xGM Skillballs UO:R based.


(RunUO 2.0 Final)

only drop in custom folder

skillball.cs = unlimited 7x GM Skillball
skillballlim.cs = limited 7xGM Skillball (PvP)

statball.cs = Statball


all scripts are checked and compatible with RunUO 2.0 Final and maybe with RC2 or RC1




 

Attachments

  • skillball.cs
    14.9 KB · Views: 1,042
  • skillballlim.cs
    12.9 KB · Views: 737
  • StatBall.cs
    4.1 KB · Views: 881

KoNNaN

Knight
I like all the skills on one page. I am going to use this.
There's only thing I would change. Need to have it check if it is in your backpack before opening the gump.
 

romanthebrain

Sorceror
KoNNaN;828004 said:
I like all the skills on one page. I am going to use this.
There's only thing I would change. Need to have it check if it is in your backpack before opening the gump.

Why? The item get deleted when it is in backpack or on the ground .....
So it doesnt matter at all.
 

Morxeton

Sorceror
romanthebrain;828037 said:
Why? The item get deleted when it is in backpack or on the ground .....
So it doesnt matter at all.

If it were accessible from the ground, without the proper checks in place, more than one person could use it at a time. Not to mention that things like this should really only be accessed from the player's backpack anyways.
 

romanthebrain

Sorceror
Ok ive done a new limited skillball script and updated the old skillball.
These balls are for UOR Pub 15 and 16.
U can download it on the main post .


If you want i can release the unlimited and limited Skillballs :
+1 , +5 , +10 , +15 , +20 , +25 , +50
and a statball with 225 skillcab.


Have Fun Guys
 

hawthornetr

Sorceror
romanthebrain;829159 said:
Ok ive done a new limited skillball script and updated the old skillball.
These balls are for UOR Pub 15 and 16.
U can download it on the main post .


If you want i can release the unlimited and limited Skillballs :
+1 , +5 , +10 , +15 , +20 , +25 , +50
and a statball with 225 skillcab.


Have Fun Guys

Post stat ball plz.
 

hawthornetr

Sorceror
I updated your skillball to do every skill listed and handle it based on the enumerator.

Code:
using System;
using Server;
using Server.Network;
using Server.Mobiles;
using Server.Items;
using Server.Gumps;
using Server.Misc;
// COPYRIGHT BY ROMANTHEBRAIN
namespace Server
{
    public class SkilllimPickGump : Gump
    {


        private int switches = 7;
        private SkillBall3 m_SkillBall;
        private double val = 100;


        public SkilllimPickGump(SkillBall3 ball)
            : base(0, 0)
        {
            this.Closable = true;
            this.Disposable = true;
            this.Dragable = true;
            this.Resizable = true;
            m_SkillBall = ball;
            this.AddPage(0);
            this.AddBackground(39, 33, 750, 500, 9200);
            this.AddLabel(67, 41, 1153, @"Please select your 7 skills");
            this.AddButton(80, 500, 2071, 2072, (int)Buttons.Close, GumpButtonType.Reply, 0);
            this.AddBackground(52, 60, 720, 430, 9350);
            this.AddPage(1);
            this.AddButton(690, 500, 2311, 2312, (int)Buttons.FinishButton, GumpButtonType.Reply, 0);
            this.AddCheck(55, 65, 210, 211, false, (int)SkillName.Alchemy);
            this.AddCheck(55, 90, 210, 211, false, (int)SkillName.Anatomy);
            this.AddCheck(55, 115, 210, 211, false, (int)SkillName.AnimalLore);
            this.AddCheck(55, 140, 210, 211, false, (int)SkillName.AnimalTaming);
            this.AddCheck(55, 165, 210, 211, false, (int)SkillName.Archery);
            this.AddCheck(55, 190, 210, 211, false, (int)SkillName.ArmsLore);
            this.AddCheck(55, 215, 210, 211, false, (int)SkillName.Begging);
            this.AddCheck(55, 240, 210, 211, false, (int)SkillName.Blacksmith);
            this.AddCheck(55, 265, 210, 211, false, (int)SkillName.Bushido);
            this.AddCheck(55, 290, 210, 211, false, (int)SkillName.Camping);
            this.AddCheck(55, 315, 210, 211, false, (int)SkillName.Carpentry);
            this.AddCheck(55, 340, 210, 211, false, (int)SkillName.Cartography);
            this.AddCheck(55, 365, 210, 211, false, (int)SkillName.Chivalry);
            this.AddCheck(55, 390, 210, 211, false, (int)SkillName.Cooking);
            this.AddCheck(55, 415, 210, 211, false, (int)SkillName.DetectHidden);
            this.AddCheck(55, 440, 210, 211, false, (int)SkillName.Discordance);
            this.AddCheck(55, 465, 210, 211, false, (int)SkillName.EvalInt);
            this.AddLabel(80, 65, 0, SkillName.Alchemy.ToString());         
            this.AddLabel(80, 90, 0, SkillName.Anatomy.ToString());         
            this.AddLabel(80, 115, 0, SkillName.AnimalLore.ToString());   
            this.AddLabel(80, 140, 0, SkillName.AnimalTaming.ToString());         
            this.AddLabel(80, 165, 0, SkillName.Archery.ToString());        
            this.AddLabel(80, 190, 0, SkillName.ArmsLore.ToString());    
            this.AddLabel(80, 215, 0, SkillName.Begging.ToString());           
            this.AddLabel(80, 240, 0, SkillName.Blacksmith.ToString());      
            this.AddLabel(80, 265, 0, SkillName.Bushido.ToString());       
            this.AddLabel(80, 290, 0, SkillName.Camping.ToString());     
            this.AddLabel(80, 315, 0, SkillName.Carpentry.ToString()); 
            this.AddLabel(80, 340, 0, SkillName.Cartography.ToString()); 
            this.AddLabel(80, 365, 0, SkillName.Chivalry.ToString()); 
            this.AddLabel(80, 390, 0, SkillName.Cooking.ToString()); 
            this.AddLabel(80, 415, 0, SkillName.DetectHidden.ToString()); 
            this.AddLabel(80, 440, 0, SkillName.Discordance.ToString());    
            this.AddLabel(80, 465, 0, SkillName.EvalInt.ToString());    
            // ********************************************************
            this.AddCheck(240, 65, 210, 211, false, (int)SkillName.Fencing);
            this.AddCheck(240, 90, 210, 211, false, (int)SkillName.Fishing);
            this.AddCheck(240, 115, 210, 211, false, (int)SkillName.Fletching);
            this.AddCheck(240, 140, 210, 211, false, (int)SkillName.Focus);
            this.AddCheck(240, 165, 210, 211, false, (int)SkillName.Forensics);
            this.AddCheck(240, 190, 210, 211, false, (int)SkillName.Healing);
            this.AddCheck(240, 215, 210, 211, false, (int)SkillName.Herding);
            this.AddCheck(240, 240, 210, 211, false, (int)SkillName.Hiding);
            this.AddCheck(240, 265, 210, 211, false, (int)SkillName.Inscribe);
            this.AddCheck(240, 290, 210, 211, false, (int)SkillName.ItemID);
            this.AddCheck(240, 315, 210, 211, false, (int)SkillName.Lockpicking);
            this.AddCheck(240, 340, 210, 211, false, (int)SkillName.Lumberjacking);
            this.AddCheck(240, 365, 210, 211, false, (int)SkillName.Macing);
            this.AddCheck(240, 390, 210, 211, false, (int)SkillName.Magery);
            this.AddCheck(240, 415, 210, 211, false, (int)SkillName.MagicResist);
            this.AddCheck(240, 440, 210, 211, false, (int)SkillName.Meditation);
            this.AddCheck(240, 465, 210, 211, false, (int)SkillName.Mining);
            this.AddLabel(265, 65, 0, SkillName.Fencing.ToString());     
            this.AddLabel(265, 90, 0, SkillName.Fishing.ToString());         
            this.AddLabel(265, 115, 0, SkillName.Fletching.ToString());   
            this.AddLabel(265, 140, 0, SkillName.Focus.ToString()); 
            this.AddLabel(265, 165, 0, SkillName.Forensics.ToString());     
            this.AddLabel(265, 190, 0, SkillName.Healing.ToString());          
            this.AddLabel(265, 215, 0, SkillName.Herding.ToString());         
            this.AddLabel(265, 240, 0, SkillName.Hiding.ToString());       
            this.AddLabel(265, 265, 0, SkillName.Inscribe.ToString());       
            this.AddLabel(265, 290, 0, SkillName.ItemID.ToString()); 
            this.AddLabel(265, 315, 0, SkillName.Lockpicking.ToString());        
            this.AddLabel(265, 340, 0, SkillName.Lumberjacking.ToString());        
            this.AddLabel(265, 365, 0, SkillName.Macing.ToString());   
            this.AddLabel(265, 390, 0, SkillName.Magery.ToString()); 
            this.AddLabel(265, 415, 0, SkillName.MagicResist.ToString()); 
            this.AddLabel(265, 440, 0, SkillName.Meditation.ToString());  
            this.AddLabel(265, 465, 0, SkillName.Mining.ToString());  
            // ********************************************************
            this.AddCheck(425, 65, 210, 211, false, (int)SkillName.Musicianship);
            this.AddCheck(425, 90, 210, 211, false, (int)SkillName.Necromancy);
            this.AddCheck(425, 115, 210, 211, false, (int)SkillName.Ninjitsu);
            this.AddCheck(425, 140, 210, 211, false, (int)SkillName.Parry);
            this.AddCheck(425, 165, 210, 211, false, (int)SkillName.Peacemaking);
            this.AddCheck(425, 190, 210, 211, false, (int)SkillName.Poisoning);
            this.AddCheck(425, 215, 210, 211, false, (int)SkillName.Provocation);
            this.AddCheck(425, 240, 210, 211, false, (int)SkillName.RemoveTrap);
            this.AddCheck(425, 265, 210, 211, false, (int)SkillName.Snooping);
            this.AddCheck(425, 290, 210, 211, false, (int)SkillName.Spellweaving);
            this.AddCheck(425, 315, 210, 211, false, (int)SkillName.SpiritSpeak);
            this.AddCheck(425, 340, 210, 211, false, (int)SkillName.Stealing);
            this.AddCheck(425, 365, 210, 211, false, (int)SkillName.Stealth);
            this.AddCheck(425, 390, 210, 211, false, (int)SkillName.Swords);
            this.AddCheck(425, 415, 210, 211, false, (int)SkillName.Tactics);
            this.AddCheck(425, 440, 210, 211, false, (int)SkillName.Tailoring);
            this.AddCheck(425, 465, 210, 211, false, (int)SkillName.TasteID);
            this.AddLabel(450, 65, 0, SkillName.Musicianship.ToString());     
            this.AddLabel(450, 90, 0, SkillName.Necromancy.ToString());         
            this.AddLabel(450, 115, 0, SkillName.Ninjitsu.ToString());   
            this.AddLabel(450, 140, 0, SkillName.Parry.ToString()); 
            this.AddLabel(450, 165, 0, SkillName.Peacemaking.ToString());     
            this.AddLabel(450, 190, 0, SkillName.Poisoning.ToString());         
            this.AddLabel(450, 215, 0, SkillName.Provocation.ToString());         
            this.AddLabel(450, 240, 0, SkillName.RemoveTrap.ToString());       
            this.AddLabel(450, 265, 0, SkillName.Snooping.ToString());      
            this.AddLabel(450, 290, 0, SkillName.Spellweaving.ToString()); 
            this.AddLabel(450, 315, 0, SkillName.SpiritSpeak.ToString());       
            this.AddLabel(450, 340, 0, SkillName.Stealing.ToString());        
            this.AddLabel(450, 365, 0, SkillName.Stealth.ToString());   
            this.AddLabel(450, 390, 0, SkillName.Swords.ToString()); 
            this.AddLabel(450, 415, 0, SkillName.Tactics.ToString()); 
            this.AddLabel(450, 440, 0, SkillName.Tailoring.ToString());  
            this.AddLabel(450, 465, 0, SkillName.TasteID.ToString());  
            //**********************************************************
            this.AddCheck(610, 65, 210, 211, false, (int)SkillName.Tinkering);
            this.AddCheck(610, 90, 210, 211, false, (int)SkillName.Tracking);
            this.AddCheck(610, 115, 210, 211, false, (int)SkillName.Veterinary);
            this.AddCheck(610, 140, 210, 211, false, (int)SkillName.Wrestling);
            this.AddLabel(635, 65, 0, SkillName.Tinkering.ToString());     
            this.AddLabel(635, 90, 0, SkillName.Tracking.ToString());         
            this.AddLabel(635, 115, 0, SkillName.Veterinary.ToString());   
            this.AddLabel(635, 140, 0, SkillName.Wrestling.ToString()); 
            //**********************************************************
        }

        public enum Buttons
        {
            Close,
            FinishButton,

        }
        public override void OnResponse(NetState state, RelayInfo info)
        {
            Mobile m = state.Mobile;

            switch (info.ButtonID)
            {
                case 0: { break; }
                case 1:
                    {

                        if (info.Switches.Length < switches)
                        {
                            m.SendGump(new SkilllimPickGump(m_SkillBall));
                            m.SendMessage(0, "You must pick {0} more skills.", switches - info.Switches.Length);
                            break;
                        }
                        else if (info.Switches.Length > switches)
                        {
                            m.SendGump(new SkilllimPickGump(m_SkillBall));
                            m.SendMessage(0, "Please get rid of {0} skills, you have exceeded the 7 skills that are allowed.", info.Switches.Length - switches);
                            break;

                        }
                                                       
                        else
                        {
                            
                            Server.Skills skills = m.Skills;

                            for (int i = 0; i < skills.Length; ++i)
                                skills[i].Base = 0;
                            for (int i = 0; i < 55; ++i)
                            {
                                if (info.IsSwitched(i))
                                    m.Skills[i].Base = val;
                            }

                            m_SkillBall.Delete();

                        }

                        break;
                    }

            }

        }

    }

    public class SkillBall3 : Item
    {
        [Constructable]
        public SkillBall3()
            : base(0xE73)
        {
            Weight = 1.0;
            Hue = 105;
            Name = "a seven GM limited skill ball";
            Movable = true;
        }

        public override void OnDoubleClick(Mobile m)
        {

            if (m.Backpack != null && m.Backpack.GetAmount(typeof(SkillBall3)) > 0)
            {
                m.SendMessage("Please choose  your 7 skills to set to 7x GM.");
                m.CloseGump(typeof(SkilllimPickGump));
                m.SendGump(new SkilllimPickGump(this));
            }
            else
                m.SendMessage(" You need to have the skill ball in your backpack.");

        }
                      
        public SkillBall3(Serial serial)
            : base(serial)
        {
        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);
            writer.Write((int)1); // version 
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);
            int version = reader.ReadInt();
            
        }

    }
}

Hope this helps!

Haw
 

romanthebrain

Sorceror
hawthornetr;829914 said:
I updated your skillball to do every skill listed and handle it based on the enumerator.



Hope this helps!

Haw


Ahhhhm ok ... but its AOS .. not UOR and you change the limited skillball. U need to change the unlimited to make it AOS.

and the statball is online :)

Greetings
 

hawthornetr

Sorceror
romanthebrain;830003 said:
Ahhhhm ok ... but its AOS .. not UOR and you change the limited skillball. U need to change the unlimited to make it AOS.

and the statball is online :)

Greetings

Heh thanks! Kinda new to whats aos and uor and t2a and well, you get it ;)

and greetings!
 

tpopcaz

Sorceror
question about the script. I am making a server with 600 skillcap and 250 statcap. How would I change the skillball to only let you choose 3 skills to 100.
 

ntony

Sorceror
A very cool script. Thanks a lot!


I suggest to add below lines to avoid exploit usage:

inside the gump, at the very beginning of OnResponse function:
public override void OnResponse( NetState state, RelayInfo info )
Code:
if ( m_SkillBall.Deleted )
				return;


in the skillball class, use this instead:
Code:
public override void OnDoubleClick( Mobile m )
        {
            [COLOR="Red"]if ( IsChildOf( m.Backpack) )[/COLOR]
            {
                m.SendMessage("Please choose  your 7 skills to set to 7x GM.");
                m.CloseGump(typeof(SkilllimPickGump));
                m.SendGump(new SkilllimPickGump(this));
            }
            else
                m.SendLocalizedMessage( 1042001 ); // That must be in your pack for you to use it.

        }


You may also add below line in the skill ball constructor to avoid it being stolen by player.
Code:
LootType = LootType.Blessed;


I highly recommend shard owners to add the piece of code in OnResponse function. It can avoid player to transfer the skill ball to other player after they have open the skill ball gump. That exploits.

The codes are just to provide some better ideas. No offence to the author. I really appreciate to his effort and save me bunches of time.
 

ntony

Sorceror
tpopcaz;834532 said:
question about the script. I am making a server with 600 skillcap and 250 statcap. How would I change the skillball to only let you choose 3 skills to 100.

search and change this line:

Code:
private int switches = [COLOR="Red"]7[/COLOR];
 

Sexy-Vampire

Sorceror
stat balls not leting me add stats i set my cap to 500 and put the right number in but it says your total stats are over the limit
 

jdubeau1986

Wanderer
help

How would i go about adding this to the pack of the first char created on that account, basically i would like to allow for 1, 7x gm skill ball per account no more.
 
Top