Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Legend.mu client & server source code S16 1.1

Skilled Illusionist
Joined
Feb 13, 2004
Messages
351
Reaction score
54
Still working with the trade...if well is "working" the UI appear, you cannot ended the trade because is a like by default this is the message:
Your trade has been canceled because your inventory is full

POST SYSTEM is working if you enabled on the settings (minlvl=10, zenCost=10):

Code:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'Command.Post.MinLevel', '10'), ('0', 'Command.Post.Head', '$name: [POST][$server]: $message'), ('0', 'Command.Post.Enabled', '1'), ('0', 'Command.Post.Delay', '1'), ('0', 'Command.Post.Cost', '10')

Expanded inventory working with this setting:

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'Character.MaxExpandedInventory', '3')

Event inventory working with this setting:

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'EventInventory.Enabled', '1')

Also this server files contain a interesting config that I remember when I played Legend.mu that is when inventory is Full, the items going to the Gremory Case:

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'GameServer.FullInventoryToGremoryCase', '1')

Bugs/missing config:

  1. Trade it's not possible to finish
  2. You cannot add points
  3. You cannot add points using /addstr comands etc
 
Junior Spellweaver
Joined
Oct 4, 2007
Messages
173
Reaction score
74
Re: [Release] Legend.mu client & server source code S16 1.1

take it who need... Character_base

PHP:
/* Navicat Premium Data Transfer Source Server         : localhost Source Server Type    : MySQL Source Server Version : 50729 Source Host           : localhost:3306 Source Schema         : mu_online_game Target Server Type    : MySQL Target Server Version : 50729 File Encoding         : 65001 Date: 12/03/2021 23:01:13*/SET NAMES utf8mb4;SET FOREIGN_KEY_CHECKS = 0;-- ------------------------------ Table structure for character_base-- ----------------------------DROP TABLE IF EXISTS `character_base`;CREATE TABLE `character_base`  (  `race` int(10) UNSIGNED NOT NULL,  `strength` int(10) UNSIGNED NULL DEFAULT NULL,  `agility` int(10) UNSIGNED NULL DEFAULT NULL,  `vitality` int(10) UNSIGNED NULL DEFAULT NULL,  `energy` int(10) UNSIGNED NULL DEFAULT NULL,  `leadership` int(10) UNSIGNED NULL DEFAULT NULL,  `life` int(11) NULL DEFAULT NULL,  `mana` int(11) NULL DEFAULT NULL,  `life_per_level` float NULL DEFAULT NULL,  `mana_per_level` float NULL DEFAULT NULL,  `life_per_vitality` float NULL DEFAULT NULL,  `mana_per_energy` float NULL DEFAULT NULL,  `world` smallint(5) UNSIGNED NULL DEFAULT NULL,  `level` smallint(6) NULL DEFAULT NULL,  `points` int(11) NULL DEFAULT NULL,  `recovery_life` float NULL DEFAULT NULL,  `recovery_mana` float NULL DEFAULT NULL,  `recovery_shield` float NULL DEFAULT NULL,  `recovery_stamina` float NULL DEFAULT NULL,  `points_levelup` int(10) UNSIGNED NULL DEFAULT NULL,  `points_levelup_plus` int(10) UNSIGNED NULL DEFAULT NULL,  `points_levelup_master` int(10) UNSIGNED NULL DEFAULT NULL,  `points_levelup_majestic` int(10) UNSIGNED NULL DEFAULT NULL,  PRIMARY KEY (`race`) USING BTREE) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;-- ------------------------------ Records of character_base-- ----------------------------INSERT INTO `character_base` VALUES (0, 18, 18, 15, 30, 0, 60, 60, 1, 2, 1, 2, 0, 1, 50, 110, 60, 99, 21, 5, 1, 5, 1);INSERT INTO `character_base` VALUES (1, 28, 20, 25, 10, 0, 110, 20, 2, 0.5, 3, 1, 0, 1, 50, 110, 20, 100, 25, 5, 1, 5, 1);INSERT INTO `character_base` VALUES (2, 22, 25, 20, 15, 0, 80, 30, 1, 1, 2, 1.5, 0, 1, 50, 80, 30, 99, 20, 5, 1, 5, 1);INSERT INTO `character_base` VALUES (3, 26, 26, 26, 16, 0, 110, 60, 1, 1, 2, 2, 0, 1, 50, 110, 60, 127, 23, 7, 1, 7, 1);INSERT INTO `character_base` VALUES (4, 26, 20, 20, 15, 25, 25, 90, 1.5, 1, 2, 1.5, 0, 1, 50, 25, 90, 23, 40, 7, 1, 7, 1);INSERT INTO `character_base` VALUES (5, 21, 21, 18, 23, 0, 70, 40, 1, 1.5, 2, 1.7, 0, 1, 50, 70, 40, 102, 18, 5, 1, 5, 1);INSERT INTO `character_base` VALUES (6, 32, 27, 25, 20, 0, 100, 40, 1.3, 1, 2, 1.3, 0, 1, 50, 100, 40, 125, 37, 7, 1, 7, 1);INSERT INTO `character_base` VALUES (7, 30, 30, 25, 24, 0, 110, 40, 2, 1, 1, 1, 0, 1, 50, 110, 40, 102, 21, 5, 1, 5, 1);INSERT INTO `character_base` VALUES (8, 13, 18, 14, 40, 0, 110, 40, 2, 1, 1, 1, 0, 1, 50, 110, 40, 102, 21, 5, 1, 5, 1);INSERT INTO `character_base` VALUES (9, 28, 30, 15, 10, 0, 110, 40, 2, 1, 1, 1, 0, 1, 50, 110, 40, 102, 21, 5, 1, 5, 1);INSERT INTO `character_base` VALUES (10, 20, 18, 20, 25, 0, 110, 40, 2, 1, 1, 1, 0, 1, 50, 110, 40, 102, 21, 5, 1, 5, 1);SET FOREIGN_KEY_CHECKS = 1;
Check muoneline.co.kr with korea proxy. Your values not correct.
Btw, where you get recovery life, mana, stamina and sd?

