• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Rebirth pass

Bazi

Member
Joined
Oct 24, 2011
Messages
270
Reaction score
8
Location
Germany
hey ppls i need a movement that players only like whit 20 rebirth can pass or 60 or some others
 
I asked what code do you have already? Not what you need done <_<
Unless you don't have any of the code, you're just requesting one be made for you...

Red
 
Well posting your rebirth script would be a good start :)

Red
 
Add your function to check reborns at marked position.
Set Actionid to 940 for 10 reborns
941 - 20
etc You can change in config.

Not tested

XML:
	<movevent type="StepIn" actionid="940;941;942;943;944;945" event="script" value="rebornTile.lua"/>

LUA:
local function pushBack(cid, position, fromPosition, count)
	doTeleportThing(cid, fromPosition, false)
	doSendMagicEffect(position, CONST_ME_MAGIC_BLUE)
	if(count) then
		doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The tile seems to be protected. You need " .. count .. " reborns.")
	end
end

local reborn = {
	[940] = 10,
	[941] = 20,
	[942] = 30,
	[943] = 40,
	[944] = 50,
	[945] = 100

}

function onStepIn(cid, item, position, fromPosition)
	if not(isPlayer(cid)) then return true end
	
	local rebornTile = reborn[item.actionid]
	if rebornTile then
		if !!==INSERT_FUNCTION_TO_CHECK_REBORNS==!!(cid) < rebornTile then
			pushBack(cid, position, fromPosition, rebornTile)
			return false
		end
	end
	return true
end
 
Back
Top