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

Need Rebirth Portal

patriciou

Member
Joined
Dec 26, 2009
Messages
180
Reaction score
6
Hello, Since last Week i was Trying to Find Something Called Prestige Portal or Rebirth Portal that allowes people that already Rebbed or Prestiged Enter new Spawns and Towns

It Looks Like this ::



Uploaded with ImageShack.us

And Basically When the Person hasnt rebirthed yet it Wont let them in and it Will say " Only Players that have Rebirthed can Enter Rebirth Portal"

++ I Wanted it so it Will be the same as on the Picture so When you stand on a Tile Then it teleports you to Certain Area .


If anybody could find me or Write one then i would be very pleased

And REP ++ For a Person that will Help Me :)

@Up
If so It can Also be A teleport Only people that Prestiged can enter it :)
 

Attachments

Last edited:
I know what must be done, but I can't do it XD
The teleporter must ask for a storage value on stepIn. If the player does not have this storage value he can't enter.
The rebirth script must give a player who make a rebirth the storage value.

Hm.. I'll try, haha.

I couldn't find any stepIn script that uses teleport. Teleport script was found in "onUse" is strange to me but.. I dunno, I'm just trying here :)

go to your map and put a teleport where you want it, give it unique id 1311
Go to data/actions/scripts/other and make a new script, name it rebporter
put this inside:

HTML:
function onUse(cid, item, fromPosition, itemEx, toPosition)

     rebport = {x=223, y=223, z=7}
 
if item.uid == 1311 then 
rebcheck = getPlayerStorageValue(cid,1036)
if rebcheck == 1036 then
          doSendMagicEffect(topos, 12)
          doTeleportThing(cid, rebport)
          doSendMagicEffect(rebport, 12)
          doPlayerSendTextMessage(cid, 22, "Rebirth area!")
     else
          doPlayerSendTextMessage(cid, 22, "You may not use this teleport before rebirth!")
     end
end

Go back to data/actions and open actions.xml
Put this in:
HTML:
<action itemid="1369" event="script" value="other/rebporter.lua"/>



Next you need to put this in the script which happen when you rebirth:
HTML:
setPlayerStorageValue(cid,1036,1)
 
Last edited:
Hey, I did what you Said but i get this Strange error :D

Error in Console :

[Error - LuaScriptInterface::loadFile] data/actions/scripts/other/rebporter.lua:
3: '=' expected near 'to'
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/reb
porter.lua)
data/actions/scripts/other/rebporter.lua:3: '=' expected near 'to'

But except this everything is Alright :)
If you could fix this i would be very pleased :) xD
 
I know what must be done, but I can't do it XD
The teleporter must ask for a storage value on stepIn. If the player does not have this storage value he can't enter.
The rebirth script must give a player who make a rebirth the storage value.

Hm.. I'll try, haha.

I couldn't find any stepIn script that uses teleport. Teleport script was found in "onUse" is strange to me but.. I dunno, I'm just trying here :)

go to your map and put a teleport where you want it, give it unique id 1311
Go to data/actions/scripts/other and make a new script, name it rebporter
put this inside:

HTML:
function onUse(cid, item, fromPosition, itemEx, toPosition)

     rebport = {x=223, y=223, z=7}
 
if item.uid == 1311 then 
rebcheck = getPlayerStorageValue(cid,1036)
if rebcheck == 1036 then
          doSendMagicEffect(topos, 12)
          doTeleportThing(cid, rebport)
          doSendMagicEffect(rebport, 12)
          doPlayerSendTextMessage(cid, 22, "Rebirth area!")
     else
          doPlayerSendTextMessage(cid, 22, "You may not use this teleport before rebirth!")
     end
end

Go back to data/actions and open actions.xml
Put this in:
HTML:
<action itemid="1369" event="script" value="other/rebporter.lua"/>



Next you need to put this in the script which happen when you rebirth:
HTML:
setPlayerStorageValue(cid,1036,1)

I don't get it.
He wants a move event but you made an action?

Also, it's really easy to make a movement script.
 
Last edited by a moderator:
Well i Did it again and Now i get this Error :

[Error - LuaScriptInterface::loadFile] data/actions/scripts/other/rebporter.lua:
15: 'end' expected (to close 'function' at line 1) near '<eof>'
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/other/reb
porter.lua)
data/actions/scripts/other/rebporter.lua:15: 'end' expected (to close 'function'
at line 1) near '<eof>'

++ If not Could somebody create one But in Movements ?? Apparently its easy :/

Repp ++ For person that will Help or Even Try helping :)

- - - Updated - - -

