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

"you can just enter this portal once"

Hmpfot

New Member
Joined
Apr 19, 2009
Messages
72
Reaction score
0
Hello mates!

Im looking for a script that makes it possible to just enter a teleport once, im doing a banshee quest on my 100% custom maded map and i want a portal that u just can enter once so u dont HUNT in there, you kno what i mean? so when you enter it first time it works then 2nd time u go in there it says

"you can only enter this portal once"

plz help me :)
 
Looks like this now

PHP:
function onStepin(cid, item, position, fromPosition)
toposition = {X 1109,Y 1184,Z 10}
 
if getPlayerStorageValue(cid, 777) == -1 then
   setPlayerStorageValue(cid, 777, 1)
   doTeleportThing(cid, toposition)
else
   doTeleportThing(cid, fromPosition)
   doPlayerSendCancel("You can enter this portal only once!")
return false
end
 
LOL u can't configure postions? xd
Lua:
function onStepin(cid, item, position, fromPosition)
local toposition = {x = 1109, y = 1184, z = 10}
 
if getPlayerStorageValue(cid, 32412) == -1 then
   setPlayerStorageValue(cid, 32412, 1)
   doTeleportThing(cid, toposition)
else
   doTeleportThing(cid, fromPosition)
   doPlayerSendCancel("You can enter this portal only once!")
end
return false
end
 
nah didnt worked, dont kno what im doin wrong :S i put it in movements/scripts but still dont work :(

but thx anyways :)


yours, hmpf~
 
@Hmpfot,

This is working, genius
LOL u can't configure postions? xd
Lua:
function onStepin(cid, item, position, fromPosition)
local toposition = {x = 1109, y = 1184, z = 10}
 
if getPlayerStorageValue(cid, 32412) == -1 then
   setPlayerStorageValue(cid, 32412, 1)
   doTeleportThing(cid, toposition)
else
   doTeleportThing(cid, fromPosition)
   doPlayerSendCancel("You can enter this portal only once!")
end
return false
end
 
oh haha didnt kno anythin about that, wouild be kind if u could tell me what to do here too if im not too annoying, i just started workin with ot's like a week ago so im not good at all but i can always become better :)

Thx

yours, hmpf~
 
[30/06/2011 22:36:16] [Warning - BaseEvents::loadFromXml] Cannot open movements.xml file.
[30/06/2011 22:36:16] Line: 857, Info: Extra content at the end of the document


[30/06/2011 22:36:16] > ERROR: Unable to load MoveEvents!




hmm? :S
 
[30/06/2011 22:36:16] [Warning - BaseEvents::loadFromXml] Cannot open movements.xml file.
[30/06/2011 22:36:16] Line: 857, Info: Extra content at the end of the document


[30/06/2011 22:36:16] > ERROR: Unable to load MoveEvents!




hmm? :S

Teamviewer? You must've done something wrong.
Remember that the thing you put in the xml has to be inside the main tags.
 
i cant post it here? but we r getting closer too!!!! :D


[30/06/2011 22:52:34] [Warning - Event::loadScript] Event onStepIn not found (data/movements/scripts/BansheeTeleport.lua)
 
there u go!

PHP:
<?xml version="1.0" encoding="UTF-8"?>
<movements>
	<movevent type="StepIn" actionid="32412" event="script" value="BansheeTeleport.lua"/>
 	<!-- Decaying tiles -->
	<movevent type="StepIn" itemid="293" event="script" value="decay.lua"/>
	<movevent type="StepIn" itemid="461" event="script" value="decay.lua"/>

	<!-- Swimming -->
	<movevent type="StepIn" itemid="4828-4831" event="script" value="swimming.lua"/>
	<movevent type="StepIn" itemid="7943-7954" event="script" value="swimming.lua"/>

	<!-- Underwater drown -->
	<movevent type="StepIn" fromid="5405" toid="5410" event="script" value="drown.lua"/>
	<movevent type="StepOut" fromid="5405" toid="5410" event="script" value="drown.lua"/>

	<!-- (Depot & Level) tiles -->
	<movevent type="StepIn" itemid="416" event="script" value="tiles.lua"/>
	<movevent type="StepOut" itemid="417" event="script" value="tiles.lua"/>
	<movevent type="StepIn" itemid="426" event="script" value="tiles.lua"/>
	<movevent type="StepOut" itemid="425" event="script" value="tiles.lua"/>
	<movevent type="StepIn" itemid="446" event="script" value="tiles.lua"/>
	<movevent type="StepOut" itemid="447" event="script" value="tiles.lua"/>
	<movevent type="StepIn" itemid="3216" event="script" value="tiles.lua"/>
	<movevent type="StepOut" itemid="3217" event="script" value="tiles.lua"/>
	<movevent type="StepIn" itemid="3202" event="script" value="tiles.lua"/>
	<movevent type="StepOut" itemid="3215" event="script" value="tiles.lua"/>
	<movevent type="StepIn" itemid="11059" event="script" value="tiles.lua"/>
	<movevent type="StepOut" itemid="11060" event="script" value="tiles.lua"/>
	<!-- <movevent type="StepIn" itemid="8714" event="script" value="tiles.lua"/> -->

	<!-- Traps -->
	<movevent type="StepIn" itemid="1510" event="script" value="trap.lua"/>
	<movevent type="StepOut" itemid="1511" event="script" value="trap.lua"/>
	<movevent type="StepIn" itemid="1512" event="script" value="trap.lua"/>
	<movevent type="StepOut" itemid="1513" event="script" value="trap.lua"/>
	<movevent type="StepIn" itemid="2579" event="script" value="trap.lua"/>
	<movevent type="RemoveItem" itemid="2579" event="script" value="trap.lua"/>

	<!-- Citizen teleport -->
	<movevent type="StepIn" itemid="1387" event="script" value="citizen.lua"/>


cldnt paste all was too long but this is how it looks!
 
Back
Top