SpiderOT
™ツʂριԃҽɾσƚ➽ ٩(•‿•)۶★彡
Hi all :]
today i decide to share with you my
- forever amulet of loss
- forever red/black skull amulet
yes there is like 100 thread about forever /skull amulet xD
but what make them different ?
both will count frags
tested on tfs 3.5 pl1 and should work on 3.6
~note
this script for some reason wont work on all amulet but it work perfect on the 2 amulet in script
we will use item id :2198 for forever amulet and item id :2131 for skull amulet
now open data/item/item.xml
search for item id :2198
and change it to this
and search item id :2131
and change it to this
now open data/creaturescripts/script/login.lua
and add this
then open data/creaturescripts/creaturescripts.xml
and add this
now time for the script
in data\creaturescripts\scripts create forever amulet.lua
and skull amulet.lua
and last script to make the amulets infinite
charge amulet.lua
now we are done :thumbup:
any error or problem post it
hope you guys like it
today i decide to share with you my
- forever amulet of loss
- forever red/black skull amulet
yes there is like 100 thread about forever /skull amulet xD
but what make them different ?
both will count frags
tested on tfs 3.5 pl1 and should work on 3.6
~note
this script for some reason wont work on all amulet but it work perfect on the 2 amulet in script
we will use item id :2198 for forever amulet and item id :2131 for skull amulet
now open data/item/item.xml
search for item id :2198
and change it to this
Code:
<item id="2198" article="an" name="Forever amulet">
<attribute key="weight" value="660"/>
<attribute key="slotType" value="necklace"/>
<attribute key="charges" value="2"/>
<attribute key="preventDrop" value="1"/>
</item>
and change it to this
Code:
<item id="2131" article="a" name="Skull Amulet">
<attribute key="weight" value="660"/>
<attribute key="slotType" value="necklace"/>
<attribute key="charges" value="2"/>
<attribute key="preventDrop" value="1"/>
</item>
and add this
Lua:
registerCreatureEvent(cid, "forever amulet")
registerCreatureEvent(cid, "skull amulet")
registerCreatureEvent(cid, "charge amulet")
and add this
Code:
<event type="preparedeath" name="forever amulet" event="script" value="forever amulet.lua"/>
<event type="preparedeath" name="skull amulet" event="script" value="skull amulet.lua"/>
<event type="preparedeath" name="charge amulet" event="script" value="charge amulet.lua"/>
in data\creaturescripts\scripts create forever amulet.lua
Lua:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2198) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doCreatureSay(cid, "Forever Amulet!", TALKTYPE_ORANGE_1)
elseif (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2131) and (getCreatureSkullType(cid) < 4) then
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doCreatureSay(cid, "Skull Amulet!", TALKTYPE_ORANGE_1)
end
return true
end
Lua:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
if (getCreatureSkullType(cid) >= 4) then
if (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2131) then
doCreatureSetDropLoot(cid, false)
doSendMagicEffect(getCreaturePosition(cid), CONST_ME_HOLYAREA)
doCreatureSay(cid, "Skull Amulet!", TALKTYPE_ORANGE_1)
end
return true
end
return true
end
charge amulet.lua
Lua:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
local amulet = getPlayerSlotItem(cid, CONST_SLOT_NECKLACE)
if ((getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2131) or (getPlayerSlotItem(cid, CONST_SLOT_NECKLACE).itemid == 2198)) then
doChangeTypeItem(amulet.uid, amulet.type+1)
doSendMagicEffect(getCreaturePosition(cid), 39)
end
return true
end
any error or problem post it
hope you guys like it
Last edited: