Hello! I don't know how to make script:
If player use item (grave), it will summon creature and change actionid of item, then if player kill monster actionid back to normal, and player's storage value will change ... (3rd mission of inq).
I was trying do it, but that don't work:
actions/scripts:
thecount.lua
creaturescripts:
The Count.lua
in monster file:
the count.xml i added this:
Please help me ;d.
If player use item (grave), it will summon creature and change actionid of item, then if player kill monster actionid back to normal, and player's storage value will change ... (3rd mission of inq).
I was trying do it, but that don't work:
actions/scripts:
thecount.lua
Code:
function onUse(cid, item, frompos, item2, topos)
if getPlayerStorageValue(cid,200000) == 10 and item.actionid == 39996 then
doSummonCreature("The Count", {x= 32783,y=31966,z=9})
doSetItemActionId(item.uid, 39995)
elseif item.actionid == 39995 then
doCreatureSay(cid, "Its empty.", TALKTYPE_ORANGE_1)
end
return true
end
creaturescripts:
The Count.lua
Code:
local pos = {x=32782, y=31996, z=9, stackpos=0}
function onKill(cid, target, lastHit)
if getPlayerStorageValue(cid,200000) == 10 then
setPlayerStorageValue(cid, 200000, 11)
doSetItemActionId(pos, 39996)
elseif getPlayerStorageValue(cid,200000) < 10 or getPlayerStorageValue(cid,200000) > 10 then
doSetItemActionId(pos, 39996)
end
return TRUE
end
in monster file:
the count.xml i added this:
Code:
<script>
<event name="The Count"/>
</script>
Please help me ;d.