Ir para conteúdo

Duvida Sobre Site Para Ot


lukeghost

Posts Recomendados

pessoal minha duvida eh o seguinte meu ot eh dakeles q tem database.s3db e eu queria fazer um site de acc management so q ele nao veio com a database.sql como eu faço? sera q tem algum programa para transforma-la?

Espero uma Resposta

Vlws desde já!

Link para o comentário
Compartilhar em outros sites

Cara, então use a minha, copie e cole...

DROP TRIGGER IF EXISTS `oncreate_players`;
DROP TRIGGER IF EXISTS `oncreate_guilds`;
DROP TRIGGER IF EXISTS `ondelete_players`;
DROP TRIGGER IF EXISTS `ondelete_guilds`;
DROP TRIGGER IF EXISTS `ondelete_accounts`;

DROP TABLE IF EXISTS `player_depotitems`;
DROP TABLE IF EXISTS `tile_items`;
DROP TABLE IF EXISTS `tiles`;
DROP TABLE IF EXISTS `bans`;
DROP TABLE IF EXISTS `house_lists`;
DROP TABLE IF EXISTS `houses`;
DROP TABLE IF EXISTS `player_items`;
DROP TABLE IF EXISTS `player_namelocks`;
DROP TABLE IF EXISTS `player_skills`;
DROP TABLE IF EXISTS `player_storage`;
DROP TABLE IF EXISTS `player_viplist`;
DROP TABLE IF EXISTS `player_spells`;
DROP TABLE IF EXISTS `player_deaths`;
DROP TABLE IF EXISTS `killers`;
DROP TABLE IF EXISTS `environment_killers`;
DROP TABLE IF EXISTS `player_killers`;
DROP TABLE IF EXISTS `guild_ranks`;
DROP TABLE IF EXISTS `guilds`;
DROP TABLE IF EXISTS `guild_invites`;
DROP TABLE IF EXISTS `global_storage`;
DROP TABLE IF EXISTS `players`;
DROP TABLE IF EXISTS `accounts`;
DROP TABLE IF EXISTS `server_record`;
DROP TABLE IF EXISTS `server_motd`;
DROP TABLE IF EXISTS `server_reports`;
DROP TABLE IF EXISTS `server_config`;
DROP TABLE IF EXISTS `account_viplist`;
DROP TABLE IF EXISTS `poll_votes`;
DROP TABLE IF EXISTS `polls`;

CREATE TABLE `accounts`
(
       `id` INT NOT NULL AUTO_INCREMENT,
       `name` VARCHAR(32) NOT NULL DEFAULT '',
       `password` VARCHAR(255) NOT NULL/* VARCHAR(32) NOT NULL COMMENT 'MD5'*//* VARCHAR(40) NOT NULL COMMENT 'SHA1'*/,
       `premdays` INT NOT NULL DEFAULT 0,
       `lastday` INT UNSIGNED NOT NULL DEFAULT 0,
       `email` VARCHAR(255) NOT NULL DEFAULT '',
       `key` VARCHAR(20) NOT NULL DEFAULT '0',
       `blocked` TINYINT(1) NOT NULL DEFAULT FALSE COMMENT 'internal usage',
       `warnings` INT NOT NULL DEFAULT 0,
       `group_id` INT NOT NULL DEFAULT 1,
       `viptime` INT(15) NOT NULL DEFAULT 0,
       PRIMARY KEY (`id`), UNIQUE (`name`)
) ENGINE = InnoDB;

INSERT INTO `accounts` VALUES (1, '1', '1', 65535, 0, '', '0', 0, 0, 1, 0);

