• 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 Request Pay to teleport.

mannet

New Member
Joined
Sep 27, 2008
Messages
8
Reaction score
0
I wonder if anyone got a pay to teleport script to make clear what i mean is
let's say there is a teleport to Demona, when you enter the teleport it automatic grabs 5k gold from you and if you have less then 5k gold the teleport says "Not enough money"

Is this possible or does anyone got a script like this?
 
Lua:
from_x = 0
from_y = 0 
from_z = 0

function onStepIn(cid, item, position, fromPosition)


from_x = fromPosition.x
from_y = fromPosition.y
from_z = fromPosition.z
	return TRUE
end
function onStepOut(cid, item)
if getPlayerGroupId(cid) < 3 then 
		if getPlayerLevel(cid) >= 200 and doPlayerRemoveMoney (cid, ((getPlayerLevel(cid) - 19) * 12)) == 1 then 		
				doPlayerRemoveMoney (cid, ((getPlayerLevel(cid) - 19) * 12))
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You paid " .. ((getPlayerLevel(cid) - 19) * 12) .. " gps for using teleport instead of walking.")
				doCreatureSay ( cid, "DedicatedOT TP rox!", TALKTYPE_ORANGE_1 )	
		elseif getPlayerLevel(cid) >= 200 and doPlayerRemoveMoney (cid, ((getPlayerLevel(cid) - 19) * 12)) < 1 then 
				doPlayerSendCancel(cid, "You need " .. ((getPlayerLevel(cid) - 19) * 12) .. " gps to use this teleport.")
				doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "You need " .. ((getPlayerLevel(cid) - 19) * 12) .. " gps to use this teleport.")

				doTeleportThing(cid, {x=(from_x), y = (from_y), z = from_z})	
				doCreatureSay(cid,"I don't have enought money for TP!", TALKTYPE_ORANGE_1)
				doSendMagicEffect(getCreaturePos(cid), 10)
		else 
				doCreatureSay ( cid, "DedicatedOT TP rox!", TALKTYPE_ORANGE_1 )	
				
		end 
else
	doCreatureSay(cid, "Praise Admin Arnold! GMs get TP free!", TALKTYPE_ORANGE_1)
end 
	return TRUE
end
/movements/citizen.lua
 
Back
Top