hey i got this script from here and i wanna know how to Remove some things!
1.Make this scrip have bless and Has infity charges
And i want it to say When you Die Forever AOL Or just some message
2.I got a error onprepeardeath and the players with out the neckelss get 0 hp but they are still alive and can atack anyone
1.Make this scrip have bless and Has infity charges
And i want it to say When you Die Forever AOL Or just some message
2.I got a error onprepeardeath and the players with out the neckelss get 0 hp but they are still alive and can atack anyone
Lua:
local corpse_ids = {
[0] = 3065,
[1] = 3058
}
local config = {
charges = 5
}
function onPrepareDeath(cid, deathList)
if getCreatureSkullType(cid) < 5 then
if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2196 then
if getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).actionid < 100 then
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).uid, "aid", (100 + config.charges - 1))
elseif getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).actionid > 101 then
doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).uid, "aid", (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).actionid - 1))
elseif getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).actionid == 101 then
doRemoveItem(getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).uid)
end
end
end
return doCreatureSetDropLoot(cid, false) and doItemSetAttribute(getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).uid, "description", "It has " .. (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).actionid - 101) .. "x charge" .. ((getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).actionid - 101) > 1 and "s" or "") .. ".") and doItemSetAttribute(doCreateItem(corpse_ids[getPlayerSex(cid)], 1, getThingPos(cid)), "description", "You recognize " .. getCreatureName(cid) .. ". He was killed by " .. (isMonster(deathList[1]) and "a " .. string.lower(getCreatureName(deathList[1])) or isCreature(deathList[1]) and getCreatureName(deathList[1]) or "a field item") .. ".\nHis soul was protected.")
end
Last edited: