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

[9.54] The Forgotten Server v0.2.13pl1 (Mystic Spirit), updated with Patch Level 1!

Status
Not open for further replies.
hey uhm when i try to login this server i get this.

[07/07/2012 03:50:42] mysql_real_query(): SELECT `id`, `name`, `password`, `type`, `premdays`, `lastday`, `key`, `warnings` FROM `accounts` WHERE `name` = '1' LIMIT 1;: MYSQL ERROR: Unknown column 'name' in 'field list'
[07/07/2012 03:50:42] mysql_store_result(): SELECT `id`, `name`, `password`, `type`, `premdays`, `lastday`, `key`, `warnings` FROM `accounts` WHERE `name` = '1' LIMIT 1;: MYSQL ERROR: Unknown column 'name' in 'field list'

how can i fix this?
 
got some problems cant execute any command and when a character change his outfit when he log out the outfit restarts to citzen outfit
 
If you applied the patch by Evan, please also run this query:
SQL:
ALTER TABLE `accounts` ADD UNIQUE (`name`);

Here is a working schema for MySQL (will reupload the archives in the first post after looking at the possible SQLite issue):
SQL:
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 `tile_store`;
DROP TABLE IF EXISTS `tiles`;
DROP TABLE IF EXISTS `map_store`;
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_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 `guildwar_kills`;
DROP TABLE IF EXISTS `guild_wars`;
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 `market_history`;
DROP TABLE IF EXISTS `market_offers`;
DROP TABLE IF EXISTS `players`;
DROP TABLE IF EXISTS `accounts`;
DROP TABLE IF EXISTS `groups`;
DROP TABLE IF EXISTS `server_config`;


CREATE TABLE `groups`
(
    `id` INT NOT NULL AUTO_INCREMENT,
    `name` VARCHAR(255) NOT NULL COMMENT 'group name',
    `flags` BIGINT UNSIGNED NOT NULL DEFAULT 0,
    `access` INT NOT NULL,
    `maxdepotitems` INT NOT NULL,
    `maxviplist` INT NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB;


INSERT INTO `groups` VALUES (3, 'a god', 134788128760, 1, 0, 0);
INSERT INTO `groups` VALUES (2, 'a gamemaster', 137438953471, 1, 0, 0);
INSERT INTO `groups` VALUES (1, 'player', 0, 0, 0, 0);


CREATE TABLE `accounts`
(
    `id` INT NOT NULL AUTO_INCREMENT,
    `name` varchar(32) NOT NULL,
    `password` VARCHAR(255) /* VARCHAR(32) for MD5*/ NOT NULL DEFAULT '',
    `type` INT NOT NULL DEFAULT 1,
    `premdays` INT NOT NULL DEFAULT 0,
    `lastday` INT UNSIGNED NOT NULL DEFAULT 0,
    `key` VARCHAR(20) NOT NULL DEFAULT '0',
    `email` VARCHAR(255) NOT NULL DEFAULT '',
    `blocked` TINYINT(1) NOT NULL DEFAULT FALSE,
    `warnings` INT NOT NULL DEFAULT 0,
    `group_id` INT NOT NULL DEFAULT 1,
    PRIMARY KEY (`id`),
    UNIQUE KEY `name` (`name`),
    FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`)
) ENGINE = InnoDB;


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


CREATE TABLE `players`
(
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(255) NOT NULL,
    `group_id` int(11) NOT NULL DEFAULT '1',
    `account_id` int(11) NOT NULL DEFAULT '0',
    `level` int(11) NOT NULL DEFAULT '1',
    `vocation` int(11) NOT NULL DEFAULT '0',
    `health` int(11) NOT NULL DEFAULT '150',
    `healthmax` int(11) NOT NULL DEFAULT '150',
    `experience` bigint(20) NOT NULL DEFAULT '0',
    `lookbody` int(11) NOT NULL DEFAULT '0',
    `lookfeet` int(11) NOT NULL DEFAULT '0',
    `lookhead` int(11) NOT NULL DEFAULT '0',
    `looklegs` int(11) NOT NULL DEFAULT '0',
    `looktype` int(11) NOT NULL DEFAULT '136',
    `lookaddons` int(11) NOT NULL DEFAULT '0',
    `maglevel` int(11) NOT NULL DEFAULT '0',
    `mana` int(11) NOT NULL DEFAULT '0',
    `manamax` int(11) NOT NULL DEFAULT '0',
    `manaspent` int(11) NOT NULL DEFAULT '0',
    `soul` int(10) unsigned NOT NULL DEFAULT '0',
    `town_id` int(11) NOT NULL DEFAULT '0',
    `posx` int(11) NOT NULL DEFAULT '0',
    `posy` int(11) NOT NULL DEFAULT '0',
    `posz` int(11) NOT NULL DEFAULT '0',
    `conditions` blob NOT NULL,
    `cap` int(11) NOT NULL DEFAULT '0',
    `sex` int(11) NOT NULL DEFAULT '0',
    `lastlogin` bigint(20) unsigned NOT NULL DEFAULT '0',
    `lastip` int(10) unsigned NOT NULL DEFAULT '0',
    `save` tinyint(1) NOT NULL DEFAULT '1',
    `skull` tinyint(1) NOT NULL DEFAULT '0',
    `skulltime` int(11) NOT NULL DEFAULT '0',
    `rank_id` int(11) NOT NULL DEFAULT '0',
    `guildnick` varchar(255) NOT NULL DEFAULT '',
    `lastlogout` bigint(20) unsigned NOT NULL DEFAULT '0',
    `blessings` tinyint(2) NOT NULL DEFAULT '0',
    `direction` int(11) NOT NULL DEFAULT '0' COMMENT 'NOT IN USE BY THE SERVER',
    `loss_experience` int(11) NOT NULL DEFAULT '10' COMMENT 'NOT IN USE BY THE SERVER',
    `loss_mana` int(11) NOT NULL DEFAULT '10' COMMENT 'NOT IN USE BY THE SERVER',
    `loss_skills` int(11) NOT NULL DEFAULT '10' COMMENT 'NOT IN USE BY THE SERVER',
    `premend` int(11) NOT NULL DEFAULT '0' COMMENT 'NOT IN USE BY THE SERVER',
    `online` tinyint(4) NOT NULL DEFAULT '0',
    `balance` bigint(20) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`),
    KEY `name` (`name`),
    FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE,
    FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`)
) ENGINE=InnoDB;


INSERT INTO `players` VALUES (1,'Account Manager',1,1,1,0,150,150,0,0,0,0,0,110,0,0,0,0,0,0,0,50,50,7,'',400,0,0,0,0,0,0,0,'',0,0,0,10,10,10,0,0,0);


CREATE TABLE `bans`
(
    `type` INT NOT NULL COMMENT 'this field defines if its ip, accountban or namelock',
    `ip` INT UNSIGNED NOT NULL DEFAULT 0,
    `mask` INT UNSIGNED NOT NULL DEFAULT 4294967295,
    `player` INT UNSIGNED NOT NULL DEFAULT 0,
    `account` INT UNSIGNED NOT NULL DEFAULT 0,
    `time` INT UNSIGNED NOT NULL DEFAULT 0,
    `reason_id` INT NOT NULL DEFAULT 0,
    `action_id` INT NOT NULL DEFAULT 0,
    `comment` VARCHAR(60) NOT NULL DEFAULT '',
    `banned_by` INT UNSIGNED NOT NULL DEFAULT 0
) ENGINE = InnoDB;


CREATE TABLE `global_storage`
(
    `key` INT UNSIGNED NOT NULL,
    `value` INT NOT NULL,
    PRIMARY KEY  (`key`)
) ENGINE = InnoDB;


CREATE TABLE `guilds`
(
    `id` INT NOT NULL AUTO_INCREMENT,
    `name` VARCHAR(255) NOT NULL COMMENT 'guild name - nothing else needed here',
    `ownerid` INT NOT NULL,
    `creationdata` INT NOT NULL,
    `motd` VARCHAR(255) NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB;


CREATE TABLE `guild_invites`
(
    `player_id` INT UNSIGNED NOT NULL DEFAULT 0,
    `guild_id` INT UNSIGNED NOT NULL DEFAULT 0
) ENGINE = InnoDB;


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


CREATE TABLE `house_lists`
(
    `house_id` INT NOT NULL,
    `listid` INT NOT NULL,
    `list` TEXT NOT NULL
) ENGINE = InnoDB;


CREATE TABLE `houses`
(
    `id` INT NOT NULL AUTO_INCREMENT,
    `owner` INT NOT NULL,
    `paid` INT UNSIGNED NOT NULL DEFAULT 0,
    `warnings` TEXT NOT NULL,
    PRIMARY KEY (`id`)
) ENGINE = InnoDB;


CREATE TABLE `player_deaths`
(
    `player_id` INT NOT NULL,
    `time` BIGINT UNSIGNED NOT NULL DEFAULT 0,
    `level` INT NOT NULL DEFAULT 1,
    `killed_by` VARCHAR(255) NOT NULL,
    `is_player` TINYINT(1) NOT NULL DEFAULT 1,
    FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;


CREATE TABLE `player_depotitems`
(
    `player_id` INT NOT NULL,
    `depot_id` INT NOT NULL DEFAULT 0,
    `sid` INT NOT NULL COMMENT 'any given range eg 0-100 will be reserved for depot lockers and all > 100 will be then normal items inside depots',
    `pid` INT NOT NULL DEFAULT 0,
    `itemtype` INT NOT NULL,
    `count` INT NOT NULL DEFAULT 0,
    `attributes` BLOB NOT NULL,
    FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
    KEY (`player_id`, `depot_id`),
    UNIQUE KEY (`player_id`, `sid`)
) 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,
    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(4) NOT NULL DEFAULT 0,
    `value` INT UNSIGNED NOT NULL DEFAULT 0,
    `count` INT UNSIGNED NOT NULL DEFAULT 0,
    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,
     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` INT NOT NULL DEFAULT 0,
    FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;


CREATE TABLE `player_viplist`
(
    `player_id` INT NOT NULL COMMENT 'id of player whose viplist entry it is',
    `vip_id` INT NOT NULL COMMENT 'id of target player of viplist entry',
    FOREIGN KEY (`player_id`) REFERENCES `players`(`id`) ON DELETE CASCADE,
    FOREIGN KEY (`vip_id`) REFERENCES `players`(`id`) ON DELETE CASCADE
) ENGINE = InnoDB;


CREATE TABLE `map_store`
(
    `house_id` int(10) unsigned NOT NULL,
    `data` LONGBLOB NOT NULL,
    KEY `house_id` (`house_id`)
) ENGINE = InnoDB;


CREATE TABLE `tiles`
(
    `id` INT NOT NULL AUTO_INCREMENT,
    `x` INT NOT NULL,
    `y` INT NOT NULL,
    `z` INT NOT NULL,
    PRIMARY KEY(`id`)
) ENGINE = InnoDB;


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


CREATE TABLE `tile_store`
(
    `house_id` INT(11) NOT NULL,
    `data` LONGBLOB NOT NULL,
    FOREIGN KEY (`house_id`) REFERENCES `houses` (`id`) ON DELETE CASCADE
) ENGINE = InnoDB;


CREATE TABLE `guild_wars`
(
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `guild1` int(11) NOT NULL DEFAULT '0',
    `guild2` int(11) NOT NULL DEFAULT '0',
    `name1` varchar(255) NOT NULL,
    `name2` varchar(255) NOT NULL,
    `status` tinyint(2) NOT NULL DEFAULT '0',
    `started` bigint(15) NOT NULL DEFAULT '0',
    `ended` bigint(15) NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`),
    KEY `guild1` (`guild1`),
    KEY `guild2` (`guild2`)
) ENGINE=InnoDB;


CREATE TABLE `guildwar_kills`
(
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `killer` varchar(50) NOT NULL,
    `target` varchar(50) NOT NULL,
    `killerguild` int(11) NOT NULL DEFAULT '0',
    `targetguild` int(11) NOT NULL DEFAULT '0',
    `warid` int(11) NOT NULL DEFAULT '0',
    `time` bigint(15) NOT NULL,
    PRIMARY KEY (`id`),
    FOREIGN KEY (`warid`) REFERENCES `guild_wars` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;


CREATE TABLE `server_config`
(
    `config` varchar(50) NOT NULL,
    `value` varchar(256) NOT NULL DEFAULT '',
    UNIQUE KEY `config` (`config`)
) ENGINE=InnoDB;


INSERT INTO `server_config` VALUES ('db_version','5'),('encryption','0');


CREATE TABLE `market_history`
(
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `player_id` int(11) NOT NULL,
    `sale` tinyint(1) NOT NULL DEFAULT '0',
    `itemtype` int(10) unsigned NOT NULL,
    `amount` smallint(5) unsigned NOT NULL,
    `price` int(10) unsigned NOT NULL DEFAULT '0',
    `expires_at` bigint(20) unsigned NOT NULL,
    `inserted` bigint(20) unsigned NOT NULL,
    `state` tinyint(1) unsigned NOT NULL,
    PRIMARY KEY (`id`),
    KEY `player_id` (`player_id`,`sale`),
    FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;


CREATE TABLE `market_offers`
(
    `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
    `player_id` int(11) NOT NULL,
    `sale` tinyint(1) NOT NULL DEFAULT '0',
    `itemtype` int(10) unsigned NOT NULL,
    `amount` smallint(5) unsigned NOT NULL,
    `created` bigint(20) unsigned NOT NULL,
    `anonymous` tinyint(1) NOT NULL DEFAULT '0',
    `price` int(10) unsigned NOT NULL DEFAULT '0',
    PRIMARY KEY (`id`),
    KEY `sale` (`sale`,`itemtype`),
    KEY `created` (`created`),
    FOREIGN KEY (`player_id`) REFERENCES `players` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB;


DELIMITER |


CREATE TRIGGER `ondelete_accounts`
BEFORE DELETE
ON `accounts`
FOR EACH ROW
BEGIN
    DELETE FROM `bans` WHERE `account` = OLD.`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 `ondelete_players`
BEFORE DELETE
ON `players`
FOR EACH ROW
BEGIN
    DELETE FROM `bans` WHERE `type` = 2 AND `player` = OLD.`id`;
    UPDATE `houses` SET `owner` = 0 WHERE `owner` = OLD.`id`;
END|


CREATE TRIGGER `oncreate_guilds`
AFTER INSERT
ON `guilds`
FOR EACH ROW
BEGIN
    INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('the Leader', 3, NEW.`id`);
    INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('a Vice-Leader', 2, NEW.`id`);
    INSERT INTO `guild_ranks` (`name`, `level`, `guild_id`) VALUES ('a Member', 1, NEW.`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|


DELIMITER ;

EDIT: Found the issue with SQLite, a patch will be uploaded soon.

EDIT2: Patch Level 1 has been released, some more info in the first post. Please redownload, and let me know if any of the issues persist. It should also support maps saved in RME 3.0 Beta 8 (not the .otgz format!).
 
Talaturen, changing the deathLosePercent = doesn't work.

That's true, the death penalty was reworked so deathLosePercent is ignored now I think. I don't know if it will still be possible to have it as a simple number with the new formula, I'll see what I can do for 0.2.14 which will be released some weeks (I need that time to test the stability with 9.6 changes) after 9.6 is official. Until then you will have to modify the source code to change it, or you might be able to write some ugly hacks with onDeath and onLogin scripts to adjust it but I would recommend waiting unless it is critical to you.
 
That's true, the death penalty was reworked so deathLosePercent is ignored now I think. I don't know if it will still be possible to have it as a simple number with the new formula, I'll see what I can do for 0.2.14 which will be released some weeks (I need that time to test the stability with 9.6 changes) after 9.6 is official. Until then you will have to modify the source code to change it, or you might be able to write some ugly hacks with onDeath and onLogin scripts to adjust it but I would recommend waiting unless it is critical to you.

I never learned C++, so I'm dependent on your releases. Also, could you add emoteSpells = "yes" to 0.2.14? I'm also wondering if Crying Damnson is stable now, the last version I tried was 8.54 and it would constantly crash.

- - - Updated - - -

Oh, umm.. is there a function so you get teleported to temple like if it was an arena? If so, I wouldn't need to wait for 0.2.14.
 
currently the server is awesome, however when i save a map in rme beta 3.0 the forgotten server will flash the error message critical error unable to load map, and then instantly shut down. any advice on a fix?
 
I never learned C++, so I'm dependent on your releases. Also, could you add emoteSpells = "yes" to 0.2.14? I'm also wondering if Crying Damnson is stable now, the last version I tried was 8.54 and it would constantly crash.

- - - Updated - - -

Oh, umm.. is there a function so you get teleported to temple like if it was an arena? If so, I wouldn't need to wait for 0.2.14.

If I can remember that, yes. I suggest you to post it as a feature request in the project tools for 0.2 though. Crying Damson is still under development, until the final version has been released I will not claim that it is anywhere near stable. At least not with LuaJIT, which the pre-release was compiled with, so do not use that in production, it will crash.

0.2 works fine with LuaJIT though, I've been running it for years, even before I started releasing 0.2 with it so don't worry about that.

The function you are looking for is a creature event (creaturescript) called onPrepareDeath (registered in xml with preparedeath).
In the script, the function should look like this (killer is the cid of the killer):

Lua:
-- This function is executed when a player is about to die
function onPrepareDeath(cid, killer)
    -- Call some function to add hp so the player doesn't die
    -- Teleport the player
end

currently the server is awesome, however when i save a map in rme beta 3.0 the forgotten server will flash the error message critical error unable to load map, and then instantly shut down. any advice on a fix?

That's weird. I didn't actually test it, I just applied Remere's patch that he commited to OpenTibia with a few changes (that hopefully didn't cause it). I'll try it later and see if I can reproduce it.
 
Last edited by a moderator:
I tried this, but it just keeps crashing.
PHP:
local newPos = {x = 1209, y = 1763, z = 9, stackpos = 1}

function onPrepareDeath(cid, killer)
        		doTeleportThing(cid, newPos)
			doCreatureAddHealth(cid, 1000)
			return FALSE
        end

- - - Updated - - -

but this works for loot, so wth..
PHP:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
                doSetCreatureDropLoot(cid, false)
        end
 
is it possible to add /promote command?

You can create it using talkactions, yes.

I tried this, but it just keeps crashing.
PHP:
local newPos = {x = 1209, y = 1763, z = 9, stackpos = 1}

function onPrepareDeath(cid, killer)
                doTeleportThing(cid, newPos)
            doCreatureAddHealth(cid, 1000)
            return FALSE
        end

- - - Updated - - -

but this works for loot, so wth..
PHP:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
                doSetCreatureDropLoot(cid, false)
        end

I would guess the crash is because of doTeleportThing, could you try only adding hp and see if that crashes, and then try only teleporting and see if that crashes so I know which one it is?
 
about the /promote command
I Dont know how to make the commands in 0.2 can u help me here talaturen with the script ill appreciate it please ;)

