EOSERV Forum > EOSERV > Easy Mine/Fishing exp setup
Topic is locked.
Page: << 1 >>
Easy Mine/Fishing exp setup
Author Message
Post #78411 Easy Mine/Fishing exp setup

In character.cpp add this in the load function after `partner`, add 

`mlvl`, `mexp`, `flvl`, `fexp`,

below this->id = this->world->GenerateCharacterID(); add

this->mine = false;
this->fish = false;
this->mlvl = GetRow<int>(row, "mlvl");
this->mexp = GetRow<int>(row, "mexp");
this->flvl = GetRow<int>(row, "flvl");
this->fexp = GetRow<int>(row, "fexp");


then add this in somewhere below doesnt realy matter where

https://tehsausage.com/paste/lvlup


In your save function after `partner` = '$', add

`mlvl` = '#', `mexp` = '#', `flvl` = '#', `fexp` = '#',

A little lower after this->partner.c_str(),  add

this->mlvl, this->mexp, this->flvl, this->fexp, 

Done in character.cpp now go to map.cpp in the void Map::Attack(Character *from, Direction direction) after

if (!this->Walkable(target_x, target_y, true))
  {
   break;
  }

add here

if(from->paperdoll[Character::Weapon] == static_cast<int>(this->world->config["MineWep"]));//225
            {
            if (from->map->GetSpec(target_x, target_y) == Map_Tile::Unknown5 || (from->x == target_x && from->y == target_y))
                {
                    from->mine = true;
                    this->world->FishMine();
                }
            }
         if(from->paperdoll[Character::Weapon] == static_cast<int>(this->world->config["FishWep"]))//520
                {
                  if (from->map->GetSpec(target_x, target_y) == Map_Tile::Water || (from->x == target_x && from->y == target_y))
                   {
                     from->fish = true;
                     this->world->FishMine();
                   }
                }

Done in map.cpp now to world.cpp after void world_timed_save(void *world_void) add

https://tehsausage.com/paste/world-fishmine

find void World::LoadHome() and add this above it

void World::FishMine()
{
TimeEvent *event = new TimeEvent(world_fishmine, this, 1.00, 1);
this->timer.Register(event);
event->Release();
}


Done in world.cpp now go to character.hpp and after bool hidden; add

bool mine, fish;
int mlvl, mexp, flvl, fexp;

then scroll down a bit and after void Warp(short map, unsigned char x, unsigned char y, WarpAnimation animation = WARP_ANIMATION_NONE); add
void LvlUp();

Done in character.hpp now go to world.hpp after void LoadHome(); add
void FishMine();


In talk.cpp in the player commands add

 if (command.length() == 5 && command.compare(0,5,"minfo") == 0)

                {

                this->player->character->ServerMsg("Mining Level: " + util::to_string(this->player->character->mlvl));
                this->player->character->ServerMsg("Mining exp: "+util::to_string(this->player->character->mexp));
   this->player->character->ServerMsg("Fishing Level: " + util::to_string(this->player->character->flvl));
                this->player->character->ServerMsg("Fishing exp: "+util::to_string(this->player->character->fexp));          
 }

Done now for the database setup

name mlvl type Int Length/Set 11 Default 0 check off not null

name mexp type Int Length/Set 11 Default 0 check off not null

name flvl type Int Length/Set 11 Default 0 check off not null

name fexp type Int Length/Set 11 Default 0 check off not null


In your config.ini add where ever

MineWep = 225
MineItem1 = 668
MineItem2 = 400

FishWep = 520
FishItem1 = 475
FishItem2 = 400

Done!




14 years, 5 weeks ago
Post #104654 Re: Easy Mine/Fishing exp setup

I know this is sort of an old topic, but if I put
MineWep = 225
MineItem1 = 668
MineItem2 = 400

FishWep = 520
FishItem1 = 475
FishItem2 = 400

in config.ini how would i determine where they can fish/mine?

---
stay tuned.
13 years, 40 weeks ago
Post #104655 Re: Easy Mine/Fishing exp setup
andrewbob1 posted: (13th Sep 2011, 10:54 pm)

I know this is sort of an old topic, but if I put
MineWep = 225
MineItem1 = 668
MineItem2 = 400

FishWep = 520
FishItem1 = 475
FishItem2 = 400

in config.ini how would i determine where they can fish/mine?


Insomniac may of not finished this guide, I'd suggest doing this guide done by Hollow which works for me. Besides some of this code doesn't look that great :P

Edit: This may be just adding onto another Mining System like Lewis's Mining? I'm not sure though.....
13 years, 40 weeks ago
Post #121342 Re: Easy Mine/Fishing exp setup
lolss posted: (13th Sep 2011, 10:57 pm)

andrewbob1 posted: (13th Sep 2011, 10:54 pm)

I know this is sort of an old topic, but if I put
MineWep = 225
MineItem1 = 668
MineItem2 = 400

FishWep = 520
FishItem1 = 475
FishItem2 = 400

in config.ini how would i determine where they can fish/mine?


Insomniac may of not finished this guide, I'd suggest doing this guide done by Hollow which works for me. Besides some of this code doesn't look that great :P

Edit: This may be just adding onto another Mining System like Lewis's Mining? I'm not sure though.....
Or not I think this is about 50% less code than that one just as effective and the comparison to Lewis ouch... Either way that system done by addison is good to and I like how he used the statskill packet to make it happen!

13 years, 24 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > EOSERV > Easy Mine/Fishing exp setup