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

Close Theard

Printer

if Printer then print("LUA") end
Senator
Premium User
Joined
Dec 27, 2009
Messages
5,780
Solutions
31
Reaction score
2,299
Location
Sweden?
Closed!
 
Last edited:
Troll får denna nu :(

[05/02/2012 00:12:39] [Error - LuaScriptInterface::loadFile] data/movements/scripts/leavetp.lua:2: unexpected symbol near 'local'
[05/02/2012 00:12:39] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/leavetp.lua)
[05/02/2012 00:12:39] data/movements/scripts/leavetp.lua:2: unexpected symbol near 'local'

I got to sleep, but please someone make this script :(
 
On Bogart's replace this lines:
Code:
doPlayerSendTextMessage(cid, 21, "You have to wait "..c.." minutes to get inside again!.")
doPlayerSendTextMessage(cid, 21, "You have to wait "..b.." minutes to get inside again!.")

With this:
Code:
doPlayerSendTextMessage(cid, 21, "You have to wait "..t.c.." minutes to get inside again!.")
doPlayerSendTextMessage(cid, 21, "You have to wait "..t.b.." minutes to get inside again!.")
 
Troll får dessa errors:
[05/02/2012 08:22:31] [Error - LuaScriptInterface::loadFile] data/movements/scripts/leavetp.lua:1: unexpected symbol near '['
[05/02/2012 08:22:31] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/leavetp.lua)
[05/02/2012 08:22:31] data/movements/scripts/leavetp.lua:1: unexpected symbol near '[
'

I edited what dantrrix told me i get this at bogart script:
I have even enter a tp i get same msg :(
08:27 You have to wait 60 minutes to get inside again!.
08:27 You have to wait 180 minutes to get inside again!.
 
doPlayerSendTextMessage(cid, 21, "You have to wait "..c.." minutes to get inside again!.")

doPlayerSendTextMessage(cid, 21, "You have to wait "..b.." minutes to get inside again!.")
-->
t.c
and :
t.b

---
I have not tested the script, only error noticed
 
doPlayerSendTextMessage(cid, 21, "You have to wait "..t.c.." minutes to get inside again!.")

doPlayerSendTextMessage(cid, 21, "You have to wait "..t.b.." minutes to get inside again!.")
 
c -> t.c
b -> t.b

I did that already i got this msg: when i enter the tp, i dont get teleported and i get this all the time:
08:27 You have to wait 60 minutes to get inside again!.
08:27 You have to wait 180 minutes to get inside again!.

I wonder will this go in movements or action?
If its movement i get this:
[07/02/2012 21:03:31] data/movements/scripts/entertp.lua:3: attempt to index global 'item' (a nil value)
[07/02/2012 21:03:31] [Warning - Event::loadScript] Cannot load script (data/movements/scripts/entertp.lua)
 
Last edited:
entertp.lua
LUA:
local config = {
	storage = 40000, --storage value to set exhaustion!
	pos = {x=372, y=817, z=7} -- telepos
	}

function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if exhaustion.get(cid, config.storage) == false then
				doPlayerSendTextMessage(cid, 19, "Happy Hunting!") --edit it :P
				doTeleportThing(cid, config.pos)
		else
			doPlayerSendTextMessage(cid, 19, "You have to wait for "..getPlayerStorageValue(cid, config.storage)-os.time().." seconds to enter again.")
			doTeleportThing(cid, fromPos)
		end
	end
end

leavetp.lua
LUA:
local config = {
	storage = 40000,
	prem = 60, --times in seconds!
	free = 180, --3 minutes
	pos = {x=372, y=811, z=7} --teleport position
	}

function onStepIn(cid, item, pos, fromPos)
	if isPlayer(cid) then
		if isPremium(cid) then
			exhaustion.set(cid, config.storage, config.prem)
			doPlayerSendTextMessage(cid, 19, "Please wait 1 minute to enter the teleport again.")
		else
			exhaustion.set(cid, config.storage, config.free)
			doPlayerSendTextMessage(cid, 19, "Please wait 3 minute to enter the teleport again.")
		end
	doTeleportThing(cid, config.pos)
	end
end

xml-> movements.xml
XML:
  <movevent type="StepIn" actionid="4405" event="script" value="entertp.lua"/>
  <movevent type="StepIn" actionid="4406" event="script" value="leavetp.lua"/>

IMPORTANT!
At data/lib/exhaustion.lua edit those lines
LUA:
get = function (cid, storage)
		--if(getPlayerFlagValue(cid, PlayerFlag_HasNoExhaustion)) then
			--return false
		--end
Comment the part out like me to test the script with a GOD char!
GMs do not have exhaustion times!
If you comment it out you can test it with GOD chars to.

Here's a video of the working script -> porttest.wmv - YouTube
 
Last edited:
I need help when i trying to enter the entertp i get this with free account:
Code:
17:12 You have to wait for -94 seconds to enter again.
17:12 You have to wait for -95 seconds to enter again.
17:12 You have to wait for -96 seconds to enter again.

Free Account: Then i tested enter the leave tp it works, i waited 3min then i trying enter the entertp it start for -1, -2, -3

Premium account works 100% free doesnt work :(

Please help :(
 
Last edited:
Back
Top