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

How to make this script work

calum69

New Member
Joined
Aug 12, 2007
Messages
346
Reaction score
3
Location
Great Britain
what im looking for is like the poi seals, once you use a teleport it stores the information so you can pass to get to the reward room.

what im looking for is i have 3 teleports so each teleport you use gets stored and once you have used all three teleports you can pass a tile to get to the reward room.

if you havent touched all three teleports it kicks you off and says "you need to access all three mainframes befor you can get your reward"

i had a look over the function of the poi teleports and tried editing them to work with what i need so i was wondering if somone could explain or show me an example script so i can get it working
 
movements/scripts/teleports.lua
Code:
function onStepIn(cid, item, position, fromPosition, toPosition)
	if item.actionid >= 49391 and item.actionid <= 49393 then
		setPlayerStorageValue(cid, item.actionid, 1)
	elseif item.actionid == 49394 then
		if getPlayerStorageValue(cid, 49391) <= 0 or getPlayerStorageValue(cid, 49392) <= 0 or getPlayerStorageValue(cid, 49393) <= 0 then
			doTeleportThing(cid, fromPosition)
		end
	end			
return true
end

movements/movements.xml
PHP:
<movevent type="StepIn" actionid="49391-49394" event="script" value="teleports.lua"/>

Set actionid 49391, 49392, 49393 on the teleports and actionid 49394 on the tile.
 
Back
Top