points_levelup - basic points
points_levelup_plus - after marlon
points_levelup_master - same as after marlon
points_levelup_majestic - same
If i remember right

PS. i think we need to add comment column to settings :D



@metallica about character_base, i took stats from muonline.co.kr :D:
If you add in character_base some points, create character, try to add to str some, you cant, i dunno why.
Didnt found problem. Tomorrow will loook
Check database errors



Anyway, was looking in mudev_s16 data folder, some files can add into db, but some need to think.



I will be working tomorrow with item_* tables. Maybe monster. I will try to finish them tomorrow
 
Skilled Illusionist
Joined
Feb 13, 2004
Messages
351
Reaction score
54
Re: [Release] Legend.mu client & server source code S16 1.1

Check muoneline.co.kr with korea proxy. Your values not correct.
Btw, where you get recovery life, mana, stamina and sd?

points_levelup - basic points
points_levelup_plus - after marlon
points_levelup_master - same as after marlon
points_levelup_majestic - same
If i remember right

PS. i think we need to add comment column to settings :D



@metallica about character_base, i took stats from muonline.co.kr :D:
If you add in character_base some points, create character, try to add to str some, you cant, i dunno why.
Didnt found problem. Tomorrow will loook
Check database errors



Anyway, was looking in mudev_s16 data folder, some files can add into db, but some need to think.



I will be working tomorrow with item_* tables. Maybe monster. I will try to finish them tomorrow

Its ok if you took stat from KR, Legend.mu always emulate all the packets with Korean Server, that is why I used Legend.mu in my test because it's still open.
Regarding addstr atm i dont have any errors, maybe could be a packet issue because we are not using the same main that Legend.mu, that maybe is why I'm stuck into trade too, I search into the code and the logs show me that the trade was "ok"

