EOSERV Forum > EOSERV > Advanced harvesting system (UPDATED LINKS)
Topic is locked.
Page: << 1 >>
Advanced harvesting system (UPDATED LINKS)
Author Message
Post #33986 Advanced harvesting system (UPDATED LINKS)

Info:

My advanced harvesting code. It contains taking hp code, so player can hurt when harvesting.

Usage:

Put tile type 14 on place where you want make harvesting spot.


Usage example:

  • None

Known problems:

  • None

Installation:

  • Go to map.hpp and look for "enum TileSpec". Look there for "Unknown5" and replace it with "HarvestTree".
  • Go to map.hpp and look for "bool Walkable(bool npc = false)". Look there for "case Chest:" under it put "case HarvestTree:".
  • Go to map.hpp and look for "bool Walkable(bool npc = false)". Under the whole code for it put code from "bool Harvestable code" file (in dowload links). Example of good implementation of this code is in "bool Harvestable usage" file.
  • Go to map.hpp and look for "bool Walkable(unsigned char x, unsigned char y, bool npc = false);". Under it put "bool Harvestable(unsigned char x, unsigned char y);".
  • Go to map.cpp and look for the "bool Map::Walkable(unsigned char x, unsigned char y, bool npc)" function. Under it put code from "bool Map::Harvestable code" file (in dowload links). Example of good implementation of this code is in "bool Map::Harvestable usage" file.
  • Go to map.cpp and look for the "void Map::Attack(Character *from, Direction direction)" function. Under the whole code "switch (from->direction)" put code from "Harvesting code" file. Example of good implementation of this code is in "Harvesting code usage" file.
  • Go to world.hpp and look for "Config home_config;" line. Under it put "Config harvesting_config;".
  • Go to world.cpp and look for "this->home_config.Read(this->config["HomeFile"]);" line. Under it put "this->harvesting_config.Read(this->config["HarvestingFile"]);"
  • Compile your source.
  • In config.ini file put somewhwere data from "config.ini values" file.
  • In your data folder make file called harvesting.ini. Put there "harvesting.ini" file contents.
  • Configure your harvesting.ini.
  • Put tile spec 14 on map where you want harvest.


Download links:


Notes:

  • Probably I will add an compiled version and ready source.
  • If I'll be bored I'll make example map for harvesting.
14 years, 8 weeks ago
Post #34007 Re: Advanced harvesting system

i get

 C:\Users\Whitesauce\Desktop\projeck back up\trunk\src\player.hpp||In member function 'void Map::Attack(Character*, Direction)':|

C:\Users\Whitesauce\Desktop\projeck back up\trunk\src\player.hpp|1364|error: 'class Map' has no member named 'Harvestable'|

||=== Build finished: 1 errors, 0 warnings ===|


14 years, 8 weeks ago
Post #34054 Re: Advanced harvesting system

Uhmmm, sorry, I forgot to add some code. I'l fix it today.

Code fixed

14 years, 8 weeks ago
Post #34078 Re: Advanced harvesting system (FIXED)

Thanks worked great.

14 years, 8 weeks ago
Post #34218 Re: Advanced harvesting system (FIXED)

It won't seem to work for me. I keep getting the same error over and over:

C:\Documents and Settings\CJ\Desktop\trunk\src\player.hpp|1440|error: expected unqualified-id before '(' token|

14 years, 7 weeks ago
Post #34227 Re: Advanced harvesting system (FIXED)
Heartworm posted: (13th Mar 2010 01:58 am)

It won't seem to work for me. I keep getting the same error over and over:

C:\Documents and Settings\CJ\Desktop\trunk\src\player.hpp|1440|error: expected unqualified-id before '(' token|


The compileris pointing to wrong error location. I can't help you
14 years, 7 weeks ago
Post #34304 Re: Advanced harvesting system (FIXED)

I completely removed the harvesting code, and I still get the same error..

14 years, 7 weeks ago
Post #34305 Re: Advanced harvesting system (FIXED)

The error means u either added another bracket or it needs 1 more

cuz ive gotten that error to either add another bracket or take 1 off c if that helps

---
Fate-Gaming/Forgotten Memories Owner.
14 years, 7 weeks ago
Post #86715 Re: Advanced harvesting system (UPDATED LINKS)

Nice guide, its compiling now :D
It worked :D
Er but I may have misread something but I am to lazy to go back and check it ;o
Under
SCRIPT_REGISTER_ENUM_VALUE(Unknown4);
There is this:
SCRIPT_REGISTER_ENUM_VALUE(Unknown5);
But I think its suppose to be at this:
SCRIPT_REGISTER_ENUM_VALUE(HarvestTree);

Anyways, I think this is the most detailed guide i've ever seen. Also one of the firsts that worked for me with no errors except a simple one that was a easy fix. :D

12 years, 43 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > EOSERV > Advanced harvesting system (UPDATED LINKS)