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

Zombie Event - Without Bugs! Work on all TFS

Tells me that the server could not load the file cause of a symbol on line 1 too close too '<' what's this mean?
Also is this saved as an xml or lua...can't figure that out... >.>
 
It worked here, given the appropriate awards and everything. There is a mistake here only the first player can only be teleported to the arena zombie with the! Zombie join the other fiction in the same place when they do this command, but I put the player in the arena to test, as I said it worked but then the winner stands alone in the arena is not out of the command! leave zombie, he's always 2 sqm and not leave the arena. I think if I put a teleporter in the Arena will bugar, because if a player leaves the time of the event by the event bugara teleport.

What can I do?
:p--sorry my english--:p

Obs:Look, even though some errors the mod is very good, thanks for sharing, and help me solve this to be grateful. sryy English... ;[
 
Code:
19/12/2012 22:44:24] [Lua Error] 
[19/12/2012 22:44:24] [string "loadBuffer"]:3: '(' expected near 'onTimer'
[19/12/2012 22:44:24] [Warning - Event::loadScript] Cannot load script (domodlib("zombieEvent_conf")
[19/12/2012 22:44:24] function on onTimer()
[19/12/2012 22:44:24] 	addEvent(function()
[19/12/2012 22:44:24] 						if getStorage(zombieStorageStatus) == 2 then return true end
[19/12/2012 22:44:24] 						if getStorage(zombieStorageStatus) == 1 and #getZombiesEventPlayers() >= zombieMinPlayers then
[19/12/2012 22:44:24] 							doSetStorage(zombieStorageStatus, 2)
[19/12/2012 22:44:24] 							for i = 1, math.random(2) do
[19/12/2012 22:44:24] 								spawnNewZombie(getThingPos(cid))
[19/12/2012 22:44:24] 							end
[19/12/2012 22:44:24] 							for _, v in ipairs(getZombiesEventPlayers()) do
[19/12/2012 22:44:24] 								addPlayerToZombiesArea(v, false)
[19/12/2012 22:44:24] 							end
[19/12/2012 22:44:24] 							return doBroadcastMessage('Zombie Event is started. We have '..#getZombiesEventPlayers()..' players on area')
[19/12/2012 22:44:24] 						end
[19/12/2012 22:44:24] 						for _, v in ipairs(getZombiesEventPlayers()) do
[19/12/2012 22:44:24] 							kickPlayerFromZombiesArea(v)
[19/12/2012 22:44:24] 						end
[19/12/2012 22:44:24] 						return doBroadcastMessage('Zombie Event is stopped. We could not find enough players.')
[19/12/2012 22:44:24] 						end,
[19/12/2012 22:44:24] 						timeOnJoinToEvent * 1000 * 60)
[19/12/2012 22:44:24]  
[19/12/2012 22:44:24] 	return setZombieEventStart()
[19/12/2012 22:44:24] end
[19/12/2012 22:44:24] )
[19/12/2012 22:44:24] [string "loadBuffer"]:3: '(' expected near 'onTimer'[code]
 
how to join to zombie event?
I said "!zombie" and nothing doing....
and where is teleport?
----------------------------------
jak dołączyć do zombie eventu?
pisze "!zombie" i nic się nie dzieje..nawet tego napisu co pisze nie widać.
i gdzie jest teleport? o którym mowa w tym broadcast, że się znajduję w depo.
 
i get this
[Error - GlobalEvents::timer] Couldn't execute event: zombieTime
 
Instead of using
PHP:
globalevent name="zombieTime" time="23:01"
could you set it to run every 3-4 hours by using this
PHP:
globalevent name="zombieTime" interval="14400"

Is that possible to do? So the event runs more than once a day
 
Youst change to:
Code:
globalevent name="zombieTime" interval="43200"
 
Lua:
<?xml version='1.0' encoding='ISO-8859-1'?>
<mod name='Zombie Event' version='2.0' author='Oskar' contact='[email protected]' enabled='yes'>
<config name='zombieEvent_conf'><![CDATA[
zombieRewards = {
				random = false, --czy ma losowac nagrode
				rew = {2160,5} --nagrody, wypelniamy w ten sposob {itemId1, count1, itemId2, count2 ...}
				}

zombieMaxPlayers = 1 --ilosc graczy wymaganych do rozpoczecia eventu
zombieMinPlayers = 1 --minimalna ilosc graczy
zombieAccesToIgnore = 5 --acces ktory nie jest liczony jako osoba uczestniczaca w evencie
timeOnJoinToEvent = 10 --ilosc minut ktora czeka skrypt na wymagana ilosc graczy

zombieJoinType = 'booth' --movement, talkaction lub oba, sposob dolaczania sie do eventu

-- POSITIONS
zombieKickPosition = {x=1517,y=1501,z=7} --gdzie wyrzuca graczy po wyrzuceniu z eventu (przegranej)
zombieEnterPosition = {x=1639,y=1269,z=7} --pozycja gdzie teleportuje graczy po rozpoczeciu eventu

zombieCenterRoomPosition = {x=1638,y=1269,z=7} --idealny srodek pomieszczenia
zombieRangeX_RangeY = {22,18} --szerokosc oraz wysokosc pomieszczenia dzielona przez dwa (liczone w najszerszych miejscach)

zombieStorageStatus = 13300 --storage uzywane do eventu

ZOMBIE = {
		  --UWAGA! NAZWY POTWORÓW KONIECZNIE PISANE Z MAŁYCH LITER!
		  --['nazwa potwora'] = {szansa na stworzenie, szansa na zainfekowanie}
			['horned mutant'] = {20,1},
			['vile centurion'] = {15,2},
			['daidalost'] = {10,4},
			['mongrel man'] = {5,8},
			['propell zombie'] = {2,16},
			['scrathclaw'] = {1,32}
			}

function chooseZombieMonster()
local monster = false
for k, v in pairs(ZOMBIE) do
	monster = monster or (math.random(100) <= v[1] and k or false)
end
return monster or chooseZombieMonster()
end

function isWalkable(pos, creature, proj, pz)
if getTileThingByPos({x=pos.x,y=pos.y,z=pos.z,stackpos=0}).itemid == 0 then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
	pos.stackpos = i
	local tile = getTileThingByPos(pos)
		if tile.itemid ~= 0 and not isCreature(tile.uid) then
			if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
				return false
			end
		end
end
return true
end

local _f = doTeleportThing
function doTeleportThing(cid, newpos, ignoreBlocking)
	return (ignoreBlocking or isWalkable(newpos, true, true, false) or false) and _f(cid, newpos, true)
end
 
function getZombiesEventPlayers()
	local players = {}
	for _, cid in pairs(getPlayersOnline()) do
		if getCreatureStorage(cid, zombieStorageStatus) == 1 and getPlayerAccess(cid) < zombieAccesToIgnore then
			table.insert(players, cid)
		end
	end
	return players
end

function kickPlayerFromZombiesArea(cid)
	doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
	doTeleportThing(cid, zombieKickPosition, true)
	doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
	return doCreatureSetStorage(cid, zombieStorageStatus, 0) and doCreatureSetNoMove(cid, false)
end

function loseOnZombieArena(cid)
    local players, msg = getZombiesEventPlayers(), ''
	doCreatureSetStorage(cid, zombieStorageStatus+1, 0)
    kickPlayerFromZombiesArea(cid)
	doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, 'You are dead.')
    if(#getZombiesEventPlayers() <= 1) then
        local winner = getZombiesEventPlayers()[1] or players[1]
        if winner then
            if zombieRewards.random then
				local i = math.random(#zombieRewards.rew/2)
				local rewardItem = doPlayerAddItem(winner, zombieRewards.rew[i*2-1], zombieRewards.rew[i*2], true)
			else
				for i = 1, #zombieRewards.rew/2 do
					doPlayerAddItem(winner, zombieRewards.rew[i*2-1], zombieRewards.rew[i*2], true)
				end
			end
			doPlayerSendTextMessage(winner, MESSAGE_INFO_DESCR, 'You won Zombie Event.')
            msg = getCreatureName(winner) .. ' won Zombie Event.'
            kickPlayerFromZombiesArea(winner)
        else
            msg = 'Zombie Event finished! No one win!'
        end
		if getSpectators(zombieCenterRoomPosition, zombieRangeX_RangeY[1], zombieRangeX_RangeY[2]) then
			for _, v in ipairs(getSpectators(zombieCenterRoomPosition, zombieRangeX_RangeY[1], zombieRangeX_RangeY[2])) do
				if isMonster(v) then
					doRemoveThing(v)
				elseif isPlayer(v) then
					kickPlayerFromZombiesArea(v)
				end
			end
		end
		doSetStorage(zombieStorageStatus, 0)
    end
return (msg ~= '' and doBroadcastMessage(msg) or true)
end
 
function addPlayerToZombiesArea(cid, block)
doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
doTeleportThing(cid, zombieEnterPosition, true)
doSendMagicEffect(getThingPosition(cid), CONST_ME_TELEPORT)
return doCreatureSetStorage(cid, zombieStorageStatus, 1) and doCreatureSetNoMove(cid, block)
end
 
function spawnNewZombie(fromPosition, n)
local n, pos = n or 0, {x = zombieCenterRoomPosition.x + math.random(-zombieRangeX_RangeY[1],zombieRangeX_RangeY[1]), y = zombieCenterRoomPosition.y + math.random(-zombieRangeX_RangeY[2],zombieRangeX_RangeY[2]), z = zombieCenterRoomPosition.z}
if isWalkable(pos, true, true, true) then 
	local monster = chooseZombieMonster()
    local cid = doCreateMonster((monster == '' and 'horned mutant' or monster), pos, false)
	doSendMagicEffect(pos, CONST_ME_MORTAREA)
	return (isMonster(cid) and registerCreatureEvent(cid, 'zombieEventDeath') and registerCreatureEvent(cid, 'zombieEventThink')) and (fromPosition and doSendDistanceShoot(fromPosition, pos, CONST_ANI_SUDDENDEATH) or true)
end
return (n < 200 and spawnNewZombie(fromPosition, n+1) or true)
end

function setZombieEventStart()
if getStorage(zombieStorageStatus) < 1 then 
	doSetStorage(zombieStorageStatus, 1)
	doBroadcastMessage('Zombie Arena Event is started. If you want join to event say !zombie join or enter the teleport in depot. We wait on '..zombieMaxPlayers..' players.')
	if getSpectators(zombieCenterRoomPosition, zombieRangeX_RangeY[1], zombieRangeX_RangeY[2]) then
		for _, cid in pairs(getSpectators(zombieCenterRoomPosition, zombieRangeX_RangeY[1], zombieRangeX_RangeY[2])) do
			if isMonster(cid) then doRemoveThing(cid) end
		end
	end
end
return true
end
]]></config>

<event type='death' name='zombieEventDeath' event='script'><![CDATA[
domodlib('zombieEvent_conf')
function onDeath(cid)
	for i = 1, math.random(2) do
		spawnNewZombie(getThingPos(cid))
	end
	doSendMagicEffect(getThingPos(cid), CONST_ME_MORTAREA)
	return doCreatureSay(cid, 'I\'ll be back!', TALKTYPE_ORANGE_1)
end
]]></event>

<event type='think' name='zombieEventThink' event='script'><![CDATA[
domodlib('zombieEvent_conf')
function onThink(cid)
local name, target = getCreatureName(cid):lower(), getCreatureTarget(cid)
if isMonster(cid) and ZOMBIE[name] and target and isPlayer(target) then
	if getCreatureStorage(target, zombieStorageStatus+1) < os.time() and getDistanceBetween(getThingPos(target), getThingPos(cid)) <= 1 and math.random(100) <= ZOMBIE[name][2] then
		doSendAnimatedText(getThingPos(target), 'INFECTED!', COLOR_LIGHTGREEN)
		doCreatureSetStorage(target, zombieStorageStatus+1, os.time() + 3)
		doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, 'You are infected. You can cure, just say "disable infection", but remember, you have only three seconds on it.')
		return addEvent(function()
								if isPlayer(target) then
									if getCreatureStorage(target, zombieStorageStatus+1) ~= os.time() then
										return false
									end
									doCreatureAddHealth(target, getCreatureMaxHealth(target))
									return loseOnZombieArena(target) 
								end return true end,
								3000,
								target)
	end
end
return true
end
]]></event>

<talkaction words='disable' event='script'><![CDATA[
domodlib('zombieEvent_conf')
function onSay(cid, words, param, channel)
if getCreatureStorage(cid, zombieStorageStatus+1) < os.time() or param ~= 'infection' then
	return false
end
doSendAnimatedText(getThingPos(cid), 'CURE!', COLOR_LIGHTBLUE)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You use an antidote on infection.')
return doCreatureSetStorage(cid, zombieStorageStatus+1, 0)
end
]]></talkaction>

<event type='statschange' name='zombieEventStatsChange' event='script'><![CDATA[
domodlib('zombieEvent_conf')
function onStatsChange(cid, attacker, type, combat, value)
if isMonster(attacker) and isPlayer(cid) and ZOMBIE[getCreatureName(attacker):lower()] and type == STATSCHANGE_HEALTHLOSS and math.abs(value) >= getCreatureHealth(cid) then
	doCreatureAddHealth(cid, getCreatureMaxHealth(cid))
	return loseOnZombieArena(cid) and false
end
return true
end
]]></event>

<globalevent name='zombieStart' type='start' event='script'><![CDATA[
domodlib('zombieEvent_conf')
function onStartup()
	return doSetStorage(zombieStorageStatus, 0)
end
]]></globalevent>

<moveevent type='stepIn' uniqueid='3000' event='script'><![CDATA[
domodlib('zombieEvent_conf')
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if zombieJoinType == 'talkaction' then
	return doTeleportThing(cid, fromPosition, true) end
local msg = ''
if isPlayer(cid) then
	if getCreatureCondition(cid, CONDITION_INFIGHT) and getPlayerAccess(cid) < zombieAccesToIgnore then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a PZ! You have to get rid of it. Somehow.')
	end
	if getPlayerAccess(cid) >= zombieAccesToIgnore then
		setZombieEventStart()
		return doTeleportThing(cid, zombieEnterPosition, true)
	elseif #getZombiesEventPlayers() < zombieMaxPlayers and getStorage(zombieStorageStatus) == 1 then
		addPlayerToZombiesArea(cid, true)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You are player of number '..#getZombiesEventPlayers()..', which join to event.')
		if #getZombiesEventPlayers() == zombieMaxPlayers then
			doSetStorage(zombieStorageStatus, 2)
			for i = 1, math.random(2) do
				spawnNewZombie(getThingPos(cid))
			end
			for _, v in pairs(getZombiesEventPlayers()) do
				addPlayerToZombiesArea(v, false)
			end
			msg = 'Zombie Event is started. We have ' .. zombieMaxPlayers .. ' players, which joined to event. Have fun!'
		else
			msg = getCreatureName(cid) .. ' has entered a Zombie Arena. We still need ' .. zombieMaxPlayers - #getZombiesEventPlayers() .. ' players.'
		end
		return (msg ~= '' and doBroadcastMessage(msg) or true)
	else
		return doTeleportThing(cid, fromPosition, true) and doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Arena is full.')
	end
end
return true
end
]]></moveevent>

<talkaction words='!zombie' event='script'><![CDATA[
domodlib('zombieEvent_conf')
function onSay(cid, words, param, channel)
if zombieJoinType == 'movement' then
	return false end
local msg = ''
if isInArray({'join','add','go','joined'}, param:lower()) then
	if getCreatureCondition(cid, CONDITION_INFIGHT) and getPlayerAccess(cid) <= zombieAccesToIgnore then
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have a PZ! You have to get rid of it. Somehow.')
	end
	if getPlayerAccess(cid) >= zombieAccesToIgnore then
		setZombieEventStart()
		return doTeleportThing(cid, zombieEnterPosition, true)
	elseif #getZombiesEventPlayers() < zombieMaxPlayers and getStorage(zombieStorageStatus) == 1 then
		addPlayerToZombiesArea(cid, true)
		doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You are player of number '..#getZombiesEventPlayers()..', which join to event.')
		if #getZombiesEventPlayers() == zombieMaxPlayers then
			doSetStorage(zombieStorageStatus, 2)
			for i = 1, math.random(2) do
				spawnNewZombie(getThingPos(cid))
			end
			for _, v in pairs(getZombiesEventPlayers()) do
				addPlayerToZombiesArea(v, false)
			end
			msg = 'Zombie Event is started. We have ' .. zombieMaxPlayers .. ' players, which joined to event. Have fun!'
		else
			msg = getCreatureName(cid) .. ' has entered a Zombie Arena. We still need ' .. zombieMaxPlayers - #getZombiesEventPlayers() .. ' players.'
		end
		return (msg ~= '' and doBroadcastMessage(msg) or true)
	else
		return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, (getStorage(zombieStorageStatus) == -1 and 'Event is no started.' or 'Arena is full.'))
	end
elseif isInArray({'leave','abort','delete'}, param:lower()) then
	if getStorage(zombieStorageStatus) < 2 then
		doCreatureSetStorage(cid, zombieStorageStatus, 0)
		doCreatureSetNoMove(cid, false)
		return doTeleportThing(cid, getCreatureLastPosition(cid), true)
	end
	return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You can\'t leave from arena if event is already running.')
end
return true
end
]]></talkaction>