Code:
2021-03-12_21:39:04 INFO TradeRequest() [admin][Trolaza] Requested [testdk][GunPo]
2021-03-12_21:39:06 INFO TradeRequestAnswer() [SRV 0 -- 1500 - IP: 192.168.0.105 - MAC: C4:6E:1F:21:DD:65 - Account: 3-testdk - Character: 19-GunPo] Accepted [SRV 0 -- 1501 - IP: 192.168.0.105 - MAC: C4:6E:1F:21:DD:65 - Account: 4-admin - Character: 23-Trolaza]
2021-03-12_21:39:13 INFO TradeZen() [admin][Trolaza] -- [testdk][GunPo] -> Add Zen 1500 from 999953

I'm still investigating both issues
 
Newbie Spellweaver
Joined
Nov 2, 2012
Messages
18
Reaction score
9
Re: [Release] Legend.mu client & server source code S16 1.1

A column is missing in mu_online_game.monster, look at the cycle start index, it starts at index 1, so a column is missing at index 0 in the monster table. I am currently looking for the name of the current column. Fixed this, the mob spawn correctly.

Without this fix world var get populated with x1 value


Game > DbInfo > MonsterMgr.ccp L: 717
Code:
if ( result )
	{
		do
		{
			Field* fields = result->Fetch();

			monster * add_monster = new monster;
			int32 loop = 1;

			add_monster->SetGUID(fields[loop++].GetUInt16());
			add_monster->SetID(fields[loop++].GetUInt16());
			add_monster->SetType(fields[loop++].GetUInt8());
			add_monster->SetName(fields[loop++].GetCString());
			add_monster->SetWorld(fields[loop++].GetUInt16());
			add_monster->SetX1(fields[loop++].GetInt16());
			add_monster->SetY1(fields[loop++].GetInt16());
			add_monster->SetX2(fields[loop++].GetInt16());
			add_monster->SetY2(fields[loop++].GetInt16());
			add_monster->SetDirection(fields[loop++].GetInt8());
			add_monster->SetSpawnDelay(fields[loop++].GetUInt32());
			add_monster->SetSpawnDistance(fields[loop++].GetUInt8());
			add_monster->SetRespawnTimeMin(fields[loop++].GetUInt32());
			add_monster->SetRespawnTimeMax(fields[loop++].GetUInt32());
			add_monster->SetRespawnID(fields[loop++].GetUInt32());
			add_monster->SetMoveDistance(fields[loop++].GetUInt8());
			add_monster->SetNpcFunction(fields[loop++].GetString());
			add_monster->SetItemBag(fields[loop++].GetString());
			add_monster->SetScriptName(fields[loop++].GetString());
			add_monster->SetElementalAttribute(fields[loop++].GetUInt8());
.......

mesosa - [Release] Legend.mu client & server source code S16 1.1 - RaGEZONE Forums

mesosa - [Release] Legend.mu client & server source code S16 1.1 - RaGEZONE Forums


edit:
found, the first column is 'server' instead of the last one. from



I managed to populate the monster_template table (with simple node script) using MonsterList.xml from igcn 16. but some properties are missing or can't find where to retrieve them. if anyone has experience with this file please share.

I have also changed the table schema so that some properties are supported, such as resitence_ * from TINYINT (3) to SMALLINT (3)

(with some change can be used to import items/others)

updated monster_template schema
Code:
CREATE TABLE `monster_template` (
  `id` smallint(5) unsigned NOT NULL,
  `name` varchar(255) DEFAULT NULL,
  `model` smallint(5) unsigned DEFAULT NULL,
  `size` float DEFAULT NULL,
  `type` tinyint(4) unsigned DEFAULT NULL,
  `min_level` smallint(5) unsigned DEFAULT NULL,
  `max_level` smallint(5) unsigned DEFAULT NULL,
  `life` int(11) DEFAULT NULL,
  `mana` int(11) DEFAULT NULL,
  `shield` int(11) DEFAULT NULL,
  `stamina` int(11) DEFAULT NULL,
  `attack_min_damage` int(11) DEFAULT NULL,
  `attack_max_damage` int(11) DEFAULT NULL,
  `magic_min_damage` int(11) DEFAULT NULL,
  `magic_max_damage` int(11) DEFAULT NULL,
  `critical_damage_rate` int(11) DEFAULT NULL,
  `critical_damage_add` int(11) DEFAULT NULL,
  `excellent_damage_rate` int(11) DEFAULT NULL,
  `excellent_damage_add` int(11) DEFAULT NULL,
  `attack_success` int(11) DEFAULT NULL,
  `defense` int(11) DEFAULT NULL,
  `defense_magic` int(11) DEFAULT NULL,
  `defense_success` int(11) DEFAULT NULL,
  `move_range` int(10) unsigned DEFAULT NULL,
  `move_speed` int(10) unsigned DEFAULT NULL,
  `attack_range` int(10) unsigned DEFAULT NULL,
  `attack_speed` int(11) DEFAULT NULL,
  `view_range` int(10) unsigned DEFAULT NULL,
  `resistance_1` smallint(3) unsigned DEFAULT NULL,
  `resistance_2` smallint(3) unsigned DEFAULT NULL,
  `resistance_3` smallint(3) unsigned DEFAULT NULL,
  `resistance_4` smallint(3) unsigned DEFAULT NULL,
  `resistance_5` smallint(3) unsigned DEFAULT NULL,
  `resistance_6` smallint(3) unsigned DEFAULT NULL,
  `resistance_7` smallint(3) unsigned DEFAULT NULL,
  `respawn_time_min` int(10) unsigned DEFAULT NULL,
  `respawn_time_max` int(10) unsigned DEFAULT NULL,
  `item_rate` int(11) DEFAULT NULL,
  `zen_rate` int(11) DEFAULT NULL,
  `item_max_level` int(11) DEFAULT NULL,
  `life_regen_power` float DEFAULT NULL,
  `life_regen_time` int(10) unsigned DEFAULT NULL,
  `mana_regen_power` float DEFAULT NULL,
  `mana_regen_time` int(10) unsigned DEFAULT NULL,
  `shield_regen_power` float DEFAULT NULL,
  `shiled_regen_time` int(10) unsigned DEFAULT NULL,
  `stamina_regen_power` float DEFAULT NULL,
  `stamina_regen_time` int(10) unsigned DEFAULT NULL,
  `faction` tinyint(3) unsigned DEFAULT NULL,
  `faction_level` tinyint(3) unsigned DEFAULT NULL,
  `script_name` varchar(255) DEFAULT NULL,
  `elemental_attribute` tinyint(3) unsigned DEFAULT NULL,
  `elemental_pattern` int(11) DEFAULT NULL,
  `elemental_defense` int(11) DEFAULT NULL,
  `elemental_damage_min` int(11) DEFAULT NULL,
  `elemental_damage_max` int(11) DEFAULT NULL,
  `elemental_attack_rate` int(11) DEFAULT NULL,
  `elemental_defense_rate` int(11) DEFAULT NULL,
  `radiance_immune` tinyint(3) unsigned DEFAULT NULL,
  `debuff_resistance` int(11) DEFAULT NULL,
  `debuff_defense` int(11) DEFAULT NULL,
  `critical_damage_resistance` tinyint(3) unsigned DEFAULT NULL,
  `excellent_damage_resistance` tinyint(3) unsigned DEFAULT NULL,
  `damage_absorb` tinyint(3) unsigned DEFAULT NULL,
  `elite` tinyint(4) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;







Still working with the trade...if well is "working" the UI appear, you cannot ended the trade because is a like by default this is the message:
Your trade has been canceled because your inventory is full

POST SYSTEM is working if you enabled on the settings (minlvl=10, zenCost=10):

Code:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'Command.Post.MinLevel', '10'), ('0', 'Command.Post.Head', '$name: [POST][$server]: $message'), ('0', 'Command.Post.Enabled', '1'), ('0', 'Command.Post.Delay', '1'), ('0', 'Command.Post.Cost', '10')

Expanded inventory working with this setting:

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'Character.MaxExpandedInventory', '3')

Event inventory working with this setting:

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'EventInventory.Enabled', '1')

