First here's a script that's missing in the subscripts folde under 'magery'.
endStrength.src
Code: Select all
/*
* $Id: endStrength.src 921 2007-02-09 21:00:00Z tekproxy with a tiny mod by Yukiko to turn end Cunning to endStrength $
*
*/
use uo;
use os;
include "include/attributes";
program TimedScript_EndStrength(params)
var mobile := params[1];
var points := CInt(GetObjProperty(mobile, "StrengthMod"));
AP_ModifyStatMod(mobile, STRENGTH, -(points));
EraseObjProperty(mobile, "StrengthMod");
return 1;
endprogram
*grins*
Now on to a problem I am having with the timed scripts. The mods aren't being removed properly after a log out and reconnect or login.
When the login script gets run after a complete logout I get a SysMessage from TS_StartController that the script is already running.
The mods stick and, if they are cast on yourself, for some reason this prevents you from casting another spell because it trips the "protection clause" in spellSTarter.
"Protection clause" of spellStarter:
Code: Select all
if ( !protection )
// There is a small chance, perhaps, that the mobile is damaged and then regens
// or is healed enough in the ~50ms delay between checking. It could be more
// accurate to grab the pid from ApplyDamageEX and send a damaged event to this
// script, on top of also checking the health.
if ( orig_hp > GetBaseStrength(mobile) )
SendSysMessage(mobile, "Your concentration is disturbed, thus ruining thy spell.", color := 33);
FailSpell(mobile);
PlaySoundEffect(mobile, SFX_SPELL_FAIL);
PlayObjectCenteredEffect(mobile, FX_SPELL_FAIL, 5, 50);
return 0;
endif
endif
I must admit that I have no clue what's happening there or with the timed script thingy. Tek or Aus might need to look at that. I am writing a work around until it's fixed.