• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Fixed Guild War System for Website [include all]-[will not count frags] (TFS 0.3+)

Status
Not open for further replies.
Be patient? Why you are so in a hurry. AS he told ya that he got important exams and he said that weekend for them is tuesday aswell and since the day isn't over yet he got some time xD

If you want a perfect script, then learn to script and make yourself. You are requesting somehow everything, even small quests etc..I think the best way to make an Server is to script by urself..

Achtung be more accurate with your facts, I haven't requested "small" quests except desert quest which I had to pay for since 3-4 people failed at scripting it. Why would I be any better than them?

I don't want him to rush it if he has important exams but he said, Ill do it this holiday and so far I have seen no edit meaning I have all right to ask.
 
Achtung be more accurate with your facts, I haven't requested "small" quests except desert quest which I had to pay for since 3-4 people failed at scripting it. Why would I be any better than them?

I don't want him to rush it if he has important exams but he said, Ill do it this holiday and so far I have seen no edit meaning I have all right to ask.

Okay so I'm sorry dude. Hope you will take my apologize^^
 
what are you fixing ? for me only bad thing is unjustified frags :V rest is fine i think
 
I'm using it on my otserv
0.3.5pl1
but players in war get frags and red and black skull
how I can fix it? for player who involved in war (guild wars) not count frag in otserv (for no get black or red skull)
anybody knows?
:D
 
Sorry people, my computer "crashed" and I have to write you by my iPod. Affortunatelly, I saved my work into a pen drive and I'll post it here as fast as my pc gets repaired.
 
Sorry people, my computer "crashed" and I have to write you by my iPod. Affortunatelly, I saved my work into a pen drive and I'll post it here as fast as my pc gets repaired.

Another 2 weeks? :blink: xP

Take your time i'd guess ;p
 
I'm too tired to read the posts written before those 10 latest, so I will ask.
Is this about the unjustified murder thing? If it is then is there any solution? And I have 1 bug on mine tfs 0.3.5 pl1, the time left for /war-cancel is like 86400 and not counting down.
 
PC repaired :p. Tomorrow I'll post here the new and improved war-system.
 
Mr. Xampy, there is an urgent concern about the guildwarsys with the release of TFS 0.3.6
Many people are getting this "bug":
[14/12/2009 17:28:35] [Error - GlobalEvent Interface]
[14/12/2009 17:28:35] data/globalevents/scripts/wars.lua:eek:nThink
[14/12/2009 17:28:35] Description:
[14/12/2009 17:28:35] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[14/12/2009 17:28:35] stack traceback:
[14/12/2009 17:28:35] [C]: in function 'error'
[14/12/2009 17:28:36] data/lib/004-database.lua:60: in function 'getDataInt'
[14/12/2009 17:28:36] ./GuildWar.lua:212: in function 'getGuildsWithWar'
[14/12/2009 17:28:36] data/globalevents/scripts/wars.lua:4: in function <data/globalevents/scripts/wars.lua:3>
[14/12/2009 17:28:36] [Error - GlobalEvents::think] Couldn't execute event: wars

[14/12/2009 17:58:36] [Error - GlobalEvent Interface]
[14/12/2009 17:58:36] data/globalevents/scripts/wars.lua:eek:nThink
[14/12/2009 17:58:36] Description:
[14/12/2009 17:58:36] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[14/12/2009 17:58:36] stack traceback:
[14/12/2009 17:58:36] [C]: in function 'error'
[14/12/2009 17:58:36] data/lib/004-database.lua:60: in function 'getDataInt'
[14/12/2009 17:58:36] ./GuildWar.lua:212: in function 'getGuildsWithWar'
[14/12/2009 17:58:36] data/globalevents/scripts/wars.lua:4: in function <data/globalevents/scripts/wars.lua:3>
[14/12/2009 17:58:36] [Error - GlobalEvents::think] Couldn't execute event: wars

