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

Windows Auto castle System

TheBounty

New Member
Joined
Jan 8, 2017
Messages
14
Reaction score
0
Hi , I have a problem with me donation castle system I got it from this post https://otland.net/threads/donation-castle-system-automatic.193348/ and I followed everything as he said
now I got this error my tfs 0.4

[14:11:43.027] [Error - GlobalEvent Interface]
[14:11:43.027] data/globalevents/scripts/castles.lua:eek:nThink
[14:11:43.027] Description:
[14:11:43.027] (luaGetHouseInfo) House not found
[14:11:43.027] [Error - GlobalEvent Interface]
[14:11:43.027] data/globalevents/scripts/castles.lua:eek:nThink
[14:11:43.027] Description:
[14:11:43.027] data/globalevents/scripts/castles.lua:12: attempt to index local 'h' (a boolean value)
[14:11:43.043] stack traceback:
[14:11:43.043] data/globalevents/scripts/castles.lua:12: in function <data/globalevents/scripts/castles.lua:2>
[14:11:43.043] [Error - GlobalEvents::think] Couldn't execute event: castles

so ,I hope someone can help or tell me where I failed ..
 
Hi , I have a problem with me donation castle system I got it from this post https://otland.net/threads/donation-castle-system-automatic.193348/ and I followed everything as he said
now I got this error my tfs 0.4

[14:11:43.027] [Error - GlobalEvent Interface]
[14:11:43.027] data/globalevents/scripts/castles.lua:eek:nThink
[14:11:43.027] Description:
[14:11:43.027] (luaGetHouseInfo) House not found
[14:11:43.027] [Error - GlobalEvent Interface]
[14:11:43.027] data/globalevents/scripts/castles.lua:eek:nThink
[14:11:43.027] Description:
[14:11:43.027] data/globalevents/scripts/castles.lua:12: attempt to index local 'h' (a boolean value)
[14:11:43.043] stack traceback:
[14:11:43.043] data/globalevents/scripts/castles.lua:12: in function <data/globalevents/scripts/castles.lua:2>
[14:11:43.043] [Error - GlobalEvents::think] Couldn't execute event: castles

so ,I hope someone can help or tell me where I failed ..

post your script in the code and people cant help you till you do that.
 
post your script in the code and people cant help you till you do that.
Oh sorry my script in globalevents

Lua:
function onThink()
    local castles = db.getResult('SELECT id FROM houses WHERE town=3')
    if castles:getID() == -1 then
        return true
    end

    local p = getPlayersOnline()[1]
    repeat
        local hid = castles:getDataInt('id')
        local h = getHouseInfo(hid)
        if h.owner == 0 then
            setHouseOwner(hid, 1942)
        elseif p then
            local n = tonumber(h.name:sub(-2)) or 0
            h.entry.x = h.entry.x + (n % 2 == 0 and 3 or -3)
            doCreatureSay(p, getPlayerNameByGUID(h.owner), TALKTYPE_ORANGE_1, false, 0, h.entry)
        end
    until not castles:next()
    castles:free()

    return true
end
 
Have you created a new town and set the donate houses to that town? This is the problem. I tested this script recently and it is working fine!

You have to remove the donate houses from your original town, create a new town, for eg DONATE TOWN (you dont have to MAP a new town, just hit MAP>EDIT TOWNS>ADD), and remake the house tiles/exits adressing to DONATE TOWN. Dont forget to change de scripts town id and adm player id.
 
Have you created a new town and set the donate houses to that town? This is the problem. I tested this script recently and it is working fine!

You have to remove the donate houses from your original town, create a new town, for eg DONATE TOWN (you dont have to MAP a new town, just hit MAP>EDIT TOWNS>ADD), and remake the house tiles/exits adressing to DONATE TOWN. Dont forget to change de scripts town id and adm player id.
lgkZOdZr.png


I worked on this
 
Last edited:
I cant explain simpler as that, i cant understand me.... CREATE HOUSES, SET HOUSE TILE to the city CASTLES, and config the lua files.
 
Back
Top