Hello,
I have made script for absorbing corpses but still dont working...
If you click on corpse with rune, the corpse will dissapear and msg: You have absorbed 1 of 5 corpses , You have absorbed 2 of 5 corpses ... etc.
If i using my version the corpse dont disappear and all time msg me: You have absorbed 1 of 5 corpses
REP ++++++++
Hail !
I have made script for absorbing corpses but still dont working...
LUA:
local config = {
deads = {6068}
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(not isInArray(config.deads, itemEx.itemid)) then
return false
else
end
if getPlayerVocation(cid) == 55 or getPlayerStorageValue(cid,55) < 1 then
doPlayerSendTextMessage(cid,22,"You have absorbed 1 of 5 corpses.")
setPlayerStorageValue(cid,55)
doSendMagicEffect(toPosition,70)
else
end
if getPlayerStorageValue(cid,55) == 1 then
setPlayerStorageValue(cid,56)
doPlayerSendTextMessage(cid,22,"You have absorbed 2 of 5 corpses.")
doSendMagicEffect(toPosition,70)
else
end
if getPlayerStorageValue(cid,56) == 2 then
setPlayerStorageValue(cid,57)
doSendMagicEffect(toPosition,70)
doPlayerSendTextMessage(cid,22,"You have absorbed 3 of 5 corpses.")
else
end
if getPlayerStorageValue(cid,57) == 3 then
setPlayerStorageValue(cid,58)
doSendMagicEffect(toPosition,70)
doPlayerSendTextMessage(cid,22,"You have absorbed 4 of 5 corpse.")
else
end
if getPlayerStorageValue(cid,58) == 4 then
setPlayerStorageValue(cid,59)
doSendMagicEffect(toPosition,70)
doPlayerSendTextMessage(cid,22,"You have absorbed last 5 corpse. Now you can do transform.")
else
end
end
If you click on corpse with rune, the corpse will dissapear and msg: You have absorbed 1 of 5 corpses , You have absorbed 2 of 5 corpses ... etc.
If i using my version the corpse dont disappear and all time msg me: You have absorbed 1 of 5 corpses
REP ++++++++
Hail !