Hello!
This creaturescript increase your attack speed for X seconds when you are in combat.
Create a .lua file in data/creaturescript/scripts/ named furious.lua and paste this in:
Put this in your data/creaturescripts/creaturescript.xml:
After:
For noobs:
Put this in login.lua in data/creaturescripts/scripts/login.lua:
Before:
THEN YOUR DONE! Enjoy
This creaturescript increase your attack speed for X seconds when you are in combat.
Require:
http://otland.net/f35/doplayersetextraattackspeed-cid-speed-58945/ By darkhaos
Installation:
http://otland.net/f35/doplayersetextraattackspeed-cid-speed-58945/ By darkhaos
Installation:
Create a .lua file in data/creaturescript/scripts/ named furious.lua and paste this in:
Lua:
function onCombat(cid, target)
local config = {
chance = 5, -- Chance
duration = 2, -- How long the effect will last (in seconds)
storage = 247, -- storage (choose a unused storage)
increasespeed = 5 -- How much your attack speed will be increased (in seconds)
}
if isKnight(cid) then -- Witch vocation can get this attribute.
-- isPaladin(cid) or isSorcerer(cid) or isDruid(cid) then
-- for all vocations
function stopExtraAttack()
doPlayerSetExtraAttackSpeed(cid,0)
doSendMagicEffect(getCreaturePosition(cid), 30)
setPlayerStorageValue(cid, config.storage, 0)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your attack speed is back to normal.")
return true
end
if math.random(0,100) <= config.chance then
if(getPlayerStorageValue(cid,config.storage) <= 0) then
doPlayerSetExtraAttackSpeed(cid, config.increasespeed * 1000)
doSendAnimatedText(getCreaturePosition(cid), "+AtkSpeed", 20)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You attack speed is increased with ".. config.increasespeed .." seconds.")
setPlayerStorageValue(cid, config.storage, 1)
addEvent(stopExtraAttack, config.duration * 1000)
doSendMagicEffect(getCreaturePosition(cid), 29)
end
end
end
-- end
return true
end
Put this in your data/creaturescripts/creaturescript.xml:
XML:
<event type="combat" name="Furious" event="script" value="furious.lua"/>
XML:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
For noobs:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<creaturescripts>
<event type="combat" name="Furious" event="script" value="furious.lua"/>
Put this in login.lua in data/creaturescripts/scripts/login.lua:
Lua:
registerCreatureEvent(cid, "Furious")
Lua:
return true
end
THEN YOUR DONE! Enjoy
CREDITS:
iuniX in OTServ Brasil, darkhaos for doing the Lua function doPlayerSetExtraAttackSpeed(cid, speed) 'n me for editing the script a little bit.
iuniX in OTServ Brasil, darkhaos for doing the Lua function doPlayerSetExtraAttackSpeed(cid, speed) 'n me for editing the script a little bit.
Last edited: