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!

how to make negative skills

Nine_Coronas

Wanderer
how to make negative skills

i want to make a brace that will be for training taming and drop the taming/lore skills by 100... is this possible?
heres what i got so far and it didnt work...
using System;
using Server;
using Server.Mobiles;
using Server.Network;
using System.Collections;

namespace Server.Items
{
public class tamerstrainingring : GoldRing
{
//public override int LabelNumber{ get{ return 1061102; } } // Ring of the Vile
public override int ArtifactRarity{ get{ return 42069; } }

private Mobile m_Owner; // i added for ownership

[CommandProperty( AccessLevel.GameMaster )]
public Mobile Owner
{
get{ return m_Owner; }
set{ m_Owner = value; }
}
[Constructable]
public RingOfTheRanger()
{

Name = "TaMeRs TrAiNiNg RiNg";
Hue = 2855;
SkillBonuses.SetValues( 0, SkillName.AnimalTaming, -100.0 );
SkillBonuses.SetValues( 1, SkillName.AnimalLore, -100.0 );
SkillBonuses.SetValues( 2, SkillName.Veterinary, -100.0 );
LootType = LootType.Blessed;
}

public RingOfTheRanger( Serial serial ) : base( serial )
{
}
public override bool OnEquip( Mobile from )
{

if( m_Owner == null )
{
m_Owner = from;
base.OnEquip( from );
from.FollowersMax = 10;
from.SendMessage( "This ring now belongs to you, and only you!" );
}
else if( from == m_Owner || from.AccessLevel >= AccessLevel.GameMaster )

{
base.OnEquip( from );
from.FollowersMax = 10;
from.SendMessage( "You now have 10 max followers" );
}
else
{
from.SendMessage( "This does not belong to you." );
return false;
}
return true;
}
public override void OnRemoved( object parent )
{

if ( parent is Mobile )
{
((Mobile)parent).FollowersMax = 5;
((Mobile)parent).SendMessage("Your max followers has just been reduced to 5");
}



}

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

writer.Write( (int) 0 );
}

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

int version = reader.ReadInt();
}
}
}
 
it does not like negative numbers for the skill levels

what you can do is look at the training jewelry i submitted in the script release section (it mi9ght be in the recent archive files also, just below that section)

it is set up for lower numbers than 100, but will show you best bet to do on it

only other way whould be to get their origionl skills value, save it as a variable (make sure to serialize it), set the skill then to "1" (most skills to not train at 0 level) - habe them train
then when they take it off - it sets their skill to the "new" level -1 + origional skill

but my jewelry is designed to work with the skill once it is over that amount (i.e. 20 - which is buyable) so there is no need for the extra variable, etc
 
i can not find them either lol

so here is one of them, they were all the same except the base jewelry parts
 

Attachments

  • TrainingBracelet.cs
    3.4 KB · Views: 26
no - it only lowers the one skill that it gets assigned with

to make something to lower all skills to 0 and then go back up when off - would be a royal pain in the arse to make - have to make 54 temp skill holder spots, record the skills, 0 them out, then when removed read the stored numbers and add them to the new skill amounts

the only thing this bracelet does - is when made - it picks a random skill

it then starts at "10" for the amount of skill to be lowered
it checks to make sure they have at least 10 in that skill - if now they can not equip it
if they do then it lowers the skill by 10
when unequiped it add 10 bnack in
it then lowers itself down to "9"

so this way it has 10 wearings, and loses power each time - so they are only good for so long
 
Top