also i got another problem always when i want to edit my .s3db a message pop up saying database is currently locked and i have to shutdown the server and do it and sometimes it saves and sometimes don't how can i fix that please need a quick reply for fix this i am currently working in my server the map is done :) but i dont know if this server could work for a 24/7 server hope you can help me
 
Coudln't run it because of this:
[08/07/2012 20:22:28] >> Loading database driver...Failed to connect to database. MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061)
[08/07/2012 20:22:29] > ERROR: Failed to connect to database, read doc/MYSQL_HELP for information or try SQLite which doesn't require any connection.

Running Xampp at win.7 32 bitszor
 
My npcs wont load :S they are there on the map editor. I can summon them as a god ingame, but they don't load themselves. Not sure if monsters do either.. No errors either. And yes there are spawn pos with default spawn time (even though this shouldn't affect npcs anyway unless made killable). I have no clue why they wont spawn on map load.

Strange that i get no errors. And funnily enough i don't see the console say "loading npcs" or anything. Is that missing from the config?
 
Coudln't run it because of this:
[08/07/2012 20:22:28] >> Loading database driver...Failed to connect to database. MYSQL ERROR: Can't connect to MySQL server on 'localhost' (10061)
[08/07/2012 20:22:29] > ERROR: Failed to connect to database, read doc/MYSQL_HELP for information or try SQLite which doesn't require any connection.

Running Xampp at win.7 32 bitszor

Is MySQL running? Do you have correct configuration in config.lua?

My npcs wont load :S they are there on the map editor. I can summon them as a god ingame, but they don't load themselves. Not sure if monsters do either.. No errors either. And yes there are spawn pos with default spawn time (even though this shouldn't affect npcs anyway unless made killable). I have no clue why they wont spawn on map load.

Strange that i get no errors. And funnily enough i don't see the console say "loading npcs" or anything. Is that missing from the config?

Try with the console version and see if there are any errors.
 
kk will check tomorrow,
cheers
 
Is MySQL running? Do you have correct configuration in config.lua?


Yep running Xampp,
but 0.3.6 cyring damson works with almost the same config, only the names of the database are diffrent

I don't know why 0.2 wouldn't be able to connect then, it's working fine for me. You could try changing localhost to 127.0.0.1 to see if that makes any difference.
 
Status
Not open for further replies.
Back
Top