Page 1 of 1
Spells Bug
Posted: Thu Dec 27, 2007 8:40 am
by ELSoft
paralyze.src
Code: Select all
use uo;
use os;
include ":magery:spells";
include ":timedscripts:timedScripts";
program SpellScript_Paralyze(params)
var mobile := params[1];
var info := params[2];
var targ := params[3];
params := 0;
if ( !MS_MobileCheck(mobile, targ) )
return 0;
endif
MS_PlaySpellSFX(info.spell_id, targ);
MS_PlaySpellGFX(info.spell_id, targ, mobile);
// Duration: ((caster Eval Int/10) - ((target Resist Magic/10)) * 3 seconds
var duration := CInt((AP_GetSkill(mobile, EVALUATING_INTELLIGENCE) - (AP_GetSkill(targ, RESISTING_SPELLS) / 10)) * 3);
TS_StartTimer(targ, "Paralysis", duration);
endprogram
the spell duration is wrong, this should be
var duration := CInt((AP_GetSkill(mobile, EVALUATING_INTELLIGENCE)/10 - AP_GetSkill(targ, RESISTING_SPELLS) / 10) * 3);
or
var duration := CInt( ( (AP_GetSkill(mobile, EVALUATING_INTELLIGENCE) - AP_GetSkill(targ, RESISTING_SPELLS)) / 10) * 3);
Posted: Thu Jan 24, 2008 12:52 pm
by ELSoft
There is another little bug in the spell Incognito more specifically in the endIncognito.src.
At the end of the script is missing a
EraseObjProperty(mobile, "Incognito");
because if you need to know when a player is "Incognito", allways
appear that this.
Re: Spells Bug
Posted: Fri Jun 29, 2012 7:56 pm
by Ventura
POLDistro99.
Hi everyone,
I am having problem with any kind of spells that changes the character status like boosts or curses... the client stucks and everytime i try to login with that character the client stucks again.
Here the code for bless
pkg\systems\spells\spellScripts\circle3\bless.src
------------------------------------------------------------------------------------------------------------------------------------
use uo;
use os;
include ":spells:spells";
include ":timedscripts:timedScripts";
program SpellScript_Bless( params )
var mobile := params[1];
var info := params[2];
var targ := params[3];
//var circle := SPELL_GetCircle( info.spell_id );
params := 0;
if( !SPELL_MobileCheck( mobile, targ ))
return 0;
elseif( GetObjProperty( targ, "BlessMod" ))
SendSysMessage( mobile, "Already under the influence!" );
return 0;
elseif( GetObjProperty( targ, "CurseMod" ))
SendSysMessage( mobile, "Already under the influence!" );
return 0;
endif
SPELL_PlaySpellSFX( info.spell_id, targ );
SPELL_PlaySpellGFX( info.spell_id, targ, mobile );
var amount := SPELL_GetAmount( mobile ),
duration := SPELL_GetDuration( mobile );
SendBoostMessage( mobile, targ, "bless", amount, duration );
TS_StartTimer( targ, "Bless", duration, amount, mobile );
return 1;
endprogram
After some tests i found out that the function "TS_StartTimer( targ, "Bless", duration, amount, mobile );" is causing the problem...
i also found this ( CProp %TimerList% d1:S5:Blesst4:S8:durationi3300S7:endtimei735220S5:leveli61S4:nameS5:Bless ) inside POL99\Distro\data\pcs.txt and deleting it fix the bug so i can log in again without any problem.
heres the code for TS_StartTimer() function
pkg\systems\timedScripts\include\timedscripts.inc
------------------------------------------------------------------------------------------------------
function TS_StartTimer( mobile, timer_name, duration, level:=0, attacker:=0 )
duration := CInt( duration );
if( duration < 1 )
return error{"errortext":="Error::TS_StartTimer() - Duration must be greater than 0."};
endif
var event := struct;
event.+type := EVENT_ADD_TIMER;
event.+name := CStr(timer_name);
event.+amount := duration;
event.+level := CInt(level);
event.+attacker := attacker;
var process := TS_GetControllerProcess( mobile, START_CONTROLLER );
return process.SendEvent( event );
endfunction
Can anyone help me to fix this problem?
thanks everyone.
Re: Spells Bug
Posted: Fri Jun 29, 2012 9:39 pm
by Ventura
Ok, I fix it just by changing the client version from 4.0.0 to 5.0.6c and the problem is gone...
Well if someone is having this problem... that`s now to fix it.
Thanks distro team.
Re: Spells Bug
Posted: Sun Oct 21, 2012 10:21 pm
by *Edwards
It's because distro099 actually uses the buff icon system. I'm not sure when exactly that feature was added to client but 6.0.1 has it and it works well. I may have added a link to allow or disallow the feature in pkg/systems/timedScripts/config/settings.cfg