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

If use item>get teleported

Listo

New Member
Joined
Aug 17, 2008
Messages
222
Reaction score
0
Hello otlanders!

I need script. If you use minotaur statue(id=1460). Then you get tpd to x postion. Hope someone can help me!

Listo^^
 
Lua:
local pos = {x=286, y=216, z=7}

function onUse(cid, item, fromPosition, itemEx, toPosition)
      doTeleportThing(cid, pos)
     return TRUE
  end

PHP:
<action itemid="1460" script="tpmino.lua"/>
 
THnx it worked but now I need a other script. If u pull lever then wall get removed. Hope u can help me.

Listo^^
 
Lua:
local config = 
{
wallPosition = {x=71, y=344, z=9},
getWall = getThingfromPos(wallPosition),
wallID = xxxx
}

function onUse(cid, item, frompos, item2, topos)
	if item.itemid == 1945 then
		doRemoveItem(config.getWall.uid, 1)
		doTransformItem(item.uid,item.itemid + 1)		
	else
		doPlayerSendCancel(cid,"Sorry, not possible.")
	end

   	return TRUE
end


OR


Lua:
local config = 
{
wallPosition = {x=71, y=344, z=9},
getWall = getThingfromPos(wallPosition),
wallID = xxxx
}

function onUse(cid, item, frompos, item2, topos)
	if item.itemid == 1945 then
		doRemoveItem(config.getWall.uid, 1)
		doTransformItem(item.uid,item.itemid + 1)
	  elseif item.itemid == 1946 then
		doCreateItem(config.wallID, 1, config.wallPosition)
		doTransformItem(item.uid,item.itemid - 1)		
	     else
		doPlayerSendCancel(cid,"Sorry, not possible.")
	  end
      return TRUE
   end


PHP:
	<action uniqueid="xxxx" script="removewall.lua" />
 
Back
Top