Skrypt:
Kod:
function onEquip(cid, item, slot)
local IdRinga = xxx -- Id ringa
czas = 0
repeat
local x = {IdRinga = IdRinga, cid = cid}
addEvent(dodaj, czas, x)
czas = czas+2000
until (getPlayerSlotItem(cid,9) ~= IdRinga)
end
function dodaj(x)
if (getPlayerSlotItem(x.cid,9) == x.IdRinga) then
local ile_hp = getPlayerMaxHealth(x.cid)-getPlayerHealth(x.cid)
doPlayerAddHealth(x.cid,ile_hp)
else
doPlayerSendCancel(x.cid,"Zaloz ring zeby byc niesmiertelnym.")
end
end
Powinno dzia?a?. To si? dodaje do movements.xml. Do movements.xml dodaj:
Kod:
<movevent event="Equip" item="id ringa" slot="ring" script="nazwa skryptu.lua" />
Pozdro,
Gelio
mam pytanie do tego gdzie dac ten skrypt pierwszy ?