Had a look for a script for a Rideable Tiger and the only one I could find was the ethy one by Goober so thought I should try and make one.

So the issues I have with it:
1 Line 22 When you add it it just adds the one colour and not either the light or dark one as intended, I might have the or in the wrong place Edit: Solved thanks to Ce Jayce and swiftorb
Code:
this.Body = 1254 | 1255;

2 Line 99 I had to comment it out as it gives an error
Code:
----------------------------------------------------------------------------
ServUO - [http://www.servuo.com] Version 0.5, Build 5160.3345
Publish 54
Core: Optimizing for 4 64-bit processors
RandomImpl: CSPRandom (Software)
Scripts: Compiling C# scripts...Failed with: 1 errors, 0 warnings
Errors:
+ Custom Systems/Mobs/Mounts/Tiger.cs:
    CS0246: Line 99: The type or namespace name 'WeaponAbility' could not be found (are you missing a using direct
ive or an assembly reference?)
Scripts: One or more scripts failed to compile or no script files were found.
- Press return to exit, or R to try again.

3 I borrowed the itemId from goobers tiger ethy and now if you have the dark tiger when you mount it, it changes to the light tiger Edit: Solved thanks to Ce Jayce and swiftorb

Any advice is greatly appreciated and constructive criticism (please be kind its my first time :))

Edit: Uploaded the new file.
 

Attachments

  • Tiger.cs
    4 KB · Views: 13
Last edited:
Hey there!
Take out your line
Code:
this.Body = 1254 | 1255;
The compiler is compiling that code and setting the id to 1254 and then to 1255 with that - so it will always end up at 1255

Code:
            switch (Utility.Random(2))
            {
                case 0:
                    {
                        this.BodyValue = 1254;
                        this.ItemID = *light ID here*;
                        break;
                    }
                case 1:
                    {
                        this.BodyValue = 1255;
                        this.ItemID = *dark ID here*;
                        break;
                    }
            }
I took the above code from Nightmare.cs and edited it slightly - you'll need to put in the item ids of both the male/female (dark/light) versions but that will randomly select one of the two.

Hope that helps somewhat! :)
 
Code:
      switch ( Utility.Random( 2 ) )
       {
         case 0:
         {
           BodyValue = 1254;
           ItemID = 16071; //male
           break;
         }
         case 1:
         {
           BodyValue = 1255;
           ItemID = 16072; //female
           break;
         }
       
  }
 
Awesome that works so they spawn
I would like to know the ID for the statue if you shrink it ? This script is shrinks to a ball :(

I am going to try and find a shrink system and then mess around with the values when its shrunk then change it if I can work out how, also I have an idea for a cool custom drop for it, not sure if it will work though:confused: however I can try and if it doesn't work I will have found one way of not doing it :).

Any ideas on why the WeaponAbility throws an error?
 
Any ideas on why the WeaponAbility throws an error?
That's an easy one, just got to add
Code:
using Server.Items;
just under the other two:
Code:
using System;
using Server.Mobiles;

WeaponAbility is an Item method rather than a Mobile one so you need to make sure you point the code to use that reference too! :)
 
Also,
The ItemID for the tiger statuette you want when it's shrunk it 38980 ! :)

Ok I give up I have no idea where to put that, I'm guessing it possibly has to go in shrink.cfg?

Quick question I'm working on the drop for the tiger and am not sure whether Utility.Random( 53 ) = random number from 0-52?
and will Utility.RandomMinMax( 10 ) = random number from 0-9 if so, if I want to add 1 to that should I make it
Utility.RandomMinMax( 10 +1 ) or Utility.RandomMinMax( 10 ) +1?
 
Ok I give up I have no idea where to put that, I'm guessing it possibly has to go in shrink.cfg?
Not sure which shrink system you're using but the ID for it will need to go in there rather than the Tiger.cs file


Code:
(Utility.RandomMinMax( 10 ) +1 )
would be between 1 and 9
and
Code:
Utility.RandomMinMax( 10 + 1 )
would be between 0 and 10 as you're basically doing Utility.RandomMinMax( 11 ) there.
 
hmm :confused: so if I wanted to get a value between 1 and 10 would this work or is it going to return 1-9?
Code:
int value = Utility.RandomMinMax( 1, 10 )

sorry I'm new to C# and I forgot the [ code ] tags last time and only put one value in :rolleyes:

Thanks for your help
 
hehe no worries on the code tags, not that important for a single line of code just helps for long scripts :p
RandomMinMax(1, 10) would give you 1 - 10 so that's what you're after by the sounds of things! :)