Also this server files contain a interesting config that I remember when I played Legend.mu that is when inventory is Full, the items going to the Gremory Case:

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'GameServer.FullInventoryToGremoryCase', '1')

Bugs/missing config:

  1. Trade it's not possible to finish
  2. You cannot add points
  3. You cannot add points using /addstr comands etc

Sam for adding points you need to set a default max value to Character.MaxAgility, Character.MaxEnergy, Character.MaxLeadership, Character.MaxStrength, Character.MaxVitality greater than 0 in settings table
 
Last edited:
Junior Spellweaver
Joined
Oct 4, 2007
Messages
173
Reaction score
74
Re: [Release] Legend.mu client & server source code S16 1.1

@jpra110 yeah, add stats is working now, thx.



I have also changed the table schema so that some properties are supported, such as resitence_ * from TINYINT (3) to SMALLINT (3)
You need to update code too
Code:
   for ( uint8 i = 0; i < Element::MAX; i++ )
   {
    add_monster->SetResistance(i, fields[loop++].GetUInt8());
   }



Resistance order from server
Code:
namespace Element
{
  enum
  {
    ICE,
    POISON,
    LIGHTNING,
    FIRE,
    EARTH,
    WIND,
    WATER,
    MAX
  };
}



int32 loop = 1;
Lol i missed this :D



