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!

Resource icon

SkillBallPlus.cs

Ixtabay

Sorceror
Ixtabay submitted a new resource:

SkillBallPlus.cs (version 1.0) - Clickable ball that gives 7x skills plus items

SkillBallPlus.cs is based on the original Skillball.cs, but has been updated with new skill information, and will also give the player items based on skill choices (i.e. a bow and arrows for archery)

Original Skillball.cs by Romanthebrain
Updates by Hawthornetr, ntony, JamzeMcC, MrNice, Ixtabay, and others since 2010

Code:
using System;
using Server;
using Server.Items;
using Server.Mobiles;
using Server.Network;
using Server.Gumps;
using Server.Misc;
 
namespace Server
{
    public class...

Read more about this resource...
 

Macil

Sorceror
Any chance this can be updated to make this list alphabetized? Would make it moderately quicker to dig through when setting up a character. =)

Other than that awesome rendition of a classic script!
 

Ixtabay

Sorceror
That's a good idea to alphabetise! I'm still trying to figure out how to attach a .cs file. I love the script library feature, but have not figured it out yet.
 

milva

Sorceror
Once you click on Add Resource (blue button) then choose from the drop down box if runuo 2.0 etc. from there you should be able to upload your cs file.
 

Macil

Sorceror
Hey, I did eventually get around to making it alphabetized but I can't seem to figure out why Imbuing, Throwing and Mysticism wont increase when players select them (aside from the obvious, they're SA skills). Also, I'm using ServUO so I'm guessing its a compatibility issue, but I've removed the ability to add items from selecting various skills because I crash every time the game tries to add them. If anyone knows how to fix these problems let me know.

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 SkillBallStarter m_SkillBall;
        private double val = 50;
        private static Item MakeNewbie( Item item )
        {
            if ( !Core.AOS )
           item.LootType = LootType.Newbied;
 
            return item;
        }
 
        public SkilllimPickGump(SkillBallStarter 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, 5120);
            this.AddLabel(67, 41, 1153, @"Please select your 7 starter skills - WARNING: Doing so will erase all other trained skills and is irreversible!");
            this.AddButton(80, 500, 2071, 2072, (int)Buttons.Close, GumpButtonType.Reply, 0);
            this.AddBackground(52, 60, 720, 430, 9350);
            this.AddImage(610, 338, 9000);
            this.AddPage(1);
            this.AddButton(690, 500, 2311, 2312, (int)Buttons.FinishButton, GumpButtonType.Reply, 0);