CREATE TABLE `players`
(
       `id` INT NOT NULL AUTO_INCREMENT,
       `name` VARCHAR(255) NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `group_id` INT NOT NULL DEFAULT 1,
       `account_id` INT NOT NULL DEFAULT 0,
       `level` INT NOT NULL DEFAULT 1,
       `vocation` INT NOT NULL DEFAULT 0,
       `health` INT NOT NULL DEFAULT 150,
       `healthmax` INT NOT NULL DEFAULT 150,
       `experience` BIGINT NOT NULL DEFAULT 0,
       `lookbody` INT NOT NULL DEFAULT 0,
       `lookfeet` INT NOT NULL DEFAULT 0,
       `lookhead` INT NOT NULL DEFAULT 0,
       `looklegs` INT NOT NULL DEFAULT 0,
       `looktype` INT NOT NULL DEFAULT 136,
       `lookaddons` INT NOT NULL DEFAULT 0,
       `maglevel` INT NOT NULL DEFAULT 0,
       `mana` INT NOT NULL DEFAULT 0,
       `manamax` INT NOT NULL DEFAULT 0,
       `manaspent` INT NOT NULL DEFAULT 0,
       `soul` INT UNSIGNED NOT NULL DEFAULT 0,
       `town_id` INT NOT NULL DEFAULT 0,
       `posx` INT NOT NULL DEFAULT 0,
       `posy` INT NOT NULL DEFAULT 0,
       `posz` INT NOT NULL DEFAULT 0,
       `conditions` BLOB NOT NULL,
       `cap` INT NOT NULL DEFAULT 0,
       `sex` INT NOT NULL DEFAULT 0,
       `lastlogin` BIGINT UNSIGNED NOT NULL DEFAULT 0,
       `lastip` INT UNSIGNED NOT NULL DEFAULT 0,
       `save` TINYINT(1) NOT NULL DEFAULT 1,
       `skull` TINYINT(1) UNSIGNED NOT NULL DEFAULT 0,
       `skulltime` INT NOT NULL DEFAULT 0,
       `rank_id` INT NOT NULL DEFAULT 0,
       `guildnick` VARCHAR(255) NOT NULL DEFAULT '',
       `lastlogout` BIGINT UNSIGNED NOT NULL DEFAULT 0,
       `blessings` TINYINT(2) NOT NULL DEFAULT 0,
       `balance` BIGINT NOT NULL DEFAULT 0,
       `stamina` BIGINT NOT NULL DEFAULT 151200000 COMMENT 'stored in miliseconds',
       `direction` INT NOT NULL DEFAULT 2,
       `loss_experience` INT NOT NULL DEFAULT 100,
       `loss_mana` INT NOT NULL DEFAULT 100,
       `loss_skills` INT NOT NULL DEFAULT 100,
       `loss_containers` INT NOT NULL DEFAULT 100,
       `loss_items` INT NOT NULL DEFAULT 100,
       `premend` INT NOT NULL DEFAULT 0 COMMENT 'NOT IN USE BY THE SERVER',
       `online` TINYINT(1) NOT NULL DEFAULT 0,
       `marriage` INT UNSIGNED NOT NULL DEFAULT 0,
       `marrystatus` INT UNSIGNED NOT NULL DEFAULT 0,
       `promotion` INT NOT NULL DEFAULT 0,
       `deleted` TINYINT(1) NOT NULL DEFAULT FALSE,
       `description` VARCHAR(255) NOT NULL DEFAULT '',
       PRIMARY KEY (`id`), UNIQUE (`name`, `deleted`),
       KEY (`account_id`), KEY (`group_id`),
       KEY (`online`), KEY (`deleted`),
       FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

INSERT INTO `players` VALUES (1, 'Account Manager', 0, 1, 1, 1, 0, 150, 150, 0, 0, 0, 0, 0, 110, 0, 0, 0, 0, 0, 0, 0, 32360, 31782, 7, '', 400, 0, 0, 0, 0, 0, 0, 0, '', 0, 0, 0, 201660000, 0, 100, 100, 100, 100, 100, 0, 0, 0, 0, 0, 0, '');

CREATE TABLE `account_viplist`
(
       `account_id` INT NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `player_id` INT NOT NULL,
       KEY (`account_id`), KEY (`player_id`), KEY (`world_id`), UNIQUE (`account_id`, `player_id`),
       FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE,
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_deaths`
(
       `id` INT NOT NULL AUTO_INCREMENT,
       `player_id` INT NOT NULL,
       `date` BIGINT UNSIGNED NOT NULL,
       `level` INT UNSIGNED NOT NULL,
       PRIMARY KEY (`id`), INDEX (`date`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_depotitems`
(
       `player_id` INT NOT NULL,
       `sid` INT NOT NULL COMMENT 'any given range, eg. 0-100 is reserved for depot lockers and all above 100 will be normal items inside depots',
       `pid` INT NOT NULL DEFAULT 0,
       `itemtype` INT NOT NULL,
       `count` INT NOT NULL DEFAULT 0,
       `attributes` BLOB NOT NULL,
       KEY (`player_id`), UNIQUE (`player_id`, `sid`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_items`
(
       `player_id` INT NOT NULL DEFAULT 0,
       `pid` INT NOT NULL DEFAULT 0,
       `sid` INT NOT NULL DEFAULT 0,
       `itemtype` INT NOT NULL DEFAULT 0,
       `count` INT NOT NULL DEFAULT 0,
       `attributes` BLOB NOT NULL,
       KEY (`player_id`), UNIQUE (`player_id`, `sid`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_namelocks`
(
       `player_id` INT NOT NULL DEFAULT 0,
       `name` VARCHAR(255) NOT NULL,
       `new_name` VARCHAR(255) NOT NULL,
       `date` BIGINT NOT NULL DEFAULT 0,
       KEY (`player_id`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_skills`
(
       `player_id` INT NOT NULL DEFAULT 0,
       `skillid` TINYINT(2) NOT NULL DEFAULT 0,
       `value` INT UNSIGNED NOT NULL DEFAULT 0,
       `count` INT UNSIGNED NOT NULL DEFAULT 0,
       KEY (`player_id`), UNIQUE (`player_id`, `skillid`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_spells`
(
       `player_id` INT NOT NULL,
       `name` VARCHAR(255) NOT NULL,
       KEY (`player_id`), UNIQUE (`player_id`, `name`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_storage`
(
       `player_id` INT NOT NULL DEFAULT 0,
       `key` INT UNSIGNED NOT NULL DEFAULT 0,
       `value` VARCHAR(255) NOT NULL DEFAULT '0',
       KEY (`player_id`), UNIQUE (`player_id`, `key`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_viplist`
(
       `player_id` INT NOT NULL,
       `vip_id` INT NOT NULL,
       KEY (`player_id`), KEY (`vip_id`), UNIQUE (`player_id`, `vip_id`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
       FOREIGN KEY (`vip_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `killers`
(
       `id` INT NOT NULL AUTO_INCREMENT,
       `death_id` INT NOT NULL,
       `final_hit` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,
       `unjustified` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,
       PRIMARY KEY (`id`),
       FOREIGN KEY (`death_id`) REFERENCES `player_deaths`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `player_killers`
(
       `kill_id` INT NOT NULL,
       `player_id` INT NOT NULL,
       FOREIGN KEY (`kill_id`) REFERENCES `killers`(`id`) ON DELETE CASCADE,
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `environment_killers`
(
       `kill_id` INT NOT NULL,
       `name` VARCHAR(255) NOT NULL,
       FOREIGN KEY (`kill_id`) REFERENCES `killers`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `houses`
(
       `id` INT UNSIGNED NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `owner` INT NOT NULL,
       `paid` INT UNSIGNED NOT NULL DEFAULT 0,
       `warnings` INT NOT NULL DEFAULT 0,
       `lastwarning` INT UNSIGNED NOT NULL DEFAULT 0,
       `name` VARCHAR(255) NOT NULL,
       `town` INT UNSIGNED NOT NULL DEFAULT 0,
       `size` INT UNSIGNED NOT NULL DEFAULT 0,
       `price` INT UNSIGNED NOT NULL DEFAULT 0,
       `rent` INT UNSIGNED NOT NULL DEFAULT 0,
       `doors` INT UNSIGNED NOT NULL DEFAULT 0,
       `beds` INT UNSIGNED NOT NULL DEFAULT 0,
       `tiles` INT UNSIGNED NOT NULL DEFAULT 0,
       `guild` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,
       `clear` TINYINT(1) UNSIGNED NOT NULL DEFAULT FALSE,
       UNIQUE (`id`, `world_id`)
) ENGINE = InnoDB;

CREATE TABLE `house_auctions`
(
       `house_id` INT UNSIGNED NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `player_id` INT NOT NULL,
       `bid` INT UNSIGNED NOT NULL DEFAULT 0,
       `limit` INT UNSIGNED NOT NULL DEFAULT 0,
       `endtime` BIGINT UNSIGNED NOT NULL DEFAULT 0,
       UNIQUE (`house_id`, `world_id`),
       FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE,
       FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `house_lists`
(
       `house_id` INT UNSIGNED NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `listid` INT NOT NULL,
       `list` TEXT NOT NULL,
       UNIQUE (`house_id`, `world_id`, `listid`),
       FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `house_data`
(
       `house_id` INT UNSIGNED NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `data` LONGBLOB NOT NULL,
       UNIQUE (`house_id`, `world_id`),
       FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `tiles`
(
       `id` INT UNSIGNED NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `house_id` INT UNSIGNED NOT NULL,
       `x` INT(5) UNSIGNED NOT NULL,
       `y` INT(5) UNSIGNED NOT NULL,
       `z` TINYINT(2) UNSIGNED NOT NULL,
       UNIQUE (`id`, `world_id`),
       KEY (`x`, `y`, `z`),
       FOREIGN KEY (`house_id`, `world_id`) REFERENCES `houses`(`id`, `world_id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `tile_items`
(
       `tile_id` INT UNSIGNED NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `sid` INT NOT NULL,
       `pid` INT NOT NULL DEFAULT 0,
       `itemtype` INT NOT NULL,
       `count` INT NOT NULL DEFAULT 0,
       `attributes` BLOB NOT NULL,
       UNIQUE (`tile_id`, `world_id`, `sid`), KEY (`sid`),
       FOREIGN KEY (`tile_id`) REFERENCES `tiles`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `guilds`
(
       `id` INT NOT NULL AUTO_INCREMENT,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `name` VARCHAR(255) NOT NULL,
       `ownerid` INT NOT NULL,
       `creationdata` INT NOT NULL,
       `motd` VARCHAR(255) NOT NULL,
       PRIMARY KEY (`id`),
       UNIQUE (`name`, `world_id`)
) ENGINE = InnoDB;

CREATE TABLE `guild_invites`
(
       `player_id` INT NOT NULL DEFAULT 0,
       `guild_id` INT NOT NULL DEFAULT 0,
       UNIQUE (`player_id`, `guild_id`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
       FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `guild_ranks`
(
       `id` INT NOT NULL AUTO_INCREMENT,
       `guild_id` INT NOT NULL,
       `name` VARCHAR(255) NOT NULL,
       `level` INT NOT NULL COMMENT '1 - leader, 2 - vice leader, 3 - member',
       PRIMARY KEY (`id`),
       FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `bans`
(
       `id` INT UNSIGNED NOT NULL auto_increment,
       `type` TINYINT(1) NOT NULL COMMENT '1 - ip banishment, 2 - namelock, 3 - account banishment, 4 - notation, 5 - deletion',
       `value` INT UNSIGNED NOT NULL COMMENT 'ip address (integer), player guid or account number',
       `param` INT UNSIGNED NOT NULL DEFAULT 4294967295 COMMENT 'used only for ip banishment mask (integer)',
       `active` TINYINT(1) NOT NULL DEFAULT TRUE,
       `expires` INT NOT NULL,
       `added` INT UNSIGNED NOT NULL,
       `admin_id` INT UNSIGNED NOT NULL DEFAULT 0,
       `comment` TEXT NOT NULL,
       `reason` INT UNSIGNED NOT NULL DEFAULT 0,
       `action` INT UNSIGNED NOT NULL DEFAULT 0,
       `statement` VARCHAR(255) NOT NULL DEFAULT '',
       PRIMARY KEY (`id`),
       KEY `type` (`type`, `value`),
       KEY `active` (`active`)
) ENGINE = InnoDB;

CREATE TABLE `global_storage`
(
       `key` INT UNSIGNED NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `value` VARCHAR(255) NOT NULL DEFAULT '0',
       UNIQUE  (`key`, `world_id`)
) ENGINE = InnoDB;

CREATE TABLE `server_config`
(
       `config` VARCHAR(35) NOT NULL DEFAULT '',
       `value` INT NOT NULL,
       UNIQUE (`config`)
) ENGINE = InnoDB;

INSERT INTO `server_config` VALUES ('db_version', 23);

CREATE TABLE `server_motd`
(
       `id` INT UNSIGNED NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `text` TEXT NOT NULL,
       UNIQUE (`id`, `world_id`)
) ENGINE = InnoDB;

INSERT INTO `server_motd` VALUES (1, 0, 'Welcome to The Forgotten Server!');

CREATE TABLE `server_record`
(
       `record` INT NOT NULL,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `timestamp` BIGINT NOT NULL,
       UNIQUE (`record`, `world_id`, `timestamp`)
) ENGINE = InnoDB;

INSERT INTO `server_record` VALUES (0, 0, 0);

CREATE TABLE `server_reports`
(
       `id` INT NOT NULL AUTO_INCREMENT,
       `world_id` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
       `player_id` INT NOT NULL DEFAULT 1,
       `posx` INT NOT NULL DEFAULT 0,
       `posy` INT NOT NULL DEFAULT 0,
       `posz` INT NOT NULL DEFAULT 0,
       `timestamp` BIGINT NOT NULL DEFAULT 0,
       `report` TEXT NOT NULL,
       `reads` INT NOT NULL DEFAULT 0,
       PRIMARY KEY (`id`),
       KEY (`world_id`), KEY (`reads`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `polls` 
(
       `id` INTEGER AUTO_INCREMENT,
       `player_id` INT(11) NOT NULL,
       `poll` VARCHAR(255) NOT NULL,
       `options` VARCHAR(255) NOT NULL,
       `timestamp` INT(11) NOT NULL,
       PRIMARY KEY (`id`),
       FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;

CREATE TABLE `poll_votes` 
(
 `poll_id` INT(11) NOT NULL,
 `votes` VARCHAR(255) NOT NULL,
 `account_id` VARCHAR(255) NOT NULL,
 FOREIGN KEY (`poll_id`) REFERENCES `polls` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB;


DELIMITER |

CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
FOR EACH ROW
BEGIN
       DELETE FROM `bans` WHERE `type` IN (3, 4) AND `value` = OLD.`id`;
END|

CREATE TRIGGER `oncreate_guilds`
AFTER INSERT
ON `guilds`
FOR EACH ROW
BEGIN
       INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Leader', 3, NEW.`id`);
       INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Vice-Leader', 2, NEW.`id`);
       INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('Member', 1, NEW.`id`);
END|

CREATE TRIGGER `ondelete_guilds`
BEFORE DELETE
ON `guilds`
FOR EACH ROW
BEGIN
       UPDATE `players` SET `guildnick` = '', `rank_id` = 0 WHERE `rank_id` IN (SELECT `id` FROM `guild_ranks` WHERE `guild_id` = OLD.`id`);
END|

CREATE TRIGGER `oncreate_players`
AFTER INSERT
ON `players`
FOR EACH ROW
BEGIN
       INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 0, 10);
       INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 1, 10);
       INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 2, 10);
       INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 3, 10);
       INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 4, 10);
       INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 5, 10);
       INSERT INTO `player_skills` (`player_id`, `skillid`, `value`) VALUES (NEW.`id`, 6, 10);
END|

CREATE TRIGGER `ondelete_players`
BEFORE DELETE
ON `players`
FOR EACH ROW
BEGIN
       DELETE FROM `bans` WHERE `type` IN (2, 5) AND `value` = OLD.`id`;
       UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END|
DELIMITER ;

 

Abraços.

Link para o comentário
Compartilhar em outros sites

intaum o banco de dados esta com o nome de poke

e o config.lua ta assim

 

-- The Forgotten Server Config

 

-- Account manager

accountManager = true

namelockManager = true

newPlayerChooseVoc = true

newPlayerSpawnPosX = 1053

newPlayerSpawnPosY = 1048

newPlayerSpawnPosZ = 7

newPlayerTownId = 1

newPlayerLevel = 1

newPlayerMagicLevel = 0

generateAccountNumber = false

 

-- Unjustified kills

-- NOTE: *Banishment and *BlackSkull variables are >summed up<

-- (dailyFragsToRedSkull + dailyFragsToBanishment) with their

-- *RedSkull equivalents.

-- Auto banishing works only if useBlackSkull set to negative.

-- advancedFragList is not advised if you use huge frags

-- requirements.

redSkullLength = 30 * 24 * 60 * 60

blackSkullLength = 45 * 24 * 60 * 60

dailyFragsToRedSkull = 3

weeklyFragsToRedSkull = 5

monthlyFragsToRedSkull = 10

dailyFragsToBlackSkull = dailyFragsToRedSkull

weeklyFragsToBlackSkull = weeklyFragsToRedSkull

monthlyFragsToBlackSkull = monthlyFragsToRedSkull

dailyFragsToBanishment = dailyFragsToRedSkull

weeklyFragsToBanishment = weeklyFragsToRedSkull

monthlyFragsToBanishment = monthlyFragsToRedSkull

blackSkulledDeathHealth = 40

blackSkulledDeathMana = 0

useBlackSkull = true

useFragHandler = true

advancedFragList = false

 

-- Banishments

-- violationNameReportActionType 1 = just a report, 2 = name lock, 3 = player banishment

-- killsBanLength works only if useBlackSkull option is disabled.

notationsToBan = 3

warningsToFinalBan = 4

warningsToDeletion = 5

banLength = 7 * 24 * 60 * 60

killsBanLength = 7 * 24 * 60 * 60

finalBanLength = 30 * 24 * 60 * 60

ipBanishmentLength = 1 * 24 * 60 * 60

broadcastBanishments = true

maxViolationCommentSize = 200

violationNameReportActionType = 2

autoBanishUnknownBytes = false

 

-- Battle

-- NOTE: showHealingDamageForMonsters inheritates from showHealingDamage.

-- loginProtectionPeriod is the famous Tibia anti-magebomb system.

-- deathLostPercent set to nil enables manual mode.

worldType = "no-pvp"

protectionLevel = 1000000

pvpTileIgnoreLevelAndVocationProtection = true

pzLocked = 10 * 1000

huntingDuration = 60 * 1000

criticalHitChance = 7

criticalHitMultiplier = 1

displayCriticalHitNotify = false

removeWeaponAmmunition = true

removeWeaponCharges = true

removeRuneCharges = true

whiteSkullTime = 15 * 60 * 1000

noDamageToSameLookfeet = false

showHealingDamage = false

showHealingDamageForMonsters = false

fieldOwnershipDuration = 5 * 1000

stopAttackingAtExit = false

oldConditionAccuracy = false

loginProtectionPeriod = 10 * 1000

deathLostPercent = 10

stairhopDelay = 2 * 1000

pushCreatureDelay = 2 * 1000

deathContainerId = 1987

gainExperienceColor = 215

addManaSpentInPvPZone = true

squareColor = 0

allowFightback = true

 

-- Connection config

worldId = 0

ip = "ghost-po.no-ip.info"

bindOnlyConfiguredIpAddress = false

loginPort = 7171

gamePort = 7172

adminPort = 7171

statusPort = 7171

loginTries = 10

retryTimeout = 5 * 1000

loginTimeout = 60 * 1000

maxPlayers = 1000

motd = "Bem vindo ao POD!"

displayOnOrOffAtCharlist = false

onePlayerOnlinePerAccount = true

allowClones = false

serverName = "POd 3.0"

loginMessage = "Pokemon Online Delluge versão 3.0!"

statusTimeout = 5 * 60 * 1000

replaceKickOnLogin = true

forceSlowConnectionsToDisconnect = false

loginOnlyWithLoginServer = false

premiumPlayerSkipWaitList = false

 

-- Database

-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.

-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.

sqlType = "sqlite"

sqlHost = "localhost"

sqlPort = 3306

sqlUser = "root"

sqlPass = ""

sqlDatabase = "poke"

sqlFile = "poke.s3db"

sqlKeepAlive = 0

mysqlReadTimeout = 10

mysqlWriteTimeout = 10

encryptionType = "plain"

 

-- Deathlist

deathListEnabled = true

deathListRequiredTime = 1 * 60 * 1000

deathAssistCount = 19

maxDeathRecords = 5

 

-- Guilds

ingameGuildManagement = true

levelToFormGuild = 8

premiumDaysToFormGuild = 0

guildNameMinLength = 4

guildNameMaxLength = 20

 

-- Highscores

highscoreDisplayPlayers = 15

updateHighscoresAfterMinutes = 60

 

-- Houses

buyableAndSellableHouses = true

houseNeedPremium = true

bedsRequirePremium = true

levelToBuyHouse = 1

housesPerAccount = 0

houseRentAsPrice = false

housePriceAsRent = false

housePriceEachSquare = 1000

houseRentPeriod = "never"

houseCleanOld = 0

guildHalls = false

 

-- Item usage

timeBetweenActions = 200

timeBetweenExActions = 1000

hotkeyAimbotEnabled = true

 

-- Map

-- NOTE: storeTrash costs more memory, but will perform alot faster cleaning.

mapName = "or11"

mapAuthor = "POD"

randomizeTiles = true

storeTrash = true

cleanProtectedZones = true

mailboxDisabledTowns = "-1"

 

-- Process

-- NOTE: defaultPriority works only on Windows and niceLevel on *nix

-- coresUsed are seperated by comma cores ids used by server process,

-- default is -1, so it stays untouched (automaticaly assigned by OS).

defaultPriority = "high"

niceLevel = 5

coresUsed = "-1"

 

-- Startup

optimizeDatabaseAtStartup = true

removePremiumOnInit = true

confirmOutdatedVersion = false

 

-- Spells

formulaLevel = 5.0

formulaMagic = 1.0

bufferMutedOnSpellFailure = false

spellNameInsteadOfWords = false

emoteSpells = false

 

-- Outfits

allowChangeOutfit = true

allowChangeColors = true

allowChangeAddons = true

disableOutfitsForPrivilegedPlayers = false

addonsOnlyPremium = true

 

-- Miscellaneous

-- NOTE: promptExceptionTracerErrorBox works only with precompiled support feature,

-- called "exception tracer" (__EXCEPTION_TRACER__ flag).

dataDirectory = "data/"

bankSystem = true

displaySkillLevelOnAdvance = false

promptExceptionTracerErrorBox = true

separateViplistPerCharacter = false

maximumDoorLevel = 500

maxMessageBuffer = 4

 

-- Saving-related

-- useHouseDataStorage usage may be found at README.

saveGlobalStorage = true

useHouseDataStorage = false

storePlayerDirection = false

 

-- Loot

-- monsterLootMessage 0 to disable, 1 - only party, 2 - only player, 3 - party or player (like Tibia's)

checkCorpseOwner = true

monsterLootMessage = 3

monsterLootMessageType = 25

 

-- Ghost mode

ghostModeInvisibleEffect = true

ghostModeSpellEffects = true

 

-- Limits

idleWarningTime = 14 * 60 * 1000

idleKickTime = 15 * 60 * 1000

expireReportsAfterReads = 1

playerQueryDeepness = 2

maxItemsPerPZTile = 0

maxItemsPerHouseTile = 0

 

-- Premium-related

freePremium = false

premiumForPromotion = true

 

-- Blessings

-- NOTE: blessingReduction* regards items/containers loss.

-- eachBlessReduction is how much each bless reduces the experience/magic/skills loss.

blessingOnlyPremium = true

blessingReductionBase = 30

blessingReductionDecreament = 5

eachBlessReduction = 8

 

-- Rates

-- NOTE: experienceStages configuration is located in data/XML/stages.xml.

-- rateExperienceFromPlayers 0 to disable.

experienceStages = true

rateExperience = 20.0

rateExperienceFromPlayers = 0

rateSkill = 3.0

rateMagic = 3.0

rateLoot = 5.0

rateSpawn = 1

 

-- Monster rates

rateMonsterHealth = 1.0

rateMonsterMana = 1.0

rateMonsterAttack = 1.0

rateMonsterDefense = 1.0

 

-- Experience from players

-- NOTE: min~Threshold* set to 0 will disable the minimum threshold:

-- player will gain experience from every lower leveled player.

-- max~Threshold* set to 0 will disable the maximum threshold:

-- player will gain experience from every higher leveled player.

minLevelThresholdForKilledPlayer = 0.9

maxLevelThresholdForKilledPlayer = 1.1

 

-- Stamina

-- NOTE: Stamina is stored in miliseconds, so seconds are multiplied by 1000.

-- rateStaminaHits multiplies every hit done a creature, which are later

-- multiplied by player attack speed.

-- rateStaminaGain is divider of every logged out second, eg:

-- 60000 / 3 = 20000 milliseconds, what gives 20 stamina seconds for 1 minute being logged off.

-- rateStaminaThresholdGain is divider for the premium stamina.

-- staminaRatingLimit* is in minutes.

rateStaminaLoss = 1

rateStaminaGain = 3

rateStaminaThresholdGain = 12

staminaRatingLimitTop = 41 * 60

staminaRatingLimitBottom = 14 * 60

rateStaminaAboveNormal = 1.5

rateStaminaUnderNormal = 0.5

staminaThresholdOnlyPremium = true

 

-- Party

-- NOTE: experienceShareLevelDifference is float number.

-- experienceShareLevelDifference is highestLevel * value

experienceShareRadiusX = 30

experienceShareRadiusY = 30

experienceShareRadiusZ = 1

experienceShareLevelDifference = 2 / 3

extraPartyExperienceLimit = 20

extraPartyExperiencePercent = 5

experienceShareActivity = 2 * 60 * 1000

 

-- Global save

-- NOTE: globalSaveHour means like 03:00, not that it will save every 3 hours,

-- if you want such a system please check out data/globalevents/globalevents.xml.

globalSaveEnabled = false

globalSaveHour = 8

shutdownAtGlobalSave = true

cleanMapAtGlobalSave = false

 

-- Spawns

deSpawnRange = 2

deSpawnRadius = 50

 

-- Summons

maxPlayerSummons = 2

teleportAllSummons = true

teleportPlayerSummons = true

 

-- Status

ownerName = "Delluge"

ownerEmail = "@otland.net"

url = "http://otland.net/"

location = "Europe"

displayGamemastersWithOnlineCommand = false

 

-- Logs

-- NOTE: This kind of logging does not work in GUI version.

-- For such, please compile the software with __GUI_LOGS__ flag.

adminLogsEnabled = false

displayPlayersLogging = true

prefixChannelLogs = ""

runFile = ""

outLogName = ""

errorLogName = ""

truncateLogsOnStartup = false

Link para o comentário
Compartilhar em outros sites

Então cara, você tem que remover todos os comentários que são os seguintes:

-- Database
-- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database.
-- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value.

 

E também você tem que modificar isto:

 

sqlType = "mysql"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "SEU USUÁRIO"
sqlPass = "SUA SENHA"
sqlDatabase = "SEU BANCO DE DADOS QUE FOI CRIADO NA DATABASE"
sqlFile = "poke.s3db"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "plain"

 

Abraços.

Link para o comentário
Compartilhar em outros sites

intaum kara ainda esta com o msm erro

pq o erro eh na hora de upa a database

estou entrigado com uma coisa sera q eh pq eu uso o easy php 1.8?

 

#Edit

 

Intaum cara axei o proble era porque a versao do easy php era antiga preguiça de baxa nova Xp

usei a antiga que eu ja tinha

mas baixei a nova e funciono perfeito

Desculpe pelo tempo perdido e Obrigado

Editado por lukeghost
Link para o comentário
Compartilhar em outros sites

  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...