Re-Uploaded here:
-

Files:
- Data_MuDev_S16_1.zip
- Data_Webzen_S12_1.zip
@jpra110 use mudev_s16 data folder, with some regex (simply in notepad++) you can easlity make csv and import



I will do it now




But i dont know where to put Level column (now is min_level), AttackType and MonsterExpLevel, RegenTime and Attribute too
Other columns i think is ok.
Skill column need to move in monster_skill



About resistance, checked mudev_s16 folder max value is 255, so it's ok to be tinyint unsigned



ps. guys i dont using update to MonsterManager from MuLegend. Dont want for now



Ok, so MonsterExpLevel is useless i think. Check source
void Player::GiveSingleExperience(Monster * mMonster, int32 damage)



AttackType is useless too, cant find any lines in code about it.
Found:
if ( Random(4) && this->SpecialMagicAttack() )
{
this->SetNextActionTime(this->GetIntData(UNIT_INT_MAGIC_SPEED));
}
else if ( Random(3) && this->MagicAttack() )
{
this->SetNextActionTime(this->GetIntData(UNIT_INT_MAGIC_SPEED));
}
else
{
this->NormalAttack();
}



Maybe Attribute is life, mana, sd or stamina? And RegenTime it's time?



My current db (with updates my and from topic)



monster_ai tables without monster_ai_data (from mudev, they have differenet ai)
 
Last edited:
Skilled Illusionist
Joined
Feb 13, 2004
Messages
351
Reaction score
54
@jpra110 lol I was setting that MAX but only the Strengh just for test, I didnt realize that never work if you dont add that settings for ALL stats..now is working, thanks

Fixed adding points :

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'Character.MaxAgility', '10000'), ('0', 'Character.MaxEnergy', '10000'), ('0', 'Character.MaxLeadership', '10000'), ('0', 'Character.MaxStrength', '10000'), ('0', 'Character.MaxVitality', '10000')

Level settings:

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'Character.MaxLevelMajestic', '400'), ('0', 'Character.MaxLevelMaster', '400'), ('0', 'Character.MaxLevelNormal', '400')

Fixed trade (at least with zen, I couldnt test with items yet):

PHP:
INSERT INTO `settings` (`server_id`, `key`, `value`) VALUES ('0', 'Character.MaxZen', '1999999999')


Server Online Stability: 12hours without crash with 2 online
 
Newbie Spellweaver
Joined
Nov 2, 2012
Messages
18
Reaction score
9
Some index, fk updates

uniq constraint: duplicate seetting for the same server

Code:
ALTER TABLE `mu_online_game`.`settings` 
ADD UNIQUE INDEX `uniq_setting_server` (`key` ASC, `server_id` ASC);
;


Code:
ALTER TABLE `mu_online_game`.`monster` 
ADD CONSTRAINT `server_fk`
  FOREIGN KEY (`server`)
  REFERENCES `mu_online_login`.`server_list` (`server`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `monster_template_fk`
  FOREIGN KEY (`id`)
  REFERENCES `mu_online_game`.`monster_template` (`id`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION


uniq constraint: duplicate world for the same server, and world fks

Code:
ALTER TABLE `mu_online_login`.`world_server` 
ADD INDEX `server_fk_idx` (`server` ASC),
ADD INDEX `world_fk_idx` (`world` ASC),
ADD UNIQUE INDEX `server_unique_world` (`world` ASC, `server` ASC);
;
ALTER TABLE `mu_online_login`.`world_server` 
ADD CONSTRAINT `server_fk`
  FOREIGN KEY (`server`)
  REFERENCES `mu_online_login`.`server_list` (`server`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

uniq constraint: duplicate character name
Code:
ALTER TABLE `mu_online_login`.`accounts` 
ADD UNIQUE INDEX `unique` (`account` ASC);

character fk
Code:
ALTER TABLE `mu_online_characters`.`character_info` 
ADD INDEX `account_fk_idx` (`account_id` ASC),
ADD UNIQUE INDEX `unique_name` (`name` ASC),
ADD INDEX `world_fk_idx` (`world` ASC);
;
ALTER TABLE `mu_online_characters`.`character_info` 
ADD CONSTRAINT `account_fk`
  FOREIGN KEY (`account_id`)
  REFERENCES `mu_online_login`.`accounts` (`guid`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

working on
mu_online_game.monster.respawn_id fk reference ??
monster.type ===> monster soul data ===> table monster_soul_converter
 
Newbie Spellweaver
Joined
Nov 2, 2012
Messages
18
Reaction score
9
Some index, fk updates

uniq constraint: duplicate seetting for the same server

Code:
ALTER TABLE `mu_online_game`.`settings` 
ADD UNIQUE INDEX `uniq_setting_server` (`key` ASC, `server_id` ASC);
;


Code:
ALTER TABLE `mu_online_game`.`monster` 
ADD CONSTRAINT `server_fk`
  FOREIGN KEY (`server`)
  REFERENCES `mu_online_login`.`server_list` (`server`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `monster_template_fk`
  FOREIGN KEY (`id`)
  REFERENCES `mu_online_game`.`monster_template` (`id`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION


uniq constraint: duplicate world for the same server, and world fks

Code:
ALTER TABLE `mu_online_login`.`world_server` 
ADD INDEX `server_fk_idx` (`server` ASC),
ADD INDEX `world_fk_idx` (`world` ASC),
ADD UNIQUE INDEX `server_unique_world` (`world` ASC, `server` ASC);
;
ALTER TABLE `mu_online_login`.`world_server` 
ADD CONSTRAINT `server_fk`
  FOREIGN KEY (`server`)
  REFERENCES `mu_online_login`.`server_list` (`server`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

uniq constraint: duplicate character name
Code:
ALTER TABLE `mu_online_login`.`accounts` 
ADD UNIQUE INDEX `unique` (`account` ASC);

character fk
Code:
ALTER TABLE `mu_online_characters`.`character_info` 
ADD INDEX `account_fk_idx` (`account_id` ASC),
ADD UNIQUE INDEX `unique_name` (`name` ASC),
ADD INDEX `world_fk_idx` (`world` ASC);
;
ALTER TABLE `mu_online_characters`.`character_info` 
ADD CONSTRAINT `account_fk`
  FOREIGN KEY (`account_id`)
  REFERENCES `mu_online_login`.`accounts` (`guid`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

working on
mu_online_game.monster.respawn_id fk reference ??
monster.type ===> monster soul data ===> table monster_soul_converter
 
Newbie Spellweaver
Joined
Nov 2, 2012
Messages
18
Reaction score
9
jpra110 not work add monster crash add server code "0" instanced
mesosa - [Release] Legend.mu client & server source code S16 1.1 - RaGEZONE Forums

try this

mesosa - [Release] Legend.mu client & server source code S16 1.1 - RaGEZONE Forums


Some index, fk updates

uniq constraint: duplicate seetting for the same server

Code:
ALTER TABLE `mu_online_game`.`settings` 
ADD UNIQUE INDEX `uniq_setting_server` (`key` ASC, `server_id` ASC);
;


Code:
ALTER TABLE `mu_online_game`.`monster` 
ADD CONSTRAINT `server_fk`
  FOREIGN KEY (`server`)
  REFERENCES `mu_online_login`.`server_list` (`server`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `monster_template_fk`
  FOREIGN KEY (`id`)
  REFERENCES `mu_online_game`.`monster_template` (`id`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION


uniq constraint: duplicate world for the same server, and world fks

Code:
ALTER TABLE `mu_online_login`.`world_server` 
ADD INDEX `server_fk_idx` (`server` ASC),
ADD INDEX `world_fk_idx` (`world` ASC),
ADD UNIQUE INDEX `server_unique_world` (`world` ASC, `server` ASC);
;
ALTER TABLE `mu_online_login`.`world_server` 
ADD CONSTRAINT `server_fk`
  FOREIGN KEY (`server`)
  REFERENCES `mu_online_login`.`server_list` (`server`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

uniq constraint: duplicate character name
Code:
ALTER TABLE `mu_online_login`.`accounts` 
ADD UNIQUE INDEX `unique` (`account` ASC);

character fk
Code:
ALTER TABLE `mu_online_characters`.`character_info` 
ADD INDEX `account_fk_idx` (`account_id` ASC),
ADD UNIQUE INDEX `unique_name` (`name` ASC),
ADD INDEX `world_fk_idx` (`world` ASC);
;
ALTER TABLE `mu_online_characters`.`character_info` 
ADD CONSTRAINT `account_fk`
  FOREIGN KEY (`account_id`)
  REFERENCES `mu_online_login`.`accounts` (`guid`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION,
ADD CONSTRAINT `world_fk`
  FOREIGN KEY (`world`)
  REFERENCES `mu_online_game`.`world_template` (`entry`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;

working on
mu_online_game.monster.respawn_id fk reference ??
monster.type ===> monster soul data ===> table monster_soul_converter
 
Newbie Spellweaver
Joined
Nov 2, 2012
Messages
18
Reaction score
9
Re: [Release] Legend.mu client &amp;amp; server source code S16 1.1

Could you share the log file ?



@jpra110 yeah, add stats is working now, thx.




You need to update code too
Code:
   for ( uint8 i = 0; i < Element::MAX; i++ )
   {
    add_monster->SetResistance(i, fields[loop++].GetUInt8());
   }



Resistance order from server
Code:
namespace Element
{
  enum
  {
    ICE,
    POISON,
    LIGHTNING,
    FIRE,
    EARTH,
    WIND,
    WATER,
    MAX
  };
}




Lol i missed this :D



@jpra110 use mudev_s16 data folder, with some regex (simply in notepad++) you can easlity make csv and import



I will do it now




But i dont know where to put Level column (now is min_level), AttackType and MonsterExpLevel, RegenTime and Attribute too
Other columns i think is ok.
Skill column need to move in monster_skill



About resistance, checked mudev_s16 folder max value is 255, so it's ok to be tinyint unsigned



ps. guys i dont using update to MonsterManager from MuLegend. Dont want for now



Ok, so MonsterExpLevel is useless i think. Check source




AttackType is useless too, cant find any lines in code about it.
Found:




Maybe Attribute is life, mana, sd or stamina? And RegenTime it's time?



My current db (with updates my and from topic)



monster_ai tables without monster_ai_data (from mudev, they have differenet ai)

Sam3000 monster_template column order is not correct



jpra110 not work add monster crash add server code "0" instanced
mesosa - [Release] Legend.mu client & server source code S16 1.1 - RaGEZONE Forums

I just realized, server is the first column not the last as metion here

A column is missing in mu_online_game.monster, look at the cycle start index, it starts at index 1, so a column is missing at index 0 in the monster table. I am currently looking for the name of the current column. Fixed this, the mob spawn correctly.



edit:
found, the first column is 'server' instead of the last one. from
 
Junior Spellweaver
Joined
Oct 4, 2007
Messages
173
Reaction score
74
Re: [Release] Legend.mu client &amp;amp;amp;amp; server source code S16 1.1

@Sam3000 monster_template column order is not correct
First row of csv file is column mapping.
Check:
photo_2021-03-14_01-57-28 - [Release] Legend.mu client & server source code S16 1.1 - RaGEZONE Forums

Btw, check my monster_soul_*, but i didnt done reward, dunnno about data.




I just realized, server is the first column not the last as metion here
I added this fixes to my db.
Thx for constraints. Wanter to fill data and after add unique keys and other stuff



ps. why you want to use unique key for settings if you have already PRIMARY KEY (`server_id`,`key`)?
 

Attachments

You must be registered for see attachments list
Skilled Illusionist
Joined
Feb 13, 2004
Messages
351
Reaction score
54
New tables with DATA! from Original Source, thanks!!! mesosa











There are minor changes on the source too maybe need to be compiled again
 
Junior Spellweaver
Joined
Oct 4, 2007
Messages
173
Reaction score
74
Re: [Release] Legend.mu client &amp;amp; server source code S16 1.1

Whoops i miss this, my bad
Do you know where to put AttackType, Attribute and RegenTime from monsters.txt (mudev_s16)?



My monster_template

Skipped AttackType and RegenTime
Added exp column




Testing monster spawn, looking where i can set monster quantity



mu_online_game.monster.type
OBJECT_TYPE_NONE,
OBJECT_TYPE_PLAYER,
OBJECT_TYPE_MONSTER,
OBJECT_TYPE_WORLD_ITEM,



this->SetRespawnLocation((data->GetX1() == data->GetX2() && data->GetY1() == data->GetY2()) ? MONSTER_RESPAWN_NORMAL: MONSTER_RESPAWN_ZONE);
About respawn
 
Last edited:
Newbie Spellweaver
Joined
Nov 2, 2012
Messages
18
Reaction score
9
@Sam3000, mesosa commits some changes, and specifically MonsterManger has changed, are you using the latest commit?

I think you are missing something, the '```model' column refers to the bmd skin of the mob (or the mob itself), with the latest schema/code changes.

For example
id, name, model, ....
0, BullFigther, 3 ....
Is actually a Spider because 3 is the internal id of the bmd or something like that. Currently if I change the model for another id I get a diferent mob for the same row

Currently my monster_template > model === id for every row

update: can confirm that is only the skin, not the actual monster
Because the damage it does is the damage defined for the spider

mesosa - [Release] Legend.mu client & server source code S16 1.1 - RaGEZONE Forums

mesosa - [Release] Legend.mu client & server source code S16 1.1 - RaGEZONE Forums


I am not understanding if it is because of the AttackType that is missing at the moment or if there is some problem with agility, the mob hits me 30 times at the same time
 
Last edited:
Experienced Elementalist
Joined
Oct 31, 2006
Messages
282
Reaction score
82
minimap table is correct?

has how to turn off the / auth system?
 
Last edited:
Back
Top