I'd encourage you to post your script in the Archive once you've finished it - You don't have to of course as it's your work but it may be nice for others :)
 
I intend to, I'm just working on the loot drop for it, hopefully you and others will like it, I may need more help soon though, probably tomorrow as I have been up for nearly 24 hours lol, my first script is turning quite complicated
 
Well i'll be around to help out if you need as i'm sure others will be! :)
Get some rest and come back to this tomorrow! :)
 
You will need to create a script for this if you want to give the statue as a reward or drop item.
 
I have had this script for a long time and used it in my mechanical pet crafting
Just change the name to what your tiger is named .
(when you click the statue you will get the ridable tiger which you scripted.)
MechanicalPetStatue <<use the name of your tiger script
also if you do not want the pet to be bonded when released change this
dragon.IsBonded = true; <<change to false
Only change the name to that of which your tiger script is named :)
Note: this does not create an evo pet , just works with a timer to release the pet
 

Attachments

  • MechanicalPetStatue.cs
    3.1 KB · Views: 7
I was actually thinking I had to add a Tiger statue as my edit to Shrink.cfg hasn't done anything.
I tried these

Code:
1254 38980
1255 38980

and also
Code:
1254 0x9844
1255 0x9844
 
I believe you need to add it to bodytable.cs also, since this is a new mount (numbers)
this script you can find in the Data folder
 
OK I'm stuck been trying to solve this for hours, I have two versions of this script one(TigerFurBoots) shows the skill mod but won't take it over the skill cap, the other(TigerFurBoots1) doesn't show the skill mod but will take it over the skill cap, how do I get it to show the skill mod and take it over the skill cap.
 

Attachments

  • TigerFurBoots.cs
    11.5 KB · Views: 1
  • TigerFurBoots1.cs
    13 KB · Views: 2
You could do something like this.

Code:
//Created by DelBoy aka Fury on 18/02/14
//Increases skill over cap but doesn't indicate what the skill mod is
using System;
using Server;
using Server.Items;

namespace Server.Items
{
    public class TigerFurBoots1 : FurBoots
    {
        public string SkillBonus;
        private SkillMod m_SkillMod0;
        public int Value = Utility.RandomMinMax(1, 10);

        [Constructable]
        public TigerFurBoots1()
        {
            Name = "Tiger Fur Boots";
            this.Hue = 1359;
            base.Attributes.Luck = 134;

            DefineMods();
        }

        private void DefineMods()
        {
            switch (Utility.Random(57))
            {
                case 0:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.ArmsLore, true, Value);
                        SkillBonus = String.Format("Increases Arms Lore by {0}%", Value);
                        break;
                    }

