• 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!

doCreateItem

Gubailovo

Well-Known Member
Joined
Dec 19, 2013
Messages
407
Solutions
2
Reaction score
62
I have a script for creating an item in position
Lua:
function onUse(cid, item, frompos, item2, topos)
gatepos = {x=3927, y=3669, z=7, stackpos=1}
getgate = getThingfromPos(gatepos)

if item.uid == 1144 and item.itemid == 8628 and getgate.itemid == 0 then
doCreateItem(1284,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
elseif item.uid == 1144 and item.itemid == 8627 and getgate.itemid == 1284 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"»звините, это невозможно.")
end
  return 1
  end
it creates a bridge tile
how do i add item creation on the same tile? First, a bridge is created with an object on it.
 
just add another in bridge position
after
doCreateItem(1284,1,gatepos)
add
doCreateItem(other_item_id,1,gatepos)
it looks like this?
Lua:
function onUse(cid, item, frompos, item2, topos)
gatepos = {x=3927, y=3669, z=7, stackpos=1}
getgate = getThingfromPos(gatepos)

if item.uid == 1144 and item.itemid == 8628 and getgate.itemid == 0 then
doCreateItem(1284,1,gatepos)
doCreateItem(8668,1,gatepos)
doTransformItem(item.uid,item.itemid-1)
elseif item.uid == 1144 and item.itemid == 8627 and getgate.itemid == 1284 then
doRemoveItem(getgate.uid,1)
doTransformItem(item.uid,item.itemid+1)
else
doPlayerSendCancel(cid,"»звините, это невозможно.")
end
  return 1
  end
it doesn't work that way. And that's why I wrote in support.
what is responsible for " stackpos=1"
maybe this is the case?
 
Back
Top