EOSERV Forum > EOSERV > adding AOE guide updated 1/11/11
Topic is locked.
Page: << 1 2 3 4 >>
adding AOE guide updated 1/11/11
Author Message
Post #58030 adding AOE guide updated 1/11/11

This is an adjustable AOE system. I posted this originally  to help gads but i think his topic was to old and died so here it is.

To get Ananas weapon effect system to use for the effects part go here

This is the updated version alot smaller than the original!!


Ok first in map.cpp in void Map::Attack(Character *from, Direction direction)

find

UTIL_PTR_VECTOR_FOREACH(this->npcs, NPC, npc)
            {


add this here


int eff = util::rand(1, 32);// doesnt have to be a random u could give a specific effect id EX: int eff = 5;
      int dmg = util::rand(from->mindam, from->maxdam);
      int dist = util::path_length(target_x, target_y, npc->x, npc->y);

     if ((npc->Data()->type == ENF::Passive || npc->Data()->type == ENF::Aggressive ||
      from->admin > static_cast<int>(this->world->admin_config["killnpcs"])) && npc->alive &&
      dist < 4 && this->world->eif->Get(from->paperdoll[Character::Weapon])->aoe == 1 )
       {

            npc->Damage(from, dmg);

       }

      if ((npc->Data()->type == ENF::Passive || npc->Data()->type == ENF::Aggressive ||
      from->admin > static_cast<int>(this->world->admin_config["killnpcs"])) && npc->alive &&
      dist < 4 && this->world->eif->Get(from->paperdoll[Character::Weapon])->aoe == 2 )
       {
            npc->Effect(from, eff, dmg);// if you dont have ananas effect or dont want effect remove this line
            npc->Damage(from, dmg);
       }


now in eodata.cpp

find

    newdata->chareq = PacketProcessor::Number(buf[51], buf[52]);

add this here

newdata->aoe = PacketProcessor::Number(buf[54]);

in eodata.hpp find

short chareq;

and add this here

unsigned char aoe;

alittle bit lower you will see 

EIF_Data() : id(0), graphic(0), type(EIF::Static), subtype(EIF::None), special(EIF::Normal),
    hp(0), tp(0), mindam(0), maxdam(0), accuracy(0), evade(0), armor(0), str(0), intl(0), wis(0),
    agi(0), con(0), cha(0), light(0), dark(0), earth(0), air(0), water(0), fire(0), scrollmap(0),
    gender(0), scrolly(0), levelreq(0), classreq(0), strreq(0), intreq(0), wisreq(0), agireq(0),
    conreq(0), chareq(0),  aoe(0), weight(0), size(EIF::Size1x1) { }

notice where the  aoe(0),    is and add it to yours

now in your pub editor select your weapon and set your unkE to 1 or 2 on the items you want to have that type of aoe!

You can also adjust the aoe of your weapon by messing with the dist < 4  in map.cpp

13 years, 18 weeks ago
Post #58110 Re: adding AOE guide


Yo inso nice release again

I added u on msn u said ud help meh >.< for pets i mean

---
"With your feet steady and firm on the ground soar high and ignore limitations"  -Bladex
EOSERV Class : Pixel Artist, Grammar Nazi, Server Owner, Mapping Artist, Server Coder, Test Player,
The Game Maker
13 years, 18 weeks ago
Post #58144 Re: adding AOE guide

Anyone think we can crush this more or make a better aoe system out of this lets do it more minds on this will definitely make a better aoe system!


Ill hit you up on msn tomorrow,Thank you Bladex!!

13 years, 18 weeks ago
Post #58147 Re: adding AOE guide

Does the aoe(0) thing replicate how far the aoe stretches??

 

13 years, 18 weeks ago
Post #58159 Re: adding AOE guide

no that is in the map.cpp part  to change distance just

adjust the dist < 4!

13 years, 18 weeks ago
Post #58188 Re: adding AOE guide

can you paste the part. I think I know where it is but I don't wanna f that up. Ans another thing. To compilé code blocks you justclick build right?. 

13 years, 18 weeks ago
Post #58196 Re: adding AOE guide
pastebin
I did this is about 2.3 seconds (not really :D) it still needs a little something to show everyone but if your not stupid you can figure it out ;D
Some credits to Apollo for being sexy ;D
---
i think ur fun to argue with so i want to hold ur hand
13 years, 18 weeks ago
Post #58267 Re: adding AOE guide
Cyber.N1nja posted: (11th Jan 2011 09:37 am)

pastebin
I did this is about 2.3 seconds (not really :D) it still needs a little something to show everyone but if your not stupid you can figure it out ;D
Some credits to Apollo for being sexy ;D

Nice!! Im going to try and combine yours and mine to get optimal result!

13 years, 18 weeks ago
Post #58269 Re: adding AOE guide


ismon. Does yours add effect

 

13 years, 18 weeks ago
Post #58270 Re: adding AOE guide

No but after I combine cyber ninjas and mine it will, Ill probly update in the next few hours


edit: the aoe now set to 2 will have random effects but you need ananas npc effect!

13 years, 18 weeks ago
Post #58305 Re: adding AOE guide updated 1/11/11


is this all around air or just up,down,left,right?

 

13 years, 18 weeks ago
Post #58321 Re: adding AOE guide updated 1/11/11

its all round based on distance!

13 years, 18 weeks ago
Post #58527 Re: adding AOE guide updated 1/11/11

Very nice! works perfect :D

13 years, 18 weeks ago
Post #58615 Re: adding AOE guide updated 1/11/11
insomniac posted: (11th Jan 2011 09:40 pm)

Cyber.N1nja posted: (11th Jan 2011 09:37 am)

pastebin
I did this is about 2.3 seconds (not really :D) it still needs a little something to show everyone but if your not stupid you can figure it out ;D
Some credits to Apollo for being sexy ;D

Nice!! Im going to try and combine yours and mine to get optimal result!



No problem anything i can do to help
---
i think ur fun to argue with so i want to hold ur hand
13 years, 18 weeks ago
Post #58729 Re: adding AOE guide updated 1/11/11

nope i think its finished I used your distance idea, much better  Thanks though

13 years, 18 weeks ago
Page: << 1 2 3 4 >>
Topic is locked.
EOSERV Forum > EOSERV > adding AOE guide updated 1/11/11