EOSERV Forum > EOSERV > Timed Stat Boost Items [re-release]
Topic is locked.
Page: << 1 >>
Timed Stat Boost Items [re-release]
Author Message
Post #74256 Timed Stat Boost Items [re-release]

Hello, everybody. I am re-releasing this code because it now reads from pub files.

First 

Go to character.hpp

find 

short karma;

add under it

short boost, tick;

Done with that.

Go to world.cpp

find 

event = new TimeEvent(world_recover, this, 90.0, Timer::FOREVER);

this->timer.Register(event);

event->Release();

add under it

event = new TimeEvent(world_boost, this, 10.0, Timer::FOREVER);

this->timer.Register(event);

event->Release();

find 

void world_act_npcs(void *world_void)

{

World *world(static_cast<World *>(world_void));


double current_time = Timer::GetTime();

UTIL_PTR_VECTOR_FOREACH(world->maps, Map, map)

{

UTIL_PTR_VECTOR_FOREACH(map->npcs, NPC, npc)

{

if (npc->alive && npc->last_act + npc->act_speed < current_time)

{

npc->Act();

}

}

}

}


add under it 



Done with world.cpp

Go to item.cpp

find 

case EIF::Heal
{


done with item.cpp

Goto character.cpp

and follow these instructions


Then add database values

short and tick of the INTEGER type

done with this stuff

How to use:

Open your item file with Pub Edit

Make the items type 3 

Change the str, con, agi, etc values to the numbers you want the potion to boost by

Change the acc to the amount of time you want the potion to last (1 = 10 seconds)


If I forgot anything or something is not working post here. Thanks again.
---
Love you too.
12 years, 51 weeks ago
Post #74627 Re: Timed Stat Boost Items [re-release]

Pretty awesome job!

12 years, 51 weeks ago
Post #74636 Re: Timed Stat Boost Items [re-release]

Thank you! First reply :P

---
Love you too.
12 years, 51 weeks ago
Post #74660 Re: Timed Stat Boost Items [re-release]

I'm sorry, i also tested it out yesterday, works fine ^^ just forgot to reply D:

---
Skype: izumibluuh

I sincerely apologize for my posts from when I was 12.
12 years, 51 weeks ago
Post #76738 Re: Timed Stat Boost Items [re-release]

Right.. The item type is 3 (Potion) but that doesnt allow you to edit str,con ect.. 

12 years, 48 weeks ago
Post #76742 Re: Timed Stat Boost Items [re-release]

Use pub edit instead of edit pub. Don't be so negative jesus :/

---
Love you too.
12 years, 48 weeks ago
Post #77417 Re: Timed Stat Boost Items [re-release]

Im using that bro. And im not negative :o

12 years, 48 weeks ago
Post #77428 Re: Timed Stat Boost Items [re-release]

If your program isnt letting you edit it you are using the wrong one. Using Pub Edit.

It should look like this:http://tinypic.com/r/28b4syd/7

---
Love you too.
12 years, 48 weeks ago
Post #77493 Re: Timed Stat Boost Items [re-release]

Sorry for blaming ur code, My serv was just fucked up but uhh... You didnt say in your release to add: this->boost, this->tick,

If you don't add that your serv will get save problems. so add next to:

this->karma,

This:

this->boost, this->tick,

So it will look like:

this->karma, this->boost, this->tick, this->sitting,


EDIT: Yeah.. I used the wrong one =P normally i only use yours to edit data. but nice code anyways ^^

12 years, 48 weeks ago
Post #87488 Re: Timed Stat Boost Items [re-release]


Hello, I just stumbled to this topic and I was wondering about the DB, would it be `tick` int(11) NOT NULL DEFAULT '0', or am I doing it wrong?

 

12 years, 39 weeks ago
Post #168255 Re: Timed Stat Boost Items [re-release]

hello i am a noob but where can i find these "character.cpp" files and "world.cpp" hpp and all that?

 

Now that I think, is it in the Data?

But how do i open the Data files?

11 years, 23 weeks ago
Post #168261 Re: Timed Stat Boost Items [re-release]
LegendaryG posted: (2nd Nov 2012, 01:49 am)

hello i am a noob but where can i find these "character.cpp" files and "world.cpp" hpp and all that?

 

Now that I think, is it in the Data?

But how do i open the Data files?


You'd better use this one: Click Me. It's made by Ryouken, I suppose it's more advanced than this one.
11 years, 22 weeks ago
Page: << 1 >>
Topic is locked.
EOSERV Forum > EOSERV > Timed Stat Boost Items [re-release]