Hi there!
I have a very serious problem.
I used the distro script as a server,and some of my friends are playing in it.
One of them found a BUG to make the character’s Stats to increased to a high degree you cannot imagine.
They used the "Bless" magic to buff the character,and logoff,and wait a few minutes to let the character logoff completely that means others cannot see this character.Then they logon and the stats goes up,the value exactly the same as the "bless" spell,and it will never goes down.
I used the ".info" to check this,I found that the values were all Statsmods,and even the buff time goes out,the statsmods were still there.
I love this script and I want to make a nice shard for my friends.
But my ability is limited.
So could someone please tell me how to fix this?
I'll very appreciate your help.
Sorry for my bad English.
Have a nice day!Thanks a lot!
Could someone heeeeelp me? TAT
Moderators: POL Developer, Distro Developer
Re: Could someone heeeeelp me? TAT
FIrst of all stop duping posts, you wrote once and thats more than enough.
Make sure that you have basic stats in CProps of your character.
Write login script that will reset character skills to basic valuses.
After that remove CProp.
Make sure that you have basic stats in CProps of your character.
Write login script that will reset character skills to basic valuses.
After that remove CProp.
Re: Could someone heeeeelp me? TAT
I'm sorry for the duping posts.I just very worried about this.aderal wrote:FIrst of all stop duping posts, you wrote once and thats more than enough.
Make sure that you have basic stats in CProps of your character.
Write login script that will reset character skills to basic valuses.
After that remove CProp.
I found the timescript has the endbless.src,and in that config like:
Code: Select all
TimerElem Bless
{
Name Bless
Script subScripts/magery/Bless
EndScript subScripts/magery/EndBless
LogOffScript subScripts/magery/EndBless
StopOnDeath 1
BuffIcon 1048
}
Code: Select all
use uo;
use os;
include ":attributes:attributes";
program TimedScript_EndBless( params )
var mobile := params[1];
params := 0;
var points := CInt( GetObjProperty( mobile, "BlessMod" ));
AP_ModifyStatMod(mobile, DEXTERITY, -( points ));
AP_ModifyStatMod(mobile, STRENGTH, -( points ));
AP_ModifyStatMod(mobile, INTELLIGENCE, -( points ));
EraseObjProperty( mobile, "BlessMod" );
return 1;
endprogram
where should I to fix this?
Re: Could someone heeeeelp me? TAT
Sloved!
Hell yeah!
I found the problem is
this bad thing in Bless and others BUFF/DEBUFF scripts
I changed like this:
建议POL官方团队将Distro的脚本内容修正为我修改的内容
祖鲁中国&黑白工会
Suggest the POL official team to modify the content of the Distro script to modify my content
ZuluCN Alucardxlx[Black&White Guild]
Hell yeah!
I found the problem is
Code: Select all
AP_ModifyStatMod
I changed like this:
Code: Select all
use uo;
use os;
include ":attributes:attributes";
program TimedScript_Bless( params )
var defender := params[1],
//attacker := params[2],
points := params[3];
params := 0;
SetObjProperty( defender, "BlessMod", points );
AP_SetStatMod( defender, DEXTERITY, points );//修改 "AP_ModifyStatMod" 为 "AP_SetStatMod"
AP_SetStatMod( defender, STRENGTH, points );//让人物登录时不再增涨三围属性,其他buff同理
AP_SetStatMod( defender, INTELLIGENCE, points );//By 祖鲁中国 Alucardxlx
return 1;
endprogram
祖鲁中国&黑白工会
Suggest the POL official team to modify the content of the Distro script to modify my content
ZuluCN Alucardxlx[Black&White Guild]
Re: Could someone heeeeelp me? TAT
I think the problem is elsewhere.
On line 79 of /pkg/systems/timedScripts/timerControl.src you should see:
AddNewTimer( mobile, event, timer_list, elem_info );
change it to
AddExistingTimer( mobile, event, timer_list, elem_info );
Should fix the problem.
On line 79 of /pkg/systems/timedScripts/timerControl.src you should see:
AddNewTimer( mobile, event, timer_list, elem_info );
change it to
AddExistingTimer( mobile, event, timer_list, elem_info );
Should fix the problem.
Re: Could someone heeeeelp me? TAT
You necromancer...
Re: Could someone heeeeelp me? TAT
As I seem to have unofficially become the "maintainer" of the "Distro" as well as the Distro_Alt repos I have made the change posted by "Necromancer" DevGIB. Please post if that fix works or doesn't work.
Re: Could someone heeeeelp me? TAT
The logic behind why this fix should work (and from my testing does), That particular line is within Start Up function which is run when you log back in.
As the timers effects are already applied if it runs "AddNewTimer" it runs the bless script again which applies a new bless.
So yes changing bless to check if bless is already applied from within the bless script will fix the problem, however it will only fix it for bless and the fault could arise somewhere else and with other scripts which could have larger effects but less known because they aren't as visual.
Changing it to "AddExistingTimer" just gets the timer running again so that it continues to count down but doesn't apply the bless effect again.
As the timers effects are already applied if it runs "AddNewTimer" it runs the bless script again which applies a new bless.
So yes changing bless to check if bless is already applied from within the bless script will fix the problem, however it will only fix it for bless and the fault could arise somewhere else and with other scripts which could have larger effects but less known because they aren't as visual.
Changing it to "AddExistingTimer" just gets the timer running again so that it continues to count down but doesn't apply the bless effect again.
Re: Could someone heeeeelp me? TAT
I think your logic makes sense as far as I understand the "Distro" DevGIB. I mean the name of the function implies that it's not adding but taking an existing timer so it makes sense to me. That's why I applied your fix to the "Distro". I'd still like feedback just to make sure. It's always prudent to verify these things.