                case 1:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Begging, true, Value);
                        break;
                    }

                case 2:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Camping, true, Value);
                        break;
                    }

                case 3:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Cartography, true, Value);
                        break;
                    }

                case 4:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Forensics, true, Value);
                        break;
                    }

                case 5:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.ItemID, true, Value);
                        break;
                    }

                case 6:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.TasteID, true, Value);
                        break;
                    }

                case 7:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Anatomy, true, Value);
                        break;
                    }

                case 8:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Archery, true, Value);
                        break;
                    }

                case 9:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Fencing, true, Value);
                        break;
                    }

                case 10:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Focus, true, Value);
                        break;
                    }

                case 11:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Healing, true, Value);
                        break;
                    }

                case 12:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Macing, true, Value);
                        break;
                    }

                case 13:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Parry, true, Value);
                        break;
                    }

                case 14:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Swords, true, Value);
                        break;
                    }

                case 15:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Tactics, true, Value);
                        break;
                    }

                case 16:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Throwing, true, Value);
                        break;
                    }

                case 17:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Wrestling, true, Value);
                        break;
                    }

                case 18:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Alchemy, true, Value);
                        break;
                    }

                case 19:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Blacksmith, true, Value);
                        break;
                    }

                case 20:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Fletching, true, Value);
                        break;
                    }

                case 21:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Carpentry, true, Value);
                        break;
                    }

                case 22:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Cooking, true, Value);
                        break;
                    }

                case 23:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Inscribe, true, Value);
                        break;
                    }

                case 24:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Lumberjacking, true, Value);
                        break;
                    }

                case 25:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Mining, true, Value);
                        break;
                    }

                case 26:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Tailoring, true, Value);
                        break;
                    }

                case 27:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Tinkering, true, Value);
                        break;
                    }

                case 28:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Bushido, true, Value);
                        break;
                    }

                case 29:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Chivalry, true, Value);
                        break;
                    }

                case 30:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.EvalInt, true, Value);
                        break;
                    }

                case 31:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Imbuing, true, Value);
                        break;
                    }

                case 32:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Magery, true, Value);
                        break;
                    }

                case 33:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Meditation, true, Value);
                        break;
                    }

                case 34:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Mysticism, true, Value);
                        break;
                    }

                case 35:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Necromancy, true, Value);
                        break;
                    }

                case 36:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Ninjitsu, true, Value);
                        break;
                    }

                case 37:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.MagicResist, true, Value);
                        break;
                    }

                case 38:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Spellweaving, true, Value);
                        break;
                    }

                case 39:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.SpiritSpeak, true, Value);
                        break;
                    }

                case 40:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.AnimalLore, true, Value);
                        break;
                    }

                case 41:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.AnimalTaming, true, Value);
                        break;
                    }

                case 42:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Fishing, true, Value);
                        break;
                    }

                case 43:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Herding, true, Value);
                        break;
                    }

                case 44:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Tracking, true, Value);
                        break;
                    }

                case 45:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Veterinary, true, Value);
                        break;
                    }

                case 46:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.DetectHidden, true, Value);
                        break;
                    }

                case 47:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Hiding, true, Value);
                        break;
                    }

                case 48:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Lockpicking, true, Value);
                        break;
                    }

                case 49:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Poisoning, true, Value);
                        break;
                    }

                case 50:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.RemoveTrap, true, Value);
                        break;
                    }

                case 51:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Snooping, true, Value);
                        break;
                    }

                case 52:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Stealing, true, Value);
                        break;
                    }

                case 53:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Stealth, true, Value);
                        break;
                    }

                case 54:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Discordance, true, Value);
                        break;
                    }

                case 55:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Musicianship, true, Value);
                        break;
                    }

                case 56:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Peacemaking, true, Value);
                        break;
                    }

                case 57:
                    {
                        m_SkillMod0 = new DefaultSkillMod(SkillName.Provocation, true, Value);
                        break;
                    }
            }
        }

        private void SetMods(Mobile wearer)
        {
            wearer.AddSkillMod(m_SkillMod0);
        }

        public override bool OnEquip(Mobile from)
        {
            SetMods(from);
            return true;
        }

        public override void OnRemoved(object parent)
        {
            if (parent is Mobile)
            {
                Mobile m = (Mobile)parent;
                m.RemoveStatMod("TigerFurBoots");

                if (m_SkillMod0 != null)
                    m_SkillMod0.Remove();
            }
        }

        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);
            list.Add(SkillBonus);
        }

        public TigerFurBoots1(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();
        }

    }
}

What I have changed from your second script is the following.

First I moved your int Value = Utility.RandomMinMax(1, 10); to the global scope so we can use it in other parts of your script.

Then I added a string to record the skill bonus. This is the private string SkillBonus;

I then added:
Code:
SkillBonus = String.Format("Increases Arms Lore by {0}%", Value);
This makes our SkillBonus string contain the bonus. You will need to add this to every case. I just added it to the first to give an example.

Then to show it on the actual properties of the item I added the following override:
Code:
        public override void GetProperties(ObjectPropertyList list)
        {
            base.GetProperties(list);
            list.Add(SkillBonus);
        }
This overrides the property list of the item but since we want the actual properties aswell I added base.GetProperties(list); and added our bonus after it.


I did not test the code so there may be some problems but none jump right out at me!

If you have any problems let me know.
 
Actually you do not need to move int Value = Utility.RandomMinMax(1, 10);

I moved it because I was going to go another route but changed my mind. It can stay where it is.
 
Just one more thing and its all done :)

on line 43 after clicking on the fur it removes it from the pack, so I have had to add a new one to the pack how do I fix that?

Code:
using System;
using Server;

namespace Server.Items
{
    public class TigerFur : Item
    {
        [Constructable]
        public TigerFur()
            : this(1)
        {
        }
        [Constructable]
        public TigerFur(int amount)
            : base(0x11F4)
        {
            Name = "Tiger Fur";
            Stackable = false;
            Hue = 1359;
            Weight = 0.1;
            Amount = amount;
        }

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

