Keeq
New Member
- Joined
- Nov 6, 2012
- Messages
- 100
- Reaction score
- 0
Hello, i find script on soul necklace.
I searched the whole forum and did not find it :/
I need a script that regenerate 1 soul per 5 second
I found only this, but dont work
and XML
Can help me? please
I searched the whole forum and did not find it :/
I need a script that regenerate 1 soul per 5 second
I found only this, but dont work
Lua:
local soul_ring = {}
local function addSoul(player, n)
if not player:isPlayer then
return true
end
if soul_ring[player] == n then
player:addSoul(player:getSoul() + 2)
soul_ring[player] = soul_ring[player] + 1
addEvent(addSoul, 1000, player, n + 1)
end
end
function onEquip(player, item, slot)
soul_ring[player] = 1
addEvent(addSoul, 1000, player, 1)
return true
end
function onDeEquip(player, item, slot)
soul_ring[player] = 0
return true
end
and XML
Code:
<movevent event="Equip" itemid="2125" function="onEquipItem" slot="necklace" script="souls.lua" />
<movevent event="DeEquip" itemid="2125" function="onDeEquipItem" slot="necklace" script="souls.lua" />
Can help me? please