<globalevent name="zombieTime" time="19:01" event="script"><![CDATA[
domodlib("zombieEvent_conf")
function onTimer()
	addEvent(function()
						if getStorage(zombieStorageStatus) == 2 then return true end
						if getStorage(zombieStorageStatus) == 1 and #getZombiesEventPlayers() >= zombieMinPlayers then
							doSetStorage(zombieStorageStatus, 2)
							for i = 1, math.random(2) do
								spawnNewZombie(getThingPos(cid))
							end
							for _, v in ipairs(getZombiesEventPlayers()) do
								addPlayerToZombiesArea(v, false)
							end
							return doBroadcastMessage('Zombie Event is started. We have '..#getZombiesEventPlayers()..' players on area')
						end
						for _, v in ipairs(getZombiesEventPlayers()) do
							kickPlayerFromZombiesArea(v)
						end
						return doBroadcastMessage('Zombie Event is stopped. We could not find enough players.')
						end,
						timeOnJoinToEvent * 1000 * 60)
						
	return setZombieEventStart()
end
]]></globalevent>

<event type="login" name="zombieEventLogin" event="script"><![CDATA[
function onLogin(cid)
	doCreatureSetStorage(cid, zombieStorageStatus, 0)
	return registerCreatureEvent(cid, 'zombieEventStatsChange')
end
]]></event>
</mod>
 
i dont have a mod ore lib folder is use the tfs 2.15 where i need to put this file then?
 
Code:
[20:23:15.297] > Loading zombie.xml...[Error - Event::checkScript] Event onTime not found (domodlib("zombieEvent_conf")
[20:23:15.297] function onTimer()
[20:23:15.297] addEvent(function()
[20:23:15.297] if getStorage(zombieStorageStatus) == 2 then return true end
[20:23:15.297] if getStorage(zombieStorageStatus) == 1 and #getZombiesEventPlayers() >= zombieMinPlayers then
[20:23:15.297] doSetStorage(zombieStorageStatus, 2)
[20:23:15.297] for i = 1, math.random(2) do
[20:23:15.297] spawnNewZombie(getThingPos(cid))
[20:23:15.297] end
[20:23:15.297] for _, v in ipairs(getZombiesEventPlayers()) do
[20:23:15.298] addPlayerToZombiesArea(v, false)
[20:23:15.298] end
[20:23:15.298] return doBroadcastMessage('Zombie Event is started. We have '..#getZombiesEventPlayers()..' players on area')
[20:23:15.298] end
[20:23:15.298] for _, v in ipairs(getZombiesEventPlayers()) do
[20:23:15.298] kickPlayerFromZombiesArea(v)
[20:23:15.298] end
[20:23:15.298] return doBroadcastMessage('Zombie Event is stopped. We could not find enough players.')
[20:23:15.298] end,
[20:23:15.298] timeOnJoinToEvent * 1000 * 60)

[20:23:15.298] return setZombieEventStart()
[20:23:15.298] end
[20:23:15.298] )


I got this error to. I use 0.3.7 rev 5969. What can I do to fix it? :) Thanks!


EDIT: fixed the error at startup. I changed "onTimer()" to "onTime(time)".

But when the event started and a player won. This error comes up in console:

Code:
> Broadcasted message: "Zombie Arena Event is started. If you want join to event say !zombie join or enter the teleport in depot. We wait on 1 players.".
> Broadcasted message: "Zombie Event is started. We have 1 players, which joined to event. Have fun!".
> Broadcasted message: "Ee won Zombie Event.".

[20:38:21.481] [Error - CreatureScript Interface]
[20:38:21.481] domodlib('zombieEvent_conf')
[20:38:21.481] function onThink(cid)
[20:38:21.481] local name, target = getCreatureName(cid):lower(), getCreatureTarget(cid)
[20:38:21.481] if isMonster(cid) and ZOMBIE[name] and target and isPlayer(target) then
[20:38:21.481] if getCreatureStorage(target, zombieStorageStatus+1) < os.time() and getDistanceBetween(getThingPos(target), getThingPos(cid)) <= 1 and math.random(100) <= ZOMBIE[name][2] then
[20:38:21.481] doSendAnimatedText(getThingPos(target), 'INFECTED!', COLOR_LIGHTGREEN)
[20:38:21.481] doCreatureSetStorage(target, zombieStorageStatus+1, os.time() + 3)
[20:38:21.481] doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, 'You are infected. You can cure, just say "disable infection", but remember, you have only three seconds on it.')
[20:38:21.481] return addEvent(function()
[20:38:21.481] if isPlayer(target) then
[20:38:21.481] if getCreatureStorage(target, zombieStorageStatus+1) ~= os.time() then
[20:38:21.481] return false
[20:38:21.481] end
[20:38:21.481] doCreatureAddHealth(target, getCreatureMaxHealth(target))
[20:38:21.482] return loseOnZombieArena(target)
[20:38:21.482] end return true end,
[20:38:21.482] 3000,
[20:38:21.482] target)
[20:38:21.482] end
[20:38:21.482] end
[20:38:21.482] return true
[20:38:21.482] end
[20:38:21.482] :onThink
[20:38:21.482] Description:
[20:38:21.482] (luaGetCreatureName) Creature not found

