zbizu
Legendary OT User
I had a concept of some different kind of fast attack, but I found the code to be very inefficient and useless so I'll just share that.
Merry Christmas!
features:
PvE only - autoattack can't be used in pvp
safe burst arrows - no skull for using them in autoattack
multiple shots count as one for ammo breakchance and skilltries
quick switching targets
talkaction
creaturescripts.xml
autoattack.lua
http://pastebin.com/aeKDsZSA
known bugs:
this event is onLogin so /reload creaturescripts will turn it off for all players until they log in again
No installation support. If you don't know how to install it, you just shouldn't.
Merry Christmas!
features:
PvE only - autoattack can't be used in pvp
safe burst arrows - no skull for using them in autoattack
multiple shots count as one for ammo breakchance and skilltries
quick switching targets
talkaction
Code:
local togglestorage = 2557
local delaystorage = 2558
function onSay(player, words, param)
-- this is to avoid duplicated auto attack
local stor = player:getStorageValue(delaystorage)
if stor > os.time() then
player:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "Please wait " .. stor - os.time() .. " seconds before trying again.")
return false
end
player:setStorageValue(delaystorage, os.time() + 5)
if player:getStorageValue(togglestorage) == 1 then
player:setStorageValue(togglestorage, 0)
player:sendTextMessage(MESSAGE_INFO_DESCR, "Auto attack disabled.")
return false
end
player:setStorageValue(togglestorage, 1)
player:sendTextMessage(MESSAGE_INFO_DESCR, "Auto attack enabled.")
return false
end
creaturescripts.xml
Code:
<event type="login" name="autoAttack" script="autoattack.lua"/>
autoattack.lua
http://pastebin.com/aeKDsZSA
known bugs:
this event is onLogin so /reload creaturescripts will turn it off for all players until they log in again
No installation support. If you don't know how to install it, you just shouldn't.
Last edited: