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

GlobalEvent [MOD]Full auto WAR-TeamBattle Event(with random rewards)

time between is 20 min , then you can now be able to talk to npc too start again . Sure you waited 20 min?
 
yea dude i waited more like an hour =p and the npc still said the message where it wouldnt allow me
 
not work with npc
when say "hi"
21:37 Eventer: Hello Admin Andrewss. If you want to join the Battle just tell me.
when say "battle" nothing
:( please help :( :(:(:(:(:(:(:(:(:(:(
 
shorter?
Lua:
function getBlue()
    return db.getResult("SELECT `blue` FROM `Teams` WHERE `id`='" .. 1):getDataInt("blue")  
end

function getRed()
    return db.getResult("SELECT `red` FROM `Teams` WHERE `id`='" .. 1):getDataInt("red")
end

function removeRed()
    return db.executeQuery("UPDATE `Teams` SET `red` = `red` - " .. 1 .. " WHERE `id`= '" .. 1 .. "' LIMIT 1;")
end

function removeBlue()
    return db.executeQuery("UPDATE `Teams` SET `blue` = `blue` - " .. 1 .. " WHERE `id`= '" .. 1 .. "' LIMIT 1;")
end

function resetBlue()
    return db.executeQuery("UPDATE `Teams` SET `blue` = " .. 0 .. " WHERE `id`= '" .. 1 .. "' LIMIT 1;")
end

function resetRed()
    return db.executeQuery("UPDATE `Teams` SET `red` = " .. 0 .. " WHERE `id`= '" .. 1 .. "' LIMIT 1;")
end

Why didn't u add checks and why you haven't results freeying (Dunno if I spelled it correct), ye ye keep codes with memory leaks... =\

Correct one:
Code:
function something()
	local res = db.getResult("SELECT `field` FROM `table`;")
	local value = 0
	if(res:getID() ~= -1) then
		value = res:getDataInt("field")
		res:free()
	end
	return value
end
 
ye, but there won't be crash :p dw derek is just paranoid
well, the leak will just make server spend a bit more % ram
 
Last edited:
ye, but there won't be crash :p dw derek is just paranoid
well, the leak will just make server spend a bit more % ram

And a bit more % ram can lead to crash on 32-bit machines, kthx.
 
When 2 chars enter arena and they fight, one of them is at black hp, instead of teleport and giving rewards to winning team nothing happens and in console this thing appears (picture in attachement). Help please. I haz TFS 0.3.6 on tibia 8.54.
 

Attachments

Last edited:
@up i tested this on the same distro as u bro, works 100% perfect u must have done something wrong =o
 
Back
Top