look this code:
this works as follows, teleports all players to a certain place.
but I want to add if the player is with a storage "X" then the player dont go to new position.
plx helpe me and sorry my inglish
PHP:
local configs = {townStart = 13, turn = 1, regnLife = true, broadCast = true, townProceed = false}
function onThink(interval, lastExecution)
for i,b in pairs(getOnlinePlayers()) do
local creature = getPlayerByName(b)
if (configs.regnLife == true) then
doCreatureAddHealth(creature, getCreatureMaxHealth(creature))
end
if (configs.broadCast == true) then
doBroadcastMessage("Changing TURN! ["..configs.turn.."]")
end
if (configs.townProceed == true) then
configs.townStart = configs.townStart+1
end
configs.turn = configs.turn + 1
doTeleportThing(creature, getTownTemplePosition(configs.townStart))
print("Turn changed! Town "..configs.townStart.." and Turn "..configs.turn)
end
return TRUE
end
this works as follows, teleports all players to a certain place.
but I want to add if the player is with a storage "X" then the player dont go to new position.
plx helpe me and sorry my inglish