• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

MoveEvent Paid Teleport

orzeleagle

Member
Joined
Dec 21, 2009
Messages
183
Reaction score
7
Location
Poland
Paid Teleport:

in .../movements/scripts/tp.lua:
PHP:
local c = {cost = 100, position = {x = 1, y = 1, z = 7}, effect = 10}
function onStepIn(cid, item, position, fromPosition)
	if doPlayerRemoveMoney(cid, c.cost) then
		doTeleportThing(cid, c.position, true)
		doSendMagicEffect(c.position, c.effect)
	else
		doPlayerSendCancel(cid, "You need to have " .. c.cost .. " gp.")
	end
	return true
end

in movements.xml:
PHP:
<movevent event="StepIn" actionid="2121" script="tp.lua" />



rep me ;D
 
Last edited:
Back
Top