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

Lua Fenrock pick hole teleport

Gandzan

New Member
Joined
Dec 4, 2009
Messages
12
Reaction score
0
I got problem, i need script wchich teleporting me lower floor when i use pick on this hole, but this script work when i just click on this hole without pick. =/ I need use pick to it and i dont know what do for this.

Code:
local t = {
[60001] = {x=10108, y=10236, z=10},
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local tmp = getThingPos(cid)
doTeleportThing(cid, t[item.uid])
doSendMagicEffect(tmp, CONST_ME_TELEPORT)
doSendMagicEffect(t[item.uid], CONST_ME_TELEPORT)
return true
end
 
Code:
local newpos = {x=32447, y=33635, z=8}

function onUse(cid, item, fromPosition, itemEx, toPosition)
      doSendMagicEffect(getPlayerPosition(cid), 2)

      doTeleportThing(cid,newpos)

      doSendMagicEffect(newpos,10)

end
REP++
 
you all are doing it wrong, pick.lua has to be edited

Code:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if((itemEx.uid <= 65535 or itemEx.actionid > 0) and isInArray({354, 355}, itemEx.itemid)) then
		doTransformItem(itemEx.uid, 392)
		doDecayItem(itemEx.uid)
		doSendMagicEffect(toPosition, CONST_ME_POFF)
		return true
	end

	if(itemEx.itemid == 7200) then
		doTransformItem(itemEx.uid, 7236)
		doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
		return true
	end

[B][COLOR="Red"]	if(itemEx.uid == 60001) then
		local tmp = getThingPos(cid)
		doTeleportThing(cid, {x=10108, y=10236, z=10})
		doSendMagicEffect(tmp, CONST_ME_TELEPORT)
		doSendMagicEffect({x=10108, y=10236, z=10}, CONST_ME_TELEPORT)
	end[/COLOR][/B]

	return false
end
 
Back
Top