Author | Message | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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.
|
Re: Timed Stat Boost Items [re-release]
| Pretty awesome job!
|
Re: Timed Stat Boost Items [re-release]
| Thank you! First reply :P --- Love you too.
|
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.
|
Re: Timed Stat Boost Items [re-release]
| Right.. The item type is 3 (Potion) but that doesnt allow you to edit str,con ect..
|
Re: Timed Stat Boost Items [re-release]
| Use pub edit instead of edit pub. Don't be so negative jesus :/ --- Love you too.
|
Re: Timed Stat Boost Items [re-release]
| Im using that bro. And im not negative :o
|
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.
|
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, this->karma, this->boost, this->tick, this->karma, this->boost, this->tick, this->sitting,
|
Re: Timed Stat Boost Items [re-release]
|
|
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?
|
Re: Timed Stat Boost Items [re-release]
| LegendaryG posted: (2nd Nov 2012, 01:49 am) You'd better use this one: Click Me. It's made by Ryouken, I suppose it's more advanced than this one. |