• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

TFS 0.X How to set stats temporally

samandriel

Active Member
Joined
Oct 19, 2016
Messages
242
Solutions
1
Reaction score
46
I want to set 4 stats (-50%hp, +50%mp, +atkspeed, storage)

Thats how to set:

1 hp to -50% hp

deBuff = getCreatureMaxHealth(cid)
setCreatureMaxHealth(cid, deBuff)

2 mp to +50% mp

buff = getCreatureMana(cid)
setCreatureMaxMana(cid, buff)

3 +atk speed (Lua Function - doPlayerSetExtraAttackSpeed(cid, speed) (https://otland.net/threads/doplayersetextraattackspeed-cid-speed.58945/))
doPlayerSetExtraAttackSpeed(cid, 400) -- atk speed = 500-400=100

to remove extra atk speed:
doPlayerSetExtraAttackSpeed(cid, 0) -- back to normal

4 set storage
setPlayerStorageValue(cid, 100)

But how to set this 4 stats temporally, i mean, set this like utani gran hur, utito tempo...
After some time it stops and if player logout or something this not save?
 
Last edited:
Top