[20:38:21.482] [Error - CreatureScript Interface]
[20:38:21.482] domodlib('zombieEvent_conf')
[20:38:21.482] function onThink(cid)
[20:38:21.482] local name, target = getCreatureName(cid):lower(), getCreatureTarget(cid)
[20:38:21.482] if isMonster(cid) and ZOMBIE[name] and target and isPlayer(target) then
[20:38:21.483] if getCreatureStorage(target, zombieStorageStatus+1) < os.time() and getDistanceBetween(getThingPos(target), getThingPos(cid)) <= 1 and math.random(100) <= ZOMBIE[name][2] then
[20:38:21.483] doSendAnimatedText(getThingPos(target), 'INFECTED!', COLOR_LIGHTGREEN)
[20:38:21.483] doCreatureSetStorage(target, zombieStorageStatus+1, os.time() + 3)
[20:38:21.483] doPlayerSendTextMessage(target, MESSAGE_STATUS_CONSOLE_BLUE, 'You are infected. You can cure, just say "disable infection", but remember, you have only three seconds on it.')
[20:38:21.483] return addEvent(function()
[20:38:21.483] if isPlayer(target) then
[20:38:21.483] if getCreatureStorage(target, zombieStorageStatus+1) ~= os.time() then
[20:38:21.483] return false
[20:38:21.483] end
[20:38:21.483] doCreatureAddHealth(target, getCreatureMaxHealth(target))
[20:38:21.483] return loseOnZombieArena(target)
[20:38:21.483] end return true end,
[20:38:21.483] 3000,
[20:38:21.483] target)
[20:38:21.483] end
[20:38:21.483] end
[20:38:21.483] return true
[20:38:21.484] end
[20:38:21.484] :onThink
[20:38:21.484] Description:
[20:38:21.484] [string "LuaInterface::loadBuffer"]:3: attempt to index a boolean value
[20:38:21.484] stack traceback:
[20:38:21.484]    [string "LuaInterface::loadBuffer"]:3: in function <[string "LuaInterface::loadBuffer"]:2>

