johnsamir
Advanced OT User
Hi
Im using a change map global event in my server tfs 1.4 taken from here:
the change map work partially good, the problem is that it always teleport player to teleport when log in, does not matter if player is in current town already
so i have been looking how to fix this but with no solution, this part of the script in charge to check or do this goes at creaturescripts/login.lua:
have tried with
and
all editions or does not work or works partially like fordoes not check if player is not in current town to teleport when log in and have to wait until the next map change or it does simply teleport the player to the current town, temple no matter if player is in current town or not
can somebody give me a hand with this?
thank
Im using a change map global event in my server tfs 1.4 taken from here:
GlobalEvent - Change Map [TFS 1.X]
Hello, well here is a simple script. That people can use in their War Server. This will change map every 30 minutes, but you can decide for how long until it changes. In globalevents/globalevents.xml, paste this line: And now into globalevents/scripts and create new lua and name it...
otland.net
the change map work partially good, the problem is that it always teleport player to teleport when log in, does not matter if player is in current town already
so i have been looking how to fix this but with no solution, this part of the script in charge to check or do this goes at creaturescripts/login.lua:
Lua:
local currentTown = Game.getStorageValue(100) or 1
if currentTown > 0 and player:getTown() ~= currentTown then
player:teleportTo(Town(currentTown):getTemplePosition())
end
have tried with
Code:
if currentTown > 0 and player:getPosition() ~= currentTown or if player:getStorageValue(43214) then
player:teleportTo(Town(currentTown):getTemplePosition())
end
Code:
if not currentTown then
player:teleportTo(Town(currentTown):getTemplePosition())
end
Code:
if not currentTown and player:getTown() ~= currentTown then -- code original
player:teleportTo(Town(currentTown):getTemplePosition())
return true
--aregado war
elseif player:getPosition(Town(currentTown)) == currentTown then
doPlayerSendTextMessage(cid, 20, "This is the current town")
return true
end
return true
end
all editions or does not work or works partially like fordoes not check if player is not in current town to teleport when log in and have to wait until the next map change or it does simply teleport the player to the current town, temple no matter if player is in current town or not
can somebody give me a hand with this?
thank