//Button X, Button Y,             
            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.Imbuing);
            this.AddCheck(240, 290, 210, 211, false, (int)SkillName.Inscribe);
            this.AddCheck(240, 315, 210, 211, false, (int)SkillName.ItemID);
            this.AddCheck(240, 340, 210, 211, false, (int)SkillName.Lockpicking);
            this.AddCheck(240, 365, 210, 211, false, (int)SkillName.Lumberjacking);
            this.AddCheck(240, 390, 210, 211, false, (int)SkillName.Macing);
            this.AddCheck(240, 415, 210, 211, false, (int)SkillName.Magery);
            this.AddCheck(240, 440, 210, 211, false, (int)SkillName.MagicResist);
            this.AddCheck(240, 465, 210, 211, false, (int)SkillName.Meditation);
            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.Imbuing.ToString());
            this.AddLabel(265, 290, 0, SkillName.Inscribe.ToString());       
            this.AddLabel(265, 315, 0, SkillName.ItemID.ToString()); 
            this.AddLabel(265, 340, 0, SkillName.Lockpicking.ToString());        
            this.AddLabel(265, 365, 0, SkillName.Lumberjacking.ToString());        
            this.AddLabel(265, 390, 0, SkillName.Macing.ToString());   
            this.AddLabel(265, 415, 0, SkillName.Magery.ToString()); 
            this.AddLabel(265, 440, 0, SkillName.MagicResist.ToString()); 
            this.AddLabel(265, 465, 0, SkillName.Meditation.ToString());
            
            // ********************************************************
            
            this.AddCheck(425, 65, 210, 211, false, (int)SkillName.Mining);
            this.AddCheck(425, 90, 210, 211, false, (int)SkillName.Musicianship);
            this.AddCheck(425, 115, 210, 211, false, (int)SkillName.Mysticism);
            this.AddCheck(425, 140, 210, 211, false, (int)SkillName.Necromancy);
            this.AddCheck(425, 165, 210, 211, false, (int)SkillName.Ninjitsu);
            this.AddCheck(425, 190, 210, 211, false, (int)SkillName.Parry);
            this.AddCheck(425, 215, 210, 211, false, (int)SkillName.Peacemaking);
            this.AddCheck(425, 240, 210, 211, false, (int)SkillName.Poisoning);
            this.AddCheck(425, 265, 210, 211, false, (int)SkillName.Provocation);
            this.AddCheck(425, 290, 210, 211, false, (int)SkillName.RemoveTrap);
            this.AddCheck(425, 315, 210, 211, false, (int)SkillName.Snooping);
            this.AddCheck(425, 340, 210, 211, false, (int)SkillName.Spellweaving);
            this.AddCheck(425, 365, 210, 211, false, (int)SkillName.SpiritSpeak);
            this.AddCheck(425, 390, 210, 211, false, (int)SkillName.Stealing);
            this.AddCheck(425, 415, 210, 211, false, (int)SkillName.Stealth);
            this.AddCheck(425, 440, 210, 211, false, (int)SkillName.Swords);
            this.AddCheck(425, 465, 210, 211, false, (int)SkillName.Tactics);
            this.AddLabel(450, 65, 0, SkillName.Mining.ToString());
            this.AddLabel(450, 90, 0, SkillName.Musicianship.ToString());
            this.AddLabel(450, 115, 0, SkillName.Mysticism.ToString());    
            this.AddLabel(450, 140, 0, SkillName.Necromancy.ToString());         
            this.AddLabel(450, 165, 0, SkillName.Ninjitsu.ToString());   
            this.AddLabel(450, 190, 0, SkillName.Parry.ToString()); 
            this.AddLabel(450, 215, 0, SkillName.Peacemaking.ToString());     
            this.AddLabel(450, 240, 0, SkillName.Poisoning.ToString());         
            this.AddLabel(450, 265, 0, SkillName.Provocation.ToString());         
            this.AddLabel(450, 290, 0, SkillName.RemoveTrap.ToString());       
            this.AddLabel(450, 315, 0, SkillName.Snooping.ToString());      
            this.AddLabel(450, 340, 0, SkillName.Spellweaving.ToString()); 
            this.AddLabel(450, 365, 0, SkillName.SpiritSpeak.ToString());       
            this.AddLabel(450, 390, 0, SkillName.Stealing.ToString());        
            this.AddLabel(450, 415, 0, SkillName.Stealth.ToString());   
            this.AddLabel(450, 440, 0, SkillName.Swords.ToString()); 
            this.AddLabel(450, 465, 0, SkillName.Tactics.ToString()); 
 
            //**********************************************************
 
            this.AddCheck(610, 65, 210, 211, false, (int)SkillName.Tailoring);            
            this.AddCheck(610, 90, 210, 211, false, (int)SkillName.TasteID);           
            this.AddCheck(610, 115, 210, 211, false, (int)SkillName.Throwing);
            this.AddCheck(610, 140, 210, 211, false, (int)SkillName.Tinkering);
            this.AddCheck(610, 165, 210, 211, false, (int)SkillName.Tracking);
            this.AddCheck(610, 190, 210, 211, false, (int)SkillName.Veterinary);
            this.AddCheck(610, 215, 210, 211, false, (int)SkillName.Wrestling); 
            this.AddLabel(635, 65, 0, SkillName.Tailoring.ToString());
            this.AddLabel(635, 90, 0, SkillName.TasteID.ToString());
            this.AddLabel(635, 115, 0, SkillName.Throwing.ToString());
            this.AddLabel(635, 140, 0, SkillName.Tinkering.ToString());     
            this.AddLabel(635, 165, 0, SkillName.Tracking.ToString());         
            this.AddLabel(635, 190, 0, SkillName.Veterinary.ToString());   
            this.AddLabel(635, 215, 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 SkillBallStarter : Item
    {
        [Constructable]
        public SkillBallStarter() :  base( 0xE73 )
        {
            Weight = 1.0;
            Hue = 1161;
            Name = "Quick Start 7x Skill Booster";
            Movable =  true;
        }
        public override void OnDoubleClick( Mobile m )
        {
 
            if (m.Backpack != null && m.Backpack.GetAmount(typeof(SkillBallStarter)) > 0)
            {
                m.SendMessage("Please choose your 7 skills to increase to 50 skill points.");
                m.CloseGump(typeof(SkilllimPickGump));
                m.SendGump(new SkilllimPickGump(this));
            }
            else
                m.SendMessage(" This must be in your backpack to function.");
           
        }
 
        public SkillBallStarter( 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();
}
     
    }     
}
 

jumpnjahosofat

Sorceror
Hope this isn't too late for some input. I was looking for a skill ball that works with the SVN and ran into this one. I read where you couldn't get it to work with the new skills and found the problem. Thought I would share it with you if you haven't fixed it yet for yourself. The fix is easy!

change this
Code:
for (int i = 0; i < 55; ++i)

to this

Code:
for (int i = 0; i < 58; ++i)

Again, hope it wasn't too late.:)
 

jamisoncrzy

Wanderer
Nevermind... Just figured out its only the imbuing. I seen Val on all of the lines with the skills so I misunderstood that.
 
Top