        public override void OnDoubleClick(Mobile from)
        {


            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);
            }
            else
            {
                if (from.Skills[SkillName.Tailoring].Base < 120.00)
                {
                    from.SendMessage("Only a Legendary Tailor can use such a item.");
                    from.AddToBackpack(new TigerFur());
                }
                else
                {
                    from.SendMessage("You create a piece of clothing from the Tiger fur.");

                    switch (Utility.Random(3))
                    {
                        case 0:
                            {
                                from.AddToBackpack(new TigerFurBoots());
                                break;
                            }

                        case 1:
                            {
                                from.AddToBackpack(new TigerFurCape());
                                break;
                            }

                        //If you dont want the gargish sash comment out this and decrease the random by one    
                        case 2:
                            {
                                from.AddToBackpack(new GargishTigerFurSash());
                                break;
                            }
                    }
                }
                this.Delete();
            }

        }

        public override void Serialize(GenericWriter writer)
        {
            base.Serialize(writer);

            writer.Write((int)0); // version 
        }

        public override void Deserialize(GenericReader reader)
        {
            base.Deserialize(reader);

            int version = reader.ReadInt();
        }
    }
}
 
Move this.Delete(); to the scope of your else statement.

Code:
 public override void OnDoubleClick(Mobile from)
        {


            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);
            }
            else
            {
                if (from.Skills[SkillName.Tailoring].Base < 120.00)
                {
                    from.SendMessage("Only a Legendary Tailor can use such a item.");
                    from.AddToBackpack(new TigerFur());
                }
                else
                {
                    from.SendMessage("You create a piece of clothing from the Tiger fur.");

                    switch (Utility.Random(3))
                    {
                        case 0:
                            {
                                from.AddToBackpack(new TigerFurBoots());
                                break;
                            }

                        case 1:
                            {
                                from.AddToBackpack(new TigerFurCape());
                                break;
                            }

                        //If you dont want the gargish sash comment out this and decrease the random by one    
                        case 2:
                            {
                                from.AddToBackpack(new GargishTigerFurSash());
                                break;
                            }
                    }
                }
                this.Delete();
            }
to
Code:
 public override void OnDoubleClick(Mobile from)
        {


            if (!IsChildOf(from.Backpack))
            {
                from.SendLocalizedMessage(1042001);
            }
            else
            {
                if (from.Skills[SkillName.Tailoring].Base < 120.00)
                {
                    from.SendMessage("Only a Legendary Tailor can use such a item.");
                    from.AddToBackpack(new TigerFur());
                }
                else
                {
                    from.SendMessage("You create a piece of clothing from the Tiger fur.");

                    switch (Utility.Random(3))
                    {
                        case 0:
                            {
                                from.AddToBackpack(new TigerFurBoots());
                                break;
                            }

                        case 1:
                            {
                                from.AddToBackpack(new TigerFurCape());
                                break;
                            }

                        //If you dont want the gargish sash comment out this and decrease the random by one    
                        case 2:
                            {
                                from.AddToBackpack(new GargishTigerFurSash());
                                break;
                            }
                    }
                this.Delete();
                }
            }
 
Thanks I was going to make it so it would make all clothing slot items but figured it would be a bit OTT so making just fur items made more sense. I'm still trying to figure out how to get the shrunk tiger into a tiger and not a ball :confused:

Hopefully by the time I work it out I will have thought of something new to make for my next release :D
 
Ronins one, although I'm not sure its installed correctly as it says
Code:
using CustomsFramework.Systems.ShrinkSystem;
and there is no shrink system in customsframework.systems
 
I don't use it unfortunately - If it was a plug 'n' play system i'd drop it in to a fresh server and see what I get but don't want to do all the distro edits to get it working.

If you post up bits of the code that you think are related and how it handles other shrinked pets I might be able to help you with it. Can't promise anything though! :p
 
No I haven't yet, my servers not even up atm too busy in vs2013, I will have a look at it though next time I start the server
 
Maybe thats my problem I didn't do any distro edits, apart from dropping shrink.cfg into the Data folder, although it shrinks everything like its supposed to.
 
Hmm i'm not sure which version of the shrink system you're using then? - The one I have up in front of me (from RunUO) looks like it requires distro edits before it even compiles
 
The shrink system alone does not require distro edits if I remember correctly it is the full blown FS animal taming system that does.
 
I put these into the Shrink.cfg
Code:
# Tigers

1254 0x4E6
1255 0x4E7

My BodyTable.cfg already had the Tigers at the Bottom
Code:
1253   Human   # LORD BLACKTHORNE
1254   Animal   # Tiger
1255   Animal   # Tiger
 
Back