Author | Message | ||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ![]() Couldn't find the old topic, lost the link to it. The real string to getting jobs working is where Apollo said it would be in paperdoll.cpp. Use this for now, until I find the right Hex code for the lazy l; reply.AddBreakString("~" + this->server->world->GetHome(character)->name + "¬" + character->job) Credits to: Bart, Apollo Delete the A infront of the lazy l for the code to work --- Create your own destiny, don't let someone else do it for you.
|
| ![]() So how exactly does this work? I haven't looked at the paste bin, an I don't use eoserv so I was just wondering is this some thing like title where it has to be given to you? --- http://www.ctronic.ga http://www.tsu.co/Deltro https://www.reverbnation.com/deltro9
|
| ![]() kodyt posted: (30th Dec 2011, 09:28 pm) You could make a command; $job (name) (job) to set this->player->character->job. Do note you have to have Sordie's EOJobs EO.Addon for this to work. I'm just going to go ahead and tell you, in paperdoll.cpp, look for the string the loads homes for the paperdoll. It should look like the string that i posted, just without the tilde, the lazy l, and the character->job. It's not that hard, just figuring it out in the first place was an ass. --- Create your own destiny, don't let someone else do it for you.
|
| ![]()
|
| ![]() You should use the hex code of the lazy l (0xAC I think) to avoid the character encoding issues. The code would look like this: reply.AddString("~" + reply.addChar(0xAC); reply.AddBreakString(character->job);
|
| ![]() Alright. Apollo just told me to use the lazy l. I'll update the first post. --- Create your own destiny, don't let someone else do it for you.
|
| ![]() Would this also be able without EO addons? Since eo addons is really, really shit.
|
| ![]() Hollow posted: (30th Dec 2011, 09:35 pm) Nope. It's not supported in EOMains client. --- Create your own destiny, don't let someone else do it for you.
|
| ![]() mk, no need to add this than.
|
| ![]() That's your choice, I find this very useful EDIT: 0xAC isn't the code for the lazy l, finding it now. --- Create your own destiny, don't let someone else do it for you.
|
| ![]() paperdoll.cpp I cant find that in eosource. Or is that within eo.addons
|
| ![]() RooRoo posted: (31st Dec 2011, 01:52 am) EOSource is a closed source for some reason.. --- Create your own destiny, don't let someone else do it for you.
|
| ![]() AustinB posted: (31st Dec 2011, 05:22 am)I know, thats what bugs me about it. EOSOURCERooRoo posted: (31st Dec 2011, 01:52 am) --- Andrewbob - I would be on the fucking copter of rofls Programmer, Web Developer, and Graphics Designer
|
| ![]() Good stuff man gave me some interest in my server again so I decided to find the hex codes link for this, add some commands, database and quest stuff Ill post as I make it! I couldnt use the hex value as Bart suggested and make it work. This works in my paperdoll dont get the at the end of your home "compiled in a Rev 189" Remove the "A" looken sucker before you compile reply.AddBreakString("~" + this->server->world->GetHome(character)->name + "ì" + character->job); Talk commands: If you want a player command link, admin command link Quest stuff: In quest.cpp find else if (action->name.compare("addnpcinput") == 0 && action->args.size() != 3) add this under it else if (action->name.compare("setjob") == 0 && action->args.size() != 1) go to character.cpp in bool Character::PerformQuestActions(int id) find else if (action->name.compare("setstate") == 0) { } add this under { std::string njob = (static_cast<std::string>((*action->args[0]))); if(njob.length() > 21) { njob = util::lowercase(njob); njob = njob.substr(0, 21); } this->job = njob; } and in your quest use this action. I cant figure out how to get a 2+word title through quests ) : if you add say pickle farmer it becomes pickle farmer. action SetJob(Farmer); database stuff: in character.cpp in Character::Character(std::string name, World *world) find Database_Result res = this->world->db.Query("SELECT `name`, `job`, this->name = GetRow<std::string>(row, "name"); add this under this->job = GetRow<std::string>(row,"job"); then go way to the bottom in void Character::Save() find this->world->db.Query("UPDATE `characters` SET `title` = '$', `job` = '$', add job how you see it then find this->title.c_str(), add this right beside it this->job.c_str(), Now open your database to create a new table Name = job Type = varchar Length = 32 Null = yes Now Im wondering what would be the best way to implement the jobs in to the game Im thinking of providing each job with a workload and a level. So say you are a level 1 farmer, your workload for the day or "selected time frame" would be harvesting 100 lbs of pickles and pay would be 100 gold.
Implementing a boss will be kinda tough maybe through the quest system or another npc type. Ill try and put together some quest scripts based of your job and job lvl. Also I have a question , what the fuck is up with the "Ã" that keeps appearing thats what threw me off when I started working on this days ago, I thought that "Ã" was part of the code but its not so take it out before you compile. |