Olá galera, preciso de ajuda para colocar cargas no amuleto AOL Red/Black skull, como eu coloco cargas nesse amuleto? (10x cargas)
Script:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller) if (getPlayerSlotItem(cid, 2).itemid == 2196) and getPlayerSkullType(cid) >= 4 then doCreatureSetDropLoot(cid, false) doPlayerSetLossPercent(cid, PLAYERLOSS_ITEMS, 0) doPlayerSetLossPercent(cid, PLAYERLOSS_CONTAINERS, 0) end return true end
login.lua
registerCreatureEvent(cid, "RedSkullAmulet")
creaturescripts tag
<event type="preparedeath" name="RedSkullAmulet" event="script" value="script.lua"/>
Item
<item id="2196" article="a" name="Red Skull Amulet"> <attribute key="weight" value="420" /> <attribute key="slotType" value="necklace" />
PS: Não testei colocar a tag
<attribute key="charges" value="10" />
pois acredito que não funcionaria por que o amuleto funciona em creaturescripts.