Ninkobi
Owner /Founder of Syphera
I have made a script which involves 2 altars where 2 items will be places, 1 is a trident, other is 30x demonic essence, when you press the lever it will check the items are there and remove them.
I can do it for just a trident and 1x demonic essense but I'm not sure how to do it for 30x. Can someone please help with this.
Heres the script:
Thanks in advance.
I can do it for just a trident and 1x demonic essense but I'm not sure how to do it for 30x. Can someone please help with this.
Heres the script:
Code:
function onUse(cid, item, frompos, item2, topos)
piece1 = 6534 --trident
piece2 = 6500 --essense 30x needed fix :D
if item.uid == 9783 and item.itemid == 1945 then
piece1pos = {x=19953, y=20236, z=9, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE} -- trident placement
piece2pos = {x=19953, y=20235, z=9, stackpos=STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE} -- essense
getpiece1 = getThingfromPos(piece1pos)
getpiece2 = getThingfromPos(piece2pos)
if (getpiece1.itemid==piece1 and getpiece2.itemid==piece2) then
gatepos = {x=19958, y=20236, z=9, stackpos=1}
doCreateItem(3219,1,gatepos)
doRemoveItem(getpiece1.uid,1)
doRemoveItem(getpiece2.uid,1)
doTransformItem(item.uid,1946)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'GRRRR! You are getting closer to me!')
else
doPlayerSendCancel(cid,"Sorry not possible.")
end
else
doPlayerSendCancel(cid,"Sorry not possible.")
end
return 1
end
Thanks in advance.