Altma
Initiate
(Rewrote thread)
I'm a complete novice to ServUO & C# and I'm trying to write a basic script to give +.1 skill on consuming an item.
I'm not sure what to place as a skill. Where can I find what skills are named?
I'm a complete novice to ServUO & C# and I'm trying to write a basic script to give +.1 skill on consuming an item.
Code:
using System;
using Server;
using Server.Items;
using Server.Gumps;
using Server.Mobiles;
using Server.Network;
namespace Server.Items
{
public class TamingBiscuit : Item
{
[Constructable]
public TamingBiscuit() : base( 0x09D2 )
{
LootType = LootType.Blessed;
Movable = true;
Weight = 0.0;
Name = "Taming Biscuit";
}
public override void OnDoubleClick( Mobile from )
{
PlayerMobile m;
if ( !IsChildOf( from.Backpack ) )
{
from.SendMessage ("That must be in your backpack for you to use it."); // That must be in your backpack for you to use it.
}
else if ( from.Taming >= 125)
{
from.SendMessage ("You have already reached 125.0 skill.");
}
else
{
from.Taming += .1;
from.SendMessage ( "You have gained +.1 Animal Taming");
Delete();
}
}
public TamingBiscuit ( Serial serial ) : base( serial )
{
}
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();
}
}
}
I'm not sure what to place as a skill. Where can I find what skills are named?
Last edited by a moderator: