diff --git a/SQL/luni-2015-11-1.sql b/SQL/luni-2015-11-1.sql new file mode 100644 index 0000000..8def6dd --- /dev/null +++ b/SQL/luni-2015-11-1.sql @@ -0,0 +1,407 @@ +-- phpMyAdmin SQL Dump +-- version 4.3.11 +-- http://www.phpmyadmin.net +-- +-- Host: 127.0.0.1 +-- Erstellungszeit: 14. Sep 2015 um 16:00 +-- Server-Version: 5.6.24 +-- PHP-Version: 5.6.8 + +SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; +SET time_zone = "+00:00"; + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +/*!40101 SET NAMES utf8 */; + +-- +-- Datenbank: `luni` +-- +CREATE DATABASE IF NOT EXISTS `luni` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci; +USE `luni`; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `accounts` +-- + +CREATE TABLE IF NOT EXISTS `accounts` ( + `id` int(10) unsigned NOT NULL, + `name` varchar(35) COLLATE utf8_unicode_ci NOT NULL, + `password` varchar(64) COLLATE utf8_unicode_ci NOT NULL, + `email` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `ip` varchar(32) COLLATE utf8_unicode_ci NOT NULL DEFAULT '127.0.0.1', + `rank` smallint(1) NOT NULL DEFAULT '0', + `numChars` tinyint(4) NOT NULL, + `frontChar` bigint(20) NOT NULL, + `lastLog` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `activeSub` smallint(1) NOT NULL DEFAULT '0', + `subTime` int(32) NOT NULL, + `legoClub` smallint(1) NOT NULL, + `locked` tinyint(4) NOT NULL, + `banned` tinyint(4) NOT NULL, + `loginTries` int(1) NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `characters` +-- + +CREATE TABLE IF NOT EXISTS `characters` ( + `id` bigint(20) unsigned NOT NULL DEFAULT '0', + `accountID` int(10) unsigned NOT NULL, + `objectID` bigint(20) NOT NULL, + `name` varchar(25) COLLATE utf8_unicode_ci NOT NULL, + `unapprovedName` varchar(66) COLLATE utf8_unicode_ci NOT NULL, + `nameRejected` tinyint(4) NOT NULL DEFAULT '0', + `freeToPlay` tinyint(4) NOT NULL DEFAULT '0', + `gmlevel` mediumint(9) NOT NULL DEFAULT '0', + `shirtColor` int(11) NOT NULL DEFAULT '0', + `shirtStyle` int(11) NOT NULL DEFAULT '0', + `pantsColor` int(11) NOT NULL DEFAULT '0', + `hairStyle` int(11) NOT NULL DEFAULT '0', + `hairColor` int(11) NOT NULL DEFAULT '0', + `lh` int(11) NOT NULL DEFAULT '0', + `rh` int(11) NOT NULL DEFAULT '0', + `eyebrows` int(11) NOT NULL DEFAULT '0', + `eyes` int(11) NOT NULL DEFAULT '0', + `mouth` int(11) NOT NULL DEFAULT '0', + `headID` int(11) NOT NULL DEFAULT '0', + `neckID` int(11) NOT NULL DEFAULT '0', + `shirtID` int(11) NOT NULL DEFAULT '0', + `pantsID` int(11) NOT NULL DEFAULT '0', + `leftHandID` int(11) NOT NULL DEFAULT '0', + `rightHandID` int(11) NOT NULL DEFAULT '0', + `faction` tinyint(1) NOT NULL DEFAULT '0', + `worldID` int(11) NOT NULL DEFAULT '0', + `lastZoneId` int(11) NOT NULL, + `mapInstance` int(11) NOT NULL, + `mapClone` int(11) NOT NULL, + `x` double NOT NULL DEFAULT '0', + `y` double NOT NULL DEFAULT '0', + `z` double NOT NULL DEFAULT '0', + `friends` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `bestFriends` varchar(50) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', + `level` int(3) NOT NULL DEFAULT '1', + `uScore` int(32) NOT NULL DEFAULT '0' + `health` int(10) NOT NULL DEFAULT '5' + `maxHealth` float NOT NULL DEFAULT '5.0' +) ENGINE=MyISAM AUTO_INCREMENT=1152921504606847024 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `equipment` +-- + +CREATE TABLE IF NOT EXISTS `equipment` ( + `id` int(11) NOT NULL, + `owner` bigint(20) NOT NULL COMMENT 'objid of equiping player', + `object` bigint(20) NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=1236 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `friends` +-- + +CREATE TABLE IF NOT EXISTS `friends` ( + `id` int(11) NOT NULL, + `charida` bigint(20) NOT NULL, + `charidb` bigint(20) NOT NULL, + `status` enum('REQUEST','ACCEPTED','DECLINED','FRIENDS','BEST_FRIEND_REQUEST','BEST_FRIENDS') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'REQUEST' +) ENGINE=MyISAM AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `instances` +-- + +CREATE TABLE IF NOT EXISTS `instances` ( + `instanceid` int(11) NOT NULL, + `server_address` varchar(22) NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `inventory` +-- + +CREATE TABLE IF NOT EXISTS `inventory` ( + `id` int(11) NOT NULL, + `owner` bigint(64) NOT NULL, + `object` bigint(64) NOT NULL, + `qnt` smallint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'quantity', + `slot` smallint(3) unsigned NOT NULL COMMENT 'bag slot', + `linked` tinyint(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM AUTO_INCREMENT=257 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `mails` +-- + +CREATE TABLE IF NOT EXISTS `mails` ( + `id` bigint(20) NOT NULL, + `subject` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `text` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `sender` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL, + `recipient_id` bigint(20) NOT NULL, + `attachment` bigint(20) NOT NULL DEFAULT '0', + `attachment_count` int(11) NOT NULL DEFAULT '0', + `sent_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `is_read` tinyint(1) NOT NULL DEFAULT '0' +) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `missions` +-- + +CREATE TABLE IF NOT EXISTS `missions` ( + `id` bigint(20) NOT NULL, + `character` bigint(20) NOT NULL COMMENT 'Character ObjectID', + `missionid` int(11) NOT NULL, + `time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `count` smallint(6) NOT NULL DEFAULT '1' +) ENGINE=MyISAM AUTO_INCREMENT=13 DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `npcs` +-- + +CREATE TABLE IF NOT EXISTS `npcs` ( + `id` int(10) unsigned NOT NULL, + `name` varchar(30) COLLATE utf8_unicode_ci NOT NULL, + `world` int(10) unsigned NOT NULL, + `x` double NOT NULL, + `y` double NOT NULL, + `z` double NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `objects` +-- + +CREATE TABLE IF NOT EXISTS `objects` ( + `objectid` bigint(64) NOT NULL, + `template` int(32) unsigned NOT NULL COMMENT 'LOT', + `spawnid` bigint(20) DEFAULT NULL COMMENT 'objectID of in-world object', + `nose_cone_template` int(11) DEFAULT NULL COMMENT '(for LOT 6416)', + `cockpit_template` int(11) DEFAULT NULL COMMENT '(for LOT 6416)', + `engine_template` int(11) DEFAULT NULL COMMENT '(for LOT 6416)' +) ENGINE=MyISAM AUTO_INCREMENT=1152921510794155124 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `sessions` +-- + +CREATE TABLE IF NOT EXISTS `sessions` ( + `sessionid` int(20) NOT NULL, + `ipaddress` varchar(21) NOT NULL DEFAULT '', + `phase` smallint(6) NOT NULL DEFAULT '1' COMMENT '1 = CONNECTED, 2 = AUTHENTIFIED, 3 = PLAYING, 4 = INWORLD', + `sessionkey` varchar(33) NOT NULL DEFAULT '', + `instanceid` int(11) DEFAULT NULL, + `accountid` int(10) unsigned NOT NULL DEFAULT '0', + `login_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + `charid` bigint(20) DEFAULT NULL, + `zoneid` int(11) NOT NULL DEFAULT '0', + `cloneid` int(10) unsigned NOT NULL DEFAULT '0' +) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `topics` +-- + +CREATE TABLE IF NOT EXISTS `topics` ( + `id` int(11) NOT NULL, + `name` varchar(128) COLLATE utf8_unicode_ci NOT NULL +) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- -------------------------------------------------------- + +-- +-- Tabellenstruktur für Tabelle `worlds` +-- + +CREATE TABLE IF NOT EXISTS `worlds` ( + `id` int(50) unsigned NOT NULL, + `zone` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'the zone, 0 avant gardens etc', + `owner` int(5) NOT NULL, + `name` varchar(35) COLLATE utf8_unicode_ci NOT NULL, + `desc` text COLLATE utf8_unicode_ci NOT NULL COMMENT 'description', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0 need to be cleaned, 1: private, 2: friends, 3: public' +) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; + +-- +-- Indizes der exportierten Tabellen +-- + +-- +-- Indizes für die Tabelle `accounts` +-- +ALTER TABLE `accounts` + ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `name` (`name`); + +-- +-- Indizes für die Tabelle `characters` +-- +ALTER TABLE `characters` + ADD PRIMARY KEY (`objectID`); + +-- +-- Indizes für die Tabelle `equipment` +-- +ALTER TABLE `equipment` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `friends` +-- +ALTER TABLE `friends` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `instances` +-- +ALTER TABLE `instances` + ADD PRIMARY KEY (`instanceid`); + +-- +-- Indizes für die Tabelle `inventory` +-- +ALTER TABLE `inventory` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `mails` +-- +ALTER TABLE `mails` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `missions` +-- +ALTER TABLE `missions` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `npcs` +-- +ALTER TABLE `npcs` + ADD PRIMARY KEY (`id`); + +-- +-- Indizes für die Tabelle `objects` +-- +ALTER TABLE `objects` + ADD PRIMARY KEY (`objectid`), ADD KEY `objectid` (`objectid`), ADD KEY `objectid_2` (`objectid`); + +-- +-- Indizes für die Tabelle `sessions` +-- +ALTER TABLE `sessions` + ADD PRIMARY KEY (`sessionid`); + +-- +-- Indizes für die Tabelle `topics` +-- +ALTER TABLE `topics` + ADD PRIMARY KEY (`id`), ADD UNIQUE KEY `name` (`name`); + +-- +-- Indizes für die Tabelle `worlds` +-- +ALTER TABLE `worlds` + ADD PRIMARY KEY (`id`); + +-- +-- AUTO_INCREMENT für exportierte Tabellen +-- + +-- +-- AUTO_INCREMENT für Tabelle `accounts` +-- +ALTER TABLE `accounts` + MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=27; +-- +-- AUTO_INCREMENT für Tabelle `characters` +-- +ALTER TABLE `characters` + MODIFY `objectID` bigint(20) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1152921504606847024; +-- +-- AUTO_INCREMENT für Tabelle `equipment` +-- +ALTER TABLE `equipment` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1236; +-- +-- AUTO_INCREMENT für Tabelle `friends` +-- +ALTER TABLE `friends` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=34; +-- +-- AUTO_INCREMENT für Tabelle `instances` +-- +ALTER TABLE `instances` + MODIFY `instanceid` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3; +-- +-- AUTO_INCREMENT für Tabelle `inventory` +-- +ALTER TABLE `inventory` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=257; +-- +-- AUTO_INCREMENT für Tabelle `mails` +-- +ALTER TABLE `mails` + MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=37; +-- +-- AUTO_INCREMENT für Tabelle `missions` +-- +ALTER TABLE `missions` + MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=13; +-- +-- AUTO_INCREMENT für Tabelle `npcs` +-- +ALTER TABLE `npcs` + MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT; +-- +-- AUTO_INCREMENT für Tabelle `objects` +-- +ALTER TABLE `objects` + MODIFY `objectid` bigint(64) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=1152921510794155124; +-- +-- AUTO_INCREMENT für Tabelle `sessions` +-- +ALTER TABLE `sessions` + MODIFY `sessionid` int(20) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11; +-- +-- AUTO_INCREMENT für Tabelle `topics` +-- +ALTER TABLE `topics` + MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6; +-- +-- AUTO_INCREMENT für Tabelle `worlds` +-- +ALTER TABLE `worlds` + MODIFY `id` int(50) unsigned NOT NULL AUTO_INCREMENT; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/Source/CharactersDB.cpp b/Source/CharactersDB.cpp index cebecb8..67a503e 100644 --- a/Source/CharactersDB.cpp +++ b/Source/CharactersDB.cpp @@ -65,7 +65,7 @@ ListCharacterInfo CharactersTable::getCharacterInfo(long long objid){ qrs << "SELECT "; qrs << "`accountID`, `objectID`, `name`, `unapprovedName`, `nameRejected`, `freeToPlay`, `gmlevel`, "; qrs << "`shirtColor`, `shirtStyle`, `pantsColor`, `hairStyle`, `hairColor`, `lh`, `rh`, `eyebrows`, `eyes`, `mouth`, "; - qrs << "`lastZoneId`, `mapInstance`, `mapClone`, `x`, `y`, `z` "; + qrs << "`lastZoneId`, `mapInstance`, `mapClone`, `x`, `y`, `z`, `level`, `uScore`, `health`, `maxHealth` "; qrs << "FROM `characters` WHERE `objectID` = '" << std::to_string(objid) << "';"; std::string qrss = qrs.str(); auto qr = Database::Query(qrss); @@ -81,7 +81,7 @@ ListCharacterInfo CharactersTable::getCharacterInfo(std::string name){ qrs << "SELECT "; qrs << "`accountID`, `objectID`, `name`, `unapprovedName`, `nameRejected`, `freeToPlay`, `gmlevel`, "; qrs << "`shirtColor`, `shirtStyle`, `pantsColor`, `hairStyle`, `hairColor`, `lh`, `rh`, `eyebrows`, `eyes`, `mouth`, "; - qrs << "`lastZoneId`, `mapInstance`, `mapClone`, `x`, `y`, `z` "; + qrs << "`lastZoneId`, `mapInstance`, `mapClone`, `x`, `y`, `z`, `level`, `uScore`, `health`, `maxHealth` "; qrs << "FROM `characters` WHERE `name` = '" << name << "';"; std::string qrss = qrs.str(); auto qr = Database::Query(qrss); @@ -104,6 +104,10 @@ ListCharacterInfo CharactersTable::getCharacterInfo(MYSQL_RES *res){ if (std::stoi(r[4]) == 1) i.info.nameRejected = true; if (std::stoi(r[5]) == 1) i.info.isFreeToPlay = true; i.info.gmlevel = std::stoi(r[6]); + i.info.level = std::stoul(r[23]); + i.info.uScore = std::stoll(r[24]); + i.info.health = std::stoul(r[25]); + i.info.maxHealth = std::stof(r[26]); //Style i.style.shirtColor = std::stoul(r[7]); i.style.shirtStyle = std::stoul(r[8]); @@ -216,6 +220,20 @@ void CharactersTable::mapTable(std::unordered_map 0){ + auto r = mysql_fetch_row(qr1); + auto level = std::stoi(r[0]) + 1; + Database::Query("UPDATE `characters` SET `level` = '" + std::to_string(level) + "' WHERE `objectId` = '" + std::to_string(objectId) + "';"); + } + else{ + Logger::log("DBT", "CHAR", "Unable to Level Up Char: " + std::to_string(objectId), LOG_ERROR); + } } void FriendsTable::requestFriend(long long sender, long long reciever){ diff --git a/Source/CharactersDB.h b/Source/CharactersDB.h index 1e46da2..50ec943 100644 --- a/Source/CharactersDB.h +++ b/Source/CharactersDB.h @@ -38,6 +38,10 @@ struct CharacterInfo{ std::string unapprovedName; bool nameRejected = false; bool isFreeToPlay = false; + unsigned int level = 1; + long long uScore = 0; + unsigned int health = 5; + float maxHealth = 5.0F; }; struct ListCharacterInfo{ @@ -62,6 +66,7 @@ class CharactersTable : public MySQLTable{ static long long add(CharacterStyle style, unsigned int accountid, CharacterInfo names); static bool unapprovedNameExists(std::string unapprovedname); static void setGMlevel(long long objid, unsigned short newLevel); + static void levelUp(long long objectId); std::string getName(); void mapTable(std::unordered_map *> * data); diff --git a/Source/Common/Utility/Config.cpp b/Source/Common/Utility/Config.cpp index e904304..9b6b44b 100644 --- a/Source/Common/Utility/Config.cpp +++ b/Source/Common/Utility/Config.cpp @@ -67,10 +67,18 @@ MySQLSettings Configuration::getMySQLSettings(){ void Configuration::setServerSettings(CONNECT_INFO& connection, Settings& settings, std::string& name){ IniSection * AuthConfig = this->ini->getSection(name); - + IniSection * WorldConfig = this-> ini->getSection(name); + int listen_port; + int redirect_port; //This config option is actually useless, since the client ALWAYS connects to port 1001 initially - int listen_port = AuthConfig->getIntValue("listen_port", 1001); - int redirect_port = AuthConfig->getIntValue("redirect_port", 2002); + if (name == "World"){ + listen_port = WorldConfig->getIntValue("listen_port", 2002); + redirect_port = WorldConfig->getIntValue("redirect_port", 2004); + } + else{ + listen_port = AuthConfig->getIntValue("listen_port", 1001); + redirect_port = AuthConfig->getIntValue("redirect_port", 2002); + } connection.listenPort = listen_port; connection.redirectPort = redirect_port; diff --git a/Source/WorldConnection.cpp b/Source/WorldConnection.cpp index b18873e..39ac65f 100644 --- a/Source/WorldConnection.cpp +++ b/Source/WorldConnection.cpp @@ -161,7 +161,7 @@ void WorldServerPackets::CreateCharacter(SystemAddress address, long long charob writeRaw(xml, "\">"); std::stringstream adddata; adddata << ""; writeRaw(xml, adddata.str()); writeRaw(xml, ""); diff --git a/Source/WorldLoop.cpp b/Source/WorldLoop.cpp index 7cfcf31..e19460f 100644 --- a/Source/WorldLoop.cpp +++ b/Source/WorldLoop.cpp @@ -1043,7 +1043,7 @@ void parsePacket(RakPeerInterface* rakServer, SystemAddress &systemAddress, RakN } case 1734: //Level UP - + CharactersTable::levelUp(objid); break; default: Logger::log("WRLD", "GAMEMESSAGE", "Unknown Game Message: " + std::to_string(msgid)); @@ -1122,11 +1122,11 @@ void parsePacket(RakPeerInterface* rakServer, SystemAddress &systemAddress, RakN c1->setPosition(pos); CharacterComponent * c4 = player->getComponent4(); - c4->setLevel(6); + c4->setLevel(cinfo.info.level); PLAYER_INFO pi; pi.accountID = s.accountid; pi.isFreeToPlay = cinfo.info.isFreeToPlay; - pi.legoScore = 600; + pi.legoScore = cinfo.info.uScore; c4->setInfo(pi); PLAYER_STYLE ps; ps.eyebrowsStyle = cinfo.style.eyebrows; @@ -1140,9 +1140,9 @@ void parsePacket(RakPeerInterface* rakServer, SystemAddress &systemAddress, RakN DestructibleComponent * c7 = player->getComponent7(); COMPONENT7_DATA4 d4 = c7->getData4(); - d4.health = 5; - d4.maxHealthN = 5.0F; - d4.maxHealth = 5.0F; + d4.health = cinfo.info.health; + d4.maxHealthN = cinfo.info.maxHealth; + d4.maxHealth = cinfo.info.maxHealth; c7->setData4(d4); InventoryComponent * c17 = player->getComponent17(); diff --git a/Start/start.bat b/Start/start.bat new file mode 100644 index 0000000..d1f6cee --- /dev/null +++ b/Start/start.bat @@ -0,0 +1,2 @@ +@echo off +LUNIServer.exe --world \ No newline at end of file diff --git a/Start/start1.bat b/Start/start1.bat new file mode 100644 index 0000000..6c76888 --- /dev/null +++ b/Start/start1.bat @@ -0,0 +1,2 @@ +@echo off +LUNIServer.exe --auth \ No newline at end of file diff --git a/readme.md b/readme.md index 2670d39..0d3af6b 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -# LUNI +# LUNI ## Setup Instructions You should be familiar with the setup of LUNI before working with this repository. @@ -17,7 +17,11 @@ You should be familiar with the setup of LUNI before working with this repositor 5. When Login, Character Creation and World loading succeded, wou will notice to be in Venture Explorer without being able to move or see your character. This is actually the correct behaviour. - The game has a mission at the beginning to press shift to "wake up", which is not implemented yet. - So for the time being please use /tp to get to another world or try adding mission 1727 to the missions table to have that mission already done - +## To Open The Server +1. Rename "LUNI Server.exe" to "LUNIServer.exe" +2. Copy "start.bat" and "start1.bat" to Debug Folder +3. Execute "start.bat" +4. Execute "start1.bat" ## Reporting Bugs Please report any bugs that you may encounter here in the issues tracker. Please check any existing issues first if it has already been reported.