Hello
I'm scripting some command which, among other things, unequip the player while it is offline.
Unfortunately, if the player is wearing for example some skill-related item, its skill isn't recalculated, because the Recalcvitals() return this error:
error{ errortext = "Mobile is offline" }
Is there a way around this?
thanks
-xeon
Recalcvitals() on offline character
Re: Recalcvitals() on offline character
If it returns an error, set a prop on them to recalc. Then in your login/reconnect scripts, look for the prop, recalc, then erase.
Re: Recalcvitals() on offline character
Thanks for your help CWO.
It is an idea the one you said.
Unfortunately the problem is little more complex. The function which is causing me trouble is in reality the GetAttributeTemporaryMod(), which return the same error
error{ errortext = "Mobile is offline" }
What do you suggest? Should I put in a CProp the sum of all #BonusSkill for all skills and recalculate them at logon manually, bypassing the unequip.inc ?
It is an idea the one you said.
Unfortunately the problem is little more complex. The function which is causing me trouble is in reality the GetAttributeTemporaryMod(), which return the same error
error{ errortext = "Mobile is offline" }
What do you suggest? Should I put in a CProp the sum of all #BonusSkill for all skills and recalculate them at logon manually, bypassing the unequip.inc ?
Re: Recalcvitals() on offline character
I would say your problem is a different one if you want to work with offline mobiles you need OfflineMobileRef's, you get them for example with SystemFindObjectBySerial(serial,SYSFIND_SEARCH_OFFLINE_MOBILES)
Re: Recalcvitals() on offline character
Well, good suggestion, but unfortunately not working too.
I've tried getting the mobile ref with SystemFindObjectBySerial(serial,SYSFIND_SEARCH_OFFLINE_MOBILES) , and then working on player using this, but the GetAttributeTemporaryMod() still returns that error.
I've tried getting the mobile ref with SystemFindObjectBySerial(serial,SYSFIND_SEARCH_OFFLINE_MOBILES) , and then working on player using this, but the GetAttributeTemporaryMod() still returns that error.
Re: Recalcvitals() on offline character
Well, tired of this message, I've scripted around it.
I set a CProp on the offline mobile.
Then, when the mobile login, I do what I've to do to it and erase the CProp.
bye
-xeon
I set a CProp on the offline mobile.
Then, when the mobile login, I do what I've to do to it and erase the CProp.
bye
-xeon