samandriel
Active Member
- Joined
- Oct 19, 2016
- Messages
- 242
- Solutions
- 1
- Reaction score
- 46
How to set setPlayerStorageValue and doPlayerSetExtraAttackSpeed temporally?
I want to set 2 stats temporally like utito tempo.lua
1) +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
2) set storage
setPlayerStorageValue(cid, 100)
How to set it as a buff, temporally like utito tempo, utani hur, utamo tempo...
After some time it stops and if player logout or something this not save?
I want to set 2 stats temporally like utito tempo.lua
Code:
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_BLUE)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, false)
local condition = createConditionObject(CONDITION_ATTRIBUTES)
setConditionParam(condition, CONDITION_PARAM_TICKS, 10000)
setConditionParam(condition, CONDITION_PARAM_SKILL_MELEEPERCENT, 135)
setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELDPERCENT, -100)
setConditionParam(condition, CONDITION_PARAM_BUFF, true)
setCombatCondition(combat, condition)
function onCastSpell(cid, var)
return doCombat(cid, combat, var)
end
1) +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
2) set storage
setPlayerStorageValue(cid, 100)
How to set it as a buff, temporally like utito tempo, utani hur, utamo tempo...
After some time it stops and if player logout or something this not save?