EOSERV Forum > EOSERV > map details release
Topic is locked.
Page: << 1 >>
map details release
Author Message
Post #68908 map details release

This tool comes in handy for almost anybody playing your server,type #detail all, tips, or drops. "All" tells map id, tips, and drops on the map for players. "drops" = the n.p.c drops on the map. "tips" anything useful to help players understand the features of the map. You can add more to theconfig as felt needed.

EX:std::string details, tips, drops;

or add more like std::string details, tips, drops, history,map story,map effect;

this will be a simple add in to servers < rev 203  "Im waiting tell sausage finishes updating newer revs before even messing with them"

In Talk.cpp add this with player commands

else if (command.length() >= 6 && command.compare(0,6,"detail") == 0 && arguments.size() >= 1)
       {

           int map = this->player->character->mapid;
           int x = this->player->character->x;
           int y = this->player->character->y;
           int mid; std::string details, tips, drops;

         for(int i = 0 ; i < static_cast<int>(this->server->world->details_config["amount"]) ; i++)
           {
            mid = static_cast<int>(this->server->world->details_config[util::to_string(i+1) + ".map"]);
            details = static_cast<std::string>(this->server->world->details_config[util::to_string(i+1) + ".details"]);
            drops = static_cast<std::string>(this->server->world->details_config[util::to_string(i+1) + ".drops"]);

           if(this->player->character->mapid == mid)
             {
               PacketBuilder builder;
               builder.SetID(PACKET_TALK, PACKET_TELL);
               builder.AddBreakString("modbot");
           if(arguments[0] == "all")
             {
              builder.AddBreakString("your location is" + util::to_string(x) + " , " +  util::to_string(y) + " On map " + util::to_string(map) + ":" + "and here is some info about this map." + details + "The drops on thismapare," + drops);
             }
           else if(arguments[0] == "tips")
             {
              builder.AddBreakString("here is some info about this map." + details);
             }
           else if(arguments[0] == "drops")
             {
              builder.AddBreakString("this maps drops are," + drops);
             }
              this->player->client->SendBuilder(builder);
             }
          }
       }

In world.cpp add this in World::World(util::array<std::string, 6> dbinfo, const Config &eoserv_config, const Config &admin_config) with the rest.

this->details_config.Read(this->config["DetailsFile"]);

In void world::rehash add this

this->details_config.Read(static_cast<std::string>(this->config["DetailsFile"]));

in world.hpp add this with rest thank you

Config details_config

In your config.ini and config.local.ini add this above ## MapDir (string)

## DetailsFile (string)
# Detail of maps
DetailsFile = ./data/details.ini

Then in your data folder create a details.ini with this layout

##Map discriptions

amount = 3

1.map = 2
1.details =This is a harvesting map you need a pick axe to harvest, you can get a pixaxe in Davolger shops!
1.drops = Dragon: wing,claw,gold.  Minion:ash,gold

2.map = 5
2.tips = the dragon has the key
2.drops = Spider:leg,fang,gold.

3.map = 7
3.details = the third door on the north of here
3.drops = Mrs.Pergitory: chains,shank,gold.

13 years, 8 weeks ago
Post #68922 Re: map details release

Haha this is pretty cool I'll be sure to test this later on.!

13 years, 8 weeks ago
Post #68925 Re: map details release
xIFearlessIxx posted: (23rd Mar 2011 10:47 pm)

Haha this is pretty cool I'll be sure to test this later on.!


Seems like your the only one "owell" Thanks bro your awsome love working witha you, looking forward to working on more projects with you!
13 years, 8 weeks ago
Post #68933 Re: map details release
insomniac posted: (23rd Mar 2011 10:54 pm)

xIFearlessIxx posted: (23rd Mar 2011 10:47 pm)

Haha this is pretty cool I'll be sure to test this later on.!


Seems like your the only one "owell" Thanks bro your awsome love working witha you, looking forward to working on more projects with you!
Seems that that way doesn't it. Yeah love it to, i'm sure furture things will be great to. Since you've released so much of your "inventions" I might release my Reborn System when it's done.

13 years, 8 weeks ago
Post #69226 Re: map details release

you forgot to add Config details_config; in world.hpp :)

13 years, 8 weeks ago
Post #69227 Re: map details release
insomniac posted: (23rd Mar 2011 10:54 pm)

xIFearlessIxx posted: (23rd Mar 2011 10:47 pm)

Haha this is pretty cool I'll be sure to test this later on.!


Seems like your the only one "owell" Thanks bro your awsome love working witha you, looking forward to working on more projects with you!

Don't think he's the only one. I didn't even notice this topic so i didn't respond until I noticed it. I think It's a pretty great idea. :) You are always providing us with something, keep it up! :P
---
EO Resources/Guides: â—„ eobud.boards.net â–º
13 years, 8 weeks ago
Post #69476 Re: map details release
shayne posted: (24th Mar 2011 03:21 am)

insomniac posted: (23rd Mar 2011 10:54 pm)

xIFearlessIxx posted: (23rd Mar 2011 10:47 pm)

Haha this is pretty cool I'll be sure to test this later on.!


Seems like your the only one "owell" Thanks bro your awsome love working witha you, looking forward to working on more projects with you!

Don't think he's the only one. I didn't even notice this topic so i didn't respond until I noticed it. I think It's a pretty great idea. :) You are always providing us with something, keep it up! :P
Thanks, I just get kinda bummed out when I post what I think is cool stuff and dont get any feedback.
13 years, 8 weeks ago
Post #69481 Re: map details release
insomniac posted: (23rd Mar 2011 10:54 pm)

xIFearlessIxx posted: (23rd Mar 2011 10:47 pm)

Haha this is pretty cool I'll be sure to test this later on.!


Seems like your the only one "owell" Thanks bro your awsome love working witha you, looking forward to working on more projects with you!

I test everything I find on here, I just don't always remember to give feedback. I'll be testing this later too.
---
Web developer, currently looking for graphic artists / designers.
13 years, 8 weeks ago
Post #69498 Re: map details release
Klutz posted: (24th Mar 2011 09:05 pm)

insomniac posted: (23rd Mar 2011 10:54 pm)

xIFearlessIxx posted: (23rd Mar 2011 10:47 pm)

Haha this is pretty cool I'll be sure to test this later on.!


Seems like your the only one "owell" Thanks bro your awsome love working witha you, looking forward to working on more projects with you!

I test everything I find on here, I just don't always remember to give feedback. I'll be testing this later too.
If you get a chance also test/check these topics out I recently posted these and only got 1 or 2 responses/feedback. I try and do cool stuff for people to add in there servers but also, need help from people more advanced than myself to learn more and make my coding skills better.
https://eoserv.net/forum/topic/12553
https://eoserv.net/forum/topic/12555

also thank you striker for the help on you forgot to add the Config details_config in world.hpp!


13 years, 8 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > EOSERV > map details release