• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Checking for item count help

Ninkobi

Owner /Founder of Syphera
Joined
Apr 5, 2008
Messages
206
Reaction score
1
Location
England
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:
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.
 
Back
Top