• Minor technical glitch has been resolved. Logging in and posting is now possible again!
  • Congratulations to new Staff Members on their promotion!

what ido for remov this error?

ganzory

Twiffysoft Support
Joined
Sep 1, 2012
Messages
152
Best answers
0
Reaction score
4
Location
USA
please help me what ido for remov this error?
34589
 

Kaspar

Unprejudiced
Staff member
Global Moderator
Premium User
Joined
Jun 2, 2016
Messages
482
Best answers
2
Reaction score
313
Location
Sweden
Check the coordinates in your mapeditor and you'll find something that's bugged.
 
OP
ganzory

ganzory

Twiffysoft Support
Joined
Sep 1, 2012
Messages
152
Best answers
0
Reaction score
4
Location
USA
Check the coordinates in your mapeditor and you'll find something that's bugged.
so you need me open my map on mapeditor first and look?
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
743
Best answers
6
Reaction score
128
Location
Kepler452b
Run this in your Phpmyadmin > Euforia > SQL tab
and restart your server.

SQL:
CREATE TABLE `tiles` (
  `id` int(10) UNSIGNED NOT NULL,
  `world_id` tinyint(2) UNSIGNED NOT NULL DEFAULT '0',
  `house_id` int(10) UNSIGNED NOT NULL,
  `x` int(5) UNSIGNED NOT NULL,
  `y` int(5) UNSIGNED NOT NULL,
  `z` tinyint(2) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;


ALTER TABLE `tiles`
  ADD UNIQUE KEY `id` (`id`,`world_id`),
  ADD KEY `x` (`x`,`y`,`z`),
  ADD KEY `house_id` (`house_id`,`world_id`);
 
 
ALTER TABLE `tiles`
  ADD CONSTRAINT `tiles_ibfk_1` FOREIGN KEY (`house_id`,`world_id`) REFERENCES `houses` (`id`, `world_id`) ON DELETE CASCADE;
COMMIT;
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
743
Best answers
6
Reaction score
128
Location
Kepler452b
Do the same with this :
SQL:
CREATE TABLE `z_ots_comunication` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `action` varchar(255) NOT NULL,
  `param1` varchar(255) NOT NULL,
  `param2` varchar(255) NOT NULL,
  `param3` varchar(255) NOT NULL,
  `param4` varchar(255) NOT NULL,
  `param5` varchar(255) NOT NULL,
  `param6` varchar(255) NOT NULL,
  `param7` varchar(255) NOT NULL,
  `delete_it` int(2) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


ALTER TABLE `z_ots_comunication`
  ADD PRIMARY KEY (`id`);


ALTER TABLE `z_ots_comunication`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
 
OP
ganzory

ganzory

Twiffysoft Support
Joined
Sep 1, 2012
Messages
152
Best answers
0
Reaction score
4
Location
USA
Do the same with this :
SQL:
CREATE TABLE `z_ots_comunication` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `action` varchar(255) NOT NULL,
  `param1` varchar(255) NOT NULL,
  `param2` varchar(255) NOT NULL,
  `param3` varchar(255) NOT NULL,
  `param4` varchar(255) NOT NULL,
  `param5` varchar(255) NOT NULL,
  `param6` varchar(255) NOT NULL,
  `param7` varchar(255) NOT NULL,
  `delete_it` int(2) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;


ALTER TABLE `z_ots_comunication`
  ADD PRIMARY KEY (`id`);


ALTER TABLE `z_ots_comunication`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

Nice bro good man
now
V

34593
 

Snavy

Alpha - AUUU
Joined
Apr 1, 2012
Messages
743
Best answers
6
Reaction score
128
Location
Kepler452b
Go to line 78 in data/globalevents/scripts/init.lua and let me know what it is written there.
 
OP
ganzory

ganzory

Twiffysoft Support
Joined
Sep 1, 2012
Messages
152
Best answers
0
Reaction score
4
Location
USA
Go to line 78 in data/globalevents/scripts/init.lua and let me know what it is written there.

local config = {
creationTime = 7 * 86400,
checkTime = 7 * 86400,
viceCount = 4,
memberCount = 10
}

function onStartup()
local data, time, result = {}, os.time(), db.getResult("SELECT id, ownerid, creationdata, checkdata FROM guilds WHERE world_id = " .. getConfigValue('worldId') .. ";")
if(result:getID() ~= -1) then
repeat
data[result:getDataInt("id")] = {result:getDataInt("ownerid"), result:getDataInt("creationdata"), result:getDataInt("checkdata")}
until not(result:next())
result:free()
end

for id, v in ipairs(data) do
local owner, created, check = v[1], v[2], v[3]
if(created < (time - config.creationTime)) then
result = db.getResult("SELECT id, level FROM guild_ranks WHERE guild_id = " .. id .. ";")
if(result:getID() ~= -1) then
local rank, ranks = 0, {}
repeat
ranks[result:getDataInt("id")] = result:getDataInt("level")
if(result:getDataInt("level") == 1) then
rank = result:getDataInt("id")
end
until not(result:next())
result:free()

local members = {0, 0, 0, 0}
for k, v in ipairs(ranks) do
result = db.getResult("SELECT COUNT(id) AS count FROM players WHERE rank_id = " .. k .. ";")
if(result:getID() ~= -1) then
members[v] = members[v] + result:getDataInt("count")
result:free()
end

if(v == 2) then
result = db.getResult("SELECT p.id FROM players p LEFT JOIN accounts a ON p.account_id = a.id WHERE p.rank_id = " .. k .. " AND (a.premdays = 0 OR (a.lastday + (a.premdays * 86400) <= 0));")
if(result:getID() ~= -1) then
local demote = ""
repeat
demote = demote .. result:getDataInt("id") .. ","
members[2] = members[2] - 1
members[1] = members[1] + 1
until not(result:next())
result:free()

if(demote ~= "" and rank ~= 0) then
db.executeQuery("UPDATE players SET rank_id = " .. rank .. " WHERE id IN (" .. demote:sub(1, -2) .. ");")
end
end
end
end

for i = 1, 3 do
members[4] = members[4] + members
end

if(members[2] < config.viceCount or members[4] < config.memberCount) then
if(check == 0) then
db.executeQuery("UPDATE guilds SET checkdata = " .. (time + config.checkTime) .. " WHERE id = " .. id .. ";")
elseif(check < time) then
local tmp = ""
for rank, _ in ipairs(ranks) do
tmp = tmp .. rank .. ","
end

db.executeQuery("UPDATE players SET rank_id = 0, guildnick = '', guildjoin = 0 WHERE rank_id IN (" .. tmp:sub(1, -2) .. ");")
db.executeQuery("DELETE FROM guilds WHERE id = " .. id .. ";")
end
end
end
end
end

db.executeQuery("UPDATE players SET online = 0 WHERE world_id = " .. getConfigValue('worldId') .. " AND online > 0;")
db.executeQuery("DELETE FROM guild_wars WHERE status = 0 AND begin < " .. (os.time() - 2 * 86400) .. ";")
db.executeQuery("UPDATE guild_wars SET status = 5, end = " .. os.time() .. " WHERE status = 1 AND end > 0 AND end < " .. os.time() .. ";")
return true
end

function onGlobalSave()
if(getGameState() ~= GAMESTATE_CLOSING) then
return onStartup()
end

return true
end
 
OP
ganzory

ganzory

Twiffysoft Support
Joined
Sep 1, 2012
Messages
152
Best answers
0
Reaction score
4
Location
USA
Code:
local config = {
    creationTime = 7 * 86400,
    checkTime = 7 * 86400,
    viceCount = 4,
    memberCount = 10
}

function onStartup()
    local data, time, result = {}, os.time(), db.getResult("SELECT `id`, `ownerid`, `creationdata`, `checkdata` FROM `guilds` WHERE `world_id` = " .. getConfigValue('worldId') .. ";")
    if(result:getID() ~= -1) then
        repeat
            data[result:getDataInt("id")] = {result:getDataInt("ownerid"), result:getDataInt("creationdata"), result:getDataInt("checkdata")}
        until not(result:next())
        result:free()
    end

    for id, v in ipairs(data) do
        local owner, created, check = v[1], v[2], v[3]
        if(created < (time - config.creationTime)) then
            result = db.getResult("SELECT `id`, `level` FROM `guild_ranks` WHERE `guild_id` = " .. id .. ";")
            if(result:getID() ~= -1) then
                local rank, ranks = 0, {}
                repeat
                    ranks[result:getDataInt("id")] = result:getDataInt("level")
                    if(result:getDataInt("level") == 1) then
                        rank = result:getDataInt("id")
                    end
                until not(result:next())
                result:free()

                local members = {0, 0, 0, 0}
                for k, v in ipairs(ranks) do
                    result = db.getResult("SELECT COUNT(`id`) AS `count` FROM `players` WHERE `rank_id` = " .. k .. ";")
                    if(result:getID() ~= -1) then
                        members[v] = members[v] + result:getDataInt("count")
                        result:free()
                    end

                    if(v == 2) then
                        result = db.getResult("SELECT `p`.`id` FROM `players` p LEFT JOIN `accounts` a ON `p`.`account_id` = `a`.`id` WHERE `p`.`rank_id` = " .. k .. " AND (`a`.`premdays` = 0 OR (`a`.`lastday` + (`a`.`premdays` * 86400) <= 0));")
                        if(result:getID() ~= -1) then
                            local demote = ""
                            repeat
                                demote = demote .. result:getDataInt("id") .. ","
                                members[2] = members[2] - 1
                                members[1] = members[1] + 1
                            until not(result:next())
                            result:free()

                            if(demote ~= "" and rank ~= 0) then
                                db.executeQuery("UPDATE `players` SET `rank_id` = " .. rank .. " WHERE `id` IN (" .. demote:sub(1, -2) .. ");")
                            end
                        end
                    end
                end

                for i = 1, 3 do
                    members[4] = members[4] + members[i]
                end

                if(members[2] < config.viceCount or members[4] < config.memberCount) then
                    if(check == 0) then
                        db.executeQuery("UPDATE `guilds` SET `checkdata` = " .. (time + config.checkTime) .. " WHERE `id` = " .. id .. ";")
                    elseif(check < time) then
                        local tmp = ""
                        for rank, _ in ipairs(ranks) do
                            tmp = tmp .. rank .. ","
                        end

                        db.executeQuery("UPDATE `players` SET `rank_id` = 0, `guildnick` = '', `guildjoin` = 0 WHERE `rank_id` IN (" .. tmp:sub(1, -2) .. ");")
                        db.executeQuery("DELETE FROM `guilds` WHERE `id` = " .. id .. ";")
                    end
                end
            end
        end
    end

    db.executeQuery("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigValue('worldId') .. " AND `online` > 0;")
    db.executeQuery("DELETE FROM `guild_wars` WHERE `status` = 0 AND `begin` < " .. (os.time() - 2 * 86400) .. ";")
    db.executeQuery("UPDATE `guild_wars` SET `status` = 5, `end` = " .. os.time() .. " WHERE `status` = 1 AND `end` > 0 AND `end` < " .. os.time() .. ";")
    return true
end

function onGlobalSave()
    if(getGameState() ~= GAMESTATE_CLOSING) then
        return onStartup()
    end

    return true
end
 
OP
ganzory

ganzory

Twiffysoft Support
Joined
Sep 1, 2012
Messages
152
Best answers
0
Reaction score
4
Location
USA
no, i added a link in that answer. Limos answered it before. Do what he says on that link.

he edit on >> 100-compat.lua
not >> init.lua as you say bro
 
Top