BUMP ! Really need it ;(
 
Just edite the position and storage.
LUA:
local teleportpos = {x=xxxx, y=xxxx, z=x} --The position where player will be teleported
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getPlayerStorageValue(cid, Your rebirth storage here) > 0 then --dont forget to edite to your rebirth storage
	doTeleportThing(cid, teleportpos)
else
    doTeleportThing(cid, fireStormEnterPosition)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Sorry, only rebirthed players can pass.')
	return true
end
 
Last edited:
Where to Paste that ?? To Movements ?

- - - Updated - - -

Well again I did as you Said :

And

PHP:
local teleportpos = {x=877, y=1027, z=7} --The position where player will be teleported
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getPlayerStorageValue(cid,) > 85987 then --dont forget to edite to your rebirth storage
	doTeleportThing(cid, teleportpos)
else
    doTeleportThing(cid, fireStormEnterPosition)
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Sorry, only rebirthed players can pass.')
	return true
end

And i Get this Error :

[Error - LuaScriptInterface::loadFile] data/movements/scripts/rebtp.lua:3: unexp
ected symbol near ')'
[Warning - Event::loadScript] Cannot load script (data/movements/scripts/rebtp.l
ua)
data/movements/scripts/rebtp.lua:3: unexpected symbol near ')'

:/
 
Last edited:
LUA:
local pos = {x = 1000, y = 1000, z = 7} --edit
local storage = 1000 --edit
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerStorageValue(cid, storage) > 0 then
		doTeleportThing(cid, pos, true)
	else
		doTeleportThing(cid, fromPosition, true)
		doSendMagicEffect(getThingPos(cid), CONST_ME_POOF)
		doPlayerSendCancel(cid, "You need to have rebirthed in order to use this teleport!")
	end
	return true
end
 
Your fault you added storage in wrong part
LUA:
local teleportpos = {x=877, y=1027, z=7} --The position where player will be teleported
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getPlayerStorageValue(cid, 85987) > 0 then --dont forget to edite to your rebirth storage
    doTeleportThing(cid, teleportpos)
else
    doTeleportThing(cid, fireStormEnterPosition)
    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Sorry, only rebirthed players can pass.')
    return true
end
 
I don't get it.
He wants a move event but you made an action?

Also, it's really easy to make a movement script.

HTML:
function onUse(cid, item, fromPosition, itemEx, toPosition)
	if(item.itemid == DRAW_WELL and item.actionid ~= 100) then
		return false
	end

	fromPosition.stackpos = STACKPOS_GROUND
	if(isInArray(UP_FLOORS, item.itemid)) then
		fromPosition.z = fromPosition.z - 1
		fromPosition.y = fromPosition.y + 1
		if(doTileQueryAdd(cid, fromPosition, 4, false) ~= RETURNVALUE_NOERROR) then
			fromPosition.y = fromPosition.y - 2
		end
	else
		fromPosition.z = fromPosition.z + 1
	end

	if(doTileQueryAdd(cid, fromPosition, 4, false) ~= RETURNVALUE_NOERROR) then
		return false
	end

	local pos, dir = getCreaturePosition(cid), SOUTH
	if(pos.x < fromPosition.x) then
		dir = EAST
	elseif(pos.x == fromPosition.x) then
		if(pos.y == fromPosition.y) then
			dir = getCreatureLookDirection(cid)
		elseif(pos.y > fromPosition.y) then
			dir = NORTH
		end
	elseif(pos.x > fromPosition.x) then
		dir = WEST
	end

	doTeleportThing(cid, fromPosition, false)
	doCreatureSetLookDirection(cid, dir)
	return true
end

I'm just trying, I never donee a complete script before, I searched in movements but couldn't find the basic teleport script thetre, ifound it in actions which ithought wa sstrange, but I tried anyways ;P
 
plz help me i have this error
Error - MoveEvents Interface]
[05/11/2012 15:28:16] data/movements/scripts/Teleport.lua:onStepIn
[05/11/2012 15:28:16] Description:
[05/11/2012 15:28:16] attempt to index a nil value
[05/11/2012 15:28:16] stack traceback:
[05/11/2012 15:28:16] [C]: in function 'doTeleportThing'
[05/11/2012 15:28:16] data/movements/scripts/Teleport.lua:6: in function <data/movements/scripts/Teleport.lua:2>



and my script is this
local teleportpos = {x=999, y=1000, z=7} --The position where player will be teleported
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if getPlayerStorageValue(cid, 85987) > 1 then --dont forget to edite to your rebirth storage
doTeleportThing(cid, teleportpos)
else
doTeleportThing(cid, fireStormEnterPosition)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Sorry, only rebirthed players can pass.')
return true
end
end


the problem is when u are not able to cross the teleport, because when u are able works perfect, plz helpp :(
 
plz help me i have this error



and my script is this



the problem is when u are not able to cross the teleport, because when u are able works perfect, plz helpp :(


Try it now:

LUA:
local teleportpos = {x=999, y=1000, z=7} --The position where player will be teleported
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerStorageValue(cid, 85987) > 1 then --dont forget to edite to your rebirth storage
		doTeleportThing(cid, teleportpos)
	else
		doTeleportThing(cid, fromPosition, false)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Sorry, only rebirthed players can pass.')
		return true
	end
end
 
xD now non prestiged players are not able to enter and this appear Sorry, only rebirthed players can pass., but the prestiged player can walk above the teleport and nothing happens only this console problem

[Error - MoveEvents Interface]
[06/11/2012 10:47:22] data/movements/scripts/Teleport.lua:onStepIn
[06/11/2012 10:47:22] Description:
[06/11/2012 10:47:22] attempt to index a nil value
[06/11/2012 10:47:22] stack traceback:
[06/11/2012 10:47:22] [C]: in function 'doTeleportThing'
[06/11/2012 10:47:22] data/movements/scripts/Teleport.lua:3: in function <data/movements/scripts/Teleport.lua:1>
 
Try this:

LUA:
local teleportpos = {x=999, y=1000, z=7} --The position where player will be teleported
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
	if getPlayerStorageValue(cid, 85987) >= 1 then --dont forget to edite to your rebirth storage
		doTeleportThing(cid, teleportpos)
	else
		doTeleportThing(cid, fromPosition, false)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Sorry, only rebirthed players can pass.')
		return true
	end
end
 
Last edited:
Back
Top