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

club script (request)

Blackcody

RiseOfTibia Owner
Joined
Aug 31, 2008
Messages
136
Reaction score
1


looking for a script that will check if player on square and if so gm/god pulls leaver and takes 10Gp and teleporter player to other side of gate.


i would allso like if some one could make a access id=6 door. access = God/Owner.

thank you :wub:
 
Code:
local cost = 10
local t = {
	[lever1UID] = {
		tile = {x=100, y=100, z=7},
		destination = {x=100, y=100, z=7}
	},
	[lever2UID] = {
		tile = {x=100, y=100, z=7},
		destination = {x=100, y=100, z=7}
	}
}
	
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.itemid == 1946 then return doTransformItem(item.uid, 1945) end

	local i = t[item.uid]
	local v = getTopCreature(i.tile).uid
	if isPlayer(v) then
		if doPlayerRemoveMoney(v, cost) then
			doTeleportThing(v, i.destination)
			doSendMagicEffect(i.tile, CONST_ME_TELEPORT)
			doSendMagicEffect(i.destination, CONST_ME_TELEPORT)
			doTransformItem(item.uid, 1946)
		else
			doCreatureSay(cid, 'The player doesn\'t have ' .. cost .. ' gold.', TALKTYPE_ORANGE_1, false, cid)
		end
	else
		doCreatureSay(cid, 'Player not found.', TALKTYPE_ORANGE_1, false, cid)
	end

	return true
end
For doors, you can put actionID 156 but then you'll have to use gate of expertise (level door) instead.
 
just register it with uniqueids
Code:
	<action uniqueid="lever1UID;lever2UID" event="script" value="scriptname.lua"/>
 
Back
Top