[14/12/2009 18:28:37] [Error - GlobalEvent Interface]
[14/12/2009 18:28:37] data/globalevents/scripts/wars.lua:eek:nThink
[14/12/2009 18:28:37] Description:
[14/12/2009 18:28:37] data/lib/004-database.lua:60: [Result:getDataInt] Result not set!
[14/12/2009 18:28:37] stack traceback:
[14/12/2009 18:28:37] [C]: in function 'error'
[14/12/2009 18:28:37] data/lib/004-database.lua:60: in function 'getDataInt'
[14/12/2009 18:28:37] ./GuildWar.lua:212: in function 'getGuildsWithWar'
[14/12/2009 18:28:37] data/globalevents/scripts/wars.lua:4: in function <data/globalevents/scripts/wars.lua:3>
[14/12/2009 18:28:37] [Error - GlobalEvents::think] Couldn't execute event: wars

TFS 0.3.6
data/lib/004-database.lua
Lua:
if(result == nil) then
    print("> WARNING: Couldn't load database lib.")
    return
end

Result = createClass(nil)
Result:setAttributes({
    id = -1,
    query = ""
})

function Result:getID()
    return self.id
end

function Result:setID(_id)
    self.id = _id
end

function Result:getQuery()
    return self.query
end

function Result:setQuery(_query)
    self.query = _query
end

function Result:create(_query)
    self:setQuery(_query)
    local _id = db.storeQuery(self:getQuery())
    if(_id) then
        self:setID(_id)
    end

    return self:getID()
end

function Result:getRows(free)
    local free = free or false
    if(self:getID() == -1) then
        error("[Result:getRows] Result not set!")
    end

    local c = 0
    repeat
        c = c + 1
    until not self:next()

    local _query = self:getQuery()
    self:free()
    if(not free) then
        self:create(_query)
    end

    return c
end

function Result:getDataInt(s)
    if(self:getID() == -1) then
        error("[Result:getDataInt] Result not set!")
    end

    return result.getDataInt(self:getID(), s)
end

function Result:getDataLong(s)
    if(self:getID() == -1) then
        error("[Result:getDataLong] Result not set!")
    end

    return result.getDataLong(self:getID(), s)
end

function Result:getDataString(s)
    if(self:getID() == -1) then
        error("[Result:getDataString] Result not set!")
    end

    return result.getDataString(self:getID(), s)
end

function Result:getDataStream(s)
    if(self:getID() == -1) then
        error("[Result:getDataStream] Result not set!")
    end

    return result.getDataStream(self:getID(), s)
end

function Result:next()
    if(self:getID() == -1) then
        error("[Result:next] Result not set!")
    end

    return result.next(self:getID())
end

function Result:free()
    if(self:getID() == -1) then
        error("[Result:free] Result not set!")
    end

    self:setQuery("")
    local ret = result.free(self:getID())
    self:setID(-1)
    return ret
end

Result.numRows = Result.getRows
function db.getResult(query)
    if(type(query) ~= 'string') then
        return nil
    end

    local ret = Result:new()
    ret:create(query)
    return ret
end

I really dont know if Elf changed something there, but we need you urgently for the stability of this great and unique system

Yours,
Leo
 
@Cybermaster:

It's normal. It means that you don't have any guild in war. Don't worry.


@Thread:

I'll release the new war system tomorrow at 16h (GMT +1). Sorry for delays :$
 
i hope so :peace:

good, i like the new php

did you fix the globalevent issue?
@xampy: you can include your functions in the same mod
 
Last edited:
@Cybermaster:
Thanks :p!
Globalevent "issue" is not an issue xD. It's normal, it says that you don't have any guild in war yet. It checks every 30 hours, if a guild that already exists and have been in war with another guild, and that second guild got "deleted", it will clean kills/info of wars of both guilds.

I tried to include the functions in the mod file, but it gave me a lot of errors xD.
 
Status
Not open for further replies.
Back
Top