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

Request! Use pick on crack and then teleport

Tofflarn

New Member
Joined
Mar 22, 2008
Messages
360
Reaction score
1
Location
Sweden
Hello dear friends. I need a script that when a player use a pick (id 2553) on a crack (id 6299) he should be teleported to x,x,x? The crack should also have a action id so it can't be done on all cracks.

Thx in advanced!

:)
 
PHP:
<action itemid="2114" script="shovel.lua" />

PHP:
function onUse(cid, item, frompos, item2, topos)
	if item2.itemid == 6299 then
		doPlayerSendTextMessage(cid,21,"Hello!")	
		newpos = {x=3200, y=3200, z=7}
		doTeleportThing(cid,newpos)
		doSendMagicEffect(newpos,12)
		end
		return 0
	end

Hey, post your shovel script. so I make this script into yours so your shovel will work on holes as normal ;)
 
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)
	elseif itemEx.itemid == 7200 then
		doTransformItem(itemEx.uid, 7236)
		doSendMagicEffect(toPosition, CONST_ME_BLOCKHIT)
[B][COLOR="Red"]	elseif itemEx.itemid == 6299 and itemEx.actionid == [COLOR="Blue"]10000[/COLOR] then
		doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)
		doTeleportThing(cid, [COLOR="Blue"]{x = 100, y = 100, z = 7}[/COLOR])
		doSendMagicEffect(getThingPos(cid), CONST_ME_TELEPORT)[/COLOR][/B]
	else
		return false
	end
	return true
end
 
Back
Top