ServUO Version
Publish Unknown
Ultima Expansion
Endless Journey
I want to make an item that will unequip if a players skill exceedes a certain amount in a skill. I have the call for CanEquip, which keeps them from putting it on. But if they remove that skill, equip the item, and put the skill back on, the items stays equipped.
Thoughts and suggestions welcome!

Shazzy :)
 
Add a check into onhit method
So it will check the skills after hit and weapon will drop into pack
And i m not sure if they can gain or remove skills in middle the of combat
if u re using some kind of skill stone just add a duration betwen skill changes like 10mins or cant while engaged a creature etc.
 
Last edited:
I would personally do it using the SkillGain EventSink rather than use a timer for a couple reasons. One, it will happen immediately upon gaining the appropriate amount of skill, where a timer might allow for the player to continue using it even if only for a short while. Secondly, adding additional timers to the game can lead to performance issues for the server and if it is a weapon that any number of players can obtain easily and in abundance as well as each weapon having it's own unique timer, it can add up quickly to bog the server down. Generally timers aren't too demanding and there are tons already going you don't even notice, but they definitely add up in the long run so it's best to use other methods that will achieve the same results when possible.
 
Yea i forget to tell skillgain but dunno if removing skills triggers skillgain.
Like you, I'm not sure how he's removing the skill and then gaining it back, but it should work either way I believe, though I could be wrong. If it doesn't work, I'd add an override if it is a weapon for OnBeforeSwing and have it do the skill check there to remove it. For armor or clothing place it in OnHit. For any general item, put it in PlayerMobile OnDamage and/or any other spot you'd want the check to be.

**Edit**
To clarify, I mean it should work when they regain the skill either way, not necessarily when they lose the skill. I don't think it would work for that.
 
Thanks by the by I am a She :)
I will look into the OnHit to see if that can work.

The main idea is for a piece of armor that if you exceed the skill of 20 or what ever I choose the armor will fall off.
If player uses a "soul stone" to trade skills off, the armor it will stay on right now, that is the problem. "Unless they Die"
I have it now if you try to equip it you cannot if your skill is over lets say 20 in taming or whatever skill I chose.

Thanks again!
 
Eeeh i always try to use person based pronunce. Onhit will solve your problem. Havefun ✌️
 
Last edited:
Back