Author | Message | ||||||
---|---|---|---|---|---|---|---|
| ![]() This is something Addison inspired me to do a while back, its an npc type that randomly paralyzes its opponents! This is compiled in a rev 189,and should be fairly easy to add. If it wont compile or I forgot somthing Ill fix it. Theres also a more advanced database option
topreventcharacters from logging out while paralyzed and relogging not paralyzed, but I didnt get into it may add later or upon request! I havnt contributed anything in awhile so here ya go ( :. In character.cpp in Character::Character(std::string name, World *world) find std::tr1::unordered_map<std::string, util::variant> row = res.front(); add below this->poisoned = false; Done in character.cpp go to npc.cpp in void NPC::Act() find Character *attacker = 0; add below PacketBuilder r; https://tehsausage.com/paste/parnpc done in npc.cpp go to world.cpp find void world_timed_save(void *world_void) add above void world_poison(void *world_void) scroll down and find TimeEvent *event = new TimeEvent(world_spawn_npcs, this, 1.0, Timer::FOREVER); add below int p = util::rand(2.0, 20.0); done in world.cpp go to character.hpp find AdminLevel admin; add below bool poisoned; done in npc.cpp go to Internal.cpp find case PACKET_INTERNAL_WARP: // Death warp add below done now just set the npc of your choice in the pub to npc type 8-unknown, right after inn type
|
| ![]() Very nice release as usual insomniac :) i will definatly use this! --- stay tuned.
|
| ![]() so basicly if(poisoned == true) it will freeze my character? it's a nice extra npc type to add if some newbies want alot of npc types. Very useful if you use it on a good way ;]
|
| ![]() Yeah it randomly freezes its opponent! Someone could make a more detailed system off this very easily, a formula to decide how long your paralyzed, a resistance etc, could be added to weapons or tile specs on and on! Also want to know if it compiles for you my rev is altered so much just hoping I altered it correctly! |