eyez
Member
- Joined
- Oct 11, 2016
- Messages
- 129
- Reaction score
- 19
I did found this script to add a exausted on SSA and Might Ring (to prevent bots rulles)
It's working, you cant equip the item before exausted finish
But SSA and Might Ring are not losing charges after u recive damage (after i added this script)
SSA
mightring
It's working, you cant equip the item before exausted finish
But SSA and Might Ring are not losing charges after u recive damage (after i added this script)
Code:
<!-- onequip_exausted_pvp -->
<movevent type="Equip" itemid="2197" slot="necklace" event="script" value="onequip_exausted_pvp/ssa_exhaust.lua"/>
<movevent type="DeEquip" itemid="2197" slot="necklace" event="script" value="onequip_exausted_pvp/ssa_exhaust.lua"/>
<movevent type="Equip" itemid="2164" slot="ring" event="script" value="onequip_exausted_pvp/mightring_exhaust.lua"/>
<movevent type="DeEquip" itemid="2164" slot="ring" event="script" value="onequip_exausted_pvp/mightring_exhaust.lua"/>
SSA
Code:
local storage = 9500
local fixStorage = 8000
local time = 4
function onEquip(cid, item, slot, boolean)
if getPlayerStorageValue(cid, fixStorage) == 1 then
doPlayerSetStorageValue(cid, fixStorage, -1)
return callFunction(cid, item.uid, slot, boolean)
end
if getPlayerStorageValue(cid, storage) >= os.time() then
print("exhausted")
return false
end
doPlayerSetStorageValue(cid, storage, os.time() + time)
doPlayerSetStorageValue(cid, fixStorage, 1)
print("exhaustion set for 5 seconds")
return true
end
function onDeEquip(cid, item, slot, boolean)
return callFunction(cid, item.uid, slot, boolean)
end
mightring
Code:
local storage = 9501
local fixStorage = 8001
local time = 4
function onEquip(cid, item, slot, boolean)
if getPlayerStorageValue(cid, fixStorage) == 1 then
doPlayerSetStorageValue(cid, fixStorage, -1)
return callFunction(cid, item.uid, slot, boolean)
end
if getPlayerStorageValue(cid, storage) >= os.time() then
print("exhausted")
return false
end
doPlayerSetStorageValue(cid, storage, os.time() + time)
doPlayerSetStorageValue(cid, fixStorage, 1)
print("exhaustion set for 5 seconds")
return true
end
function onDeEquip(cid, item, slot, boolean)
return callFunction(cid, item.uid, slot, boolean)
end