hmm ? :/

EDIT: The error disapeared when I chosed to have more than 1 player to start event.
 
Last edited:
[14:25:19.817] > Loading Lottery System.xml... done.
[14:25:19.825] > Loading Zombie Event.xml...[Warning - Event::loadScript] Event
onTime not found (domodlib("zombieEvent_conf")
[14:25:19.825] function onTimer()
[14:25:19.826] addEvent(function()
[14:25:19.827] if getStorage(zombieStorageStatus) == 2 then return true end
[14:25:19.828] if getStorage(zombieStorageStatus) == 1 and #getZombiesEventPlaye
rs() >= zombieMinPlayers then
[14:25:19.828] doSetStorage(zombieStorageStatus, 2)
[14:25:19.829] for i = 1, math.random(2) do
[14:25:19.829] spawnNewZombie(getThingPos(cid))
[14:25:19.830] end
[14:25:19.831] for _, v in ipairs(getZombiesEventPlayers()) do
[14:25:19.831] addPlayerToZombiesArea(v, false)
[14:25:19.832] end
[14:25:19.832] return doBroadcastMessage('Zombie Event is started. We have '..#g
etZombiesEventPlayers()..' players on area')
[14:25:19.833] end
[14:25:19.833] for _, v in ipairs(getZombiesEventPlayers()) do
[14:25:19.834] kickPlayerFromZombiesArea(v)
[14:25:19.834] end
[14:25:19.835] return doBroadcastMessage('Zombie Event is stopped. We could not
find enough players.')
[14:25:19.835] end,
[14:25:19.836] timeOnJoinToEvent * 1000 * 60)

[14:25:19.837] return setZombieEventStart()
[14:25:19.837] end
[14:25:19.838] )


any suggestions?
_________
WORK ON TfS 0.4
only change time to interval
globalevent name="zombieTime" interval="43200"
 
Back
Top