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

auto donate castle system error

magista

RL name " Amir reda "
Joined
Jul 22, 2011
Messages
157
Solutions
1
Reaction score
21
Location
Egypt
hey men i have this error
Untitled.png


when i use this script
http://otland.net/threads/donation-castle-system-automatic.193348/

also need to know where to get character id
thx :D
plz any 1 help me !!
 
You'll need to have the 'castles' in town 4, or change the town it checks for them.
the character ID will be in your database. (localhost website thing) Find your god character, and look for it's characters ID.
 
are you looking in accounts, or players?
It should show the 'id' of the player before clicking on it to see more details.
 
¿What Version TFS are you using?
and what ID is your admin?
give me your admin char id.
NO in your accounts ,in your table players

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

    local p = getPlayersOnline()[1]
    local idadmn = ... 
    repeat
        local hid = castles:getDataInt('id')
        local h = getHouseInfo(hid)
        if h.owner == idadmn then
            setHouseOwner(hid, idadmn)
        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

edit here:
local idadmn = ... <-- add your admin ID..
 
Last edited:
Try This
Lua:
function onThink()
local castles = db.getResult('SELECT id FROM houses WHERE town=20')
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, 1954)
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)
end
until not castles:next()
castles:free()

return true
end
[code=lua]
 
¿What Version TFS are you using?
and what ID is your admin?
give me your admin char id.
NO in your accounts ,in your table players

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

    local p = getPlayersOnline()[1]
    local idadmn = ...
    repeat
        local hid = castles:getDataInt('id')
        local h = getHouseInfo(hid)
        if h.owner == idadmn then
            setHouseOwner(hid, idadmn)
        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

edit here:
local idadmn = ... <-- add your admin ID..

look at the pic i posted bro is that the char id ??

Try This
Lua:
function onThink()
local castles = db.getResult('SELECT id FROM houses WHERE town=20')
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, 1954)
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)
end
until not castles:next()
castles:free()

return true
end
[code=lua][/QUOTE]
thx for the script but i want to know which one is player id in the pic i posted comment number 6
 
Last edited:
Back
Top