EOSERV Forum > EOSERV > Ananas Weapon Effect System
Topic is locked.
Page: << 1 2 >>
Ananas Weapon Effect System
Author Message
Post #48453 Ananas Weapon Effect System

EDIT: During the fact that we can't claim our own work. Or deserve the credits for it. I'm forced to remove it. Incase you do want it then contact me. (Don't reply in this topic or don't create a new topic asking for it. Smart people will know how to do it.)


Hello guys and girls!

As I promised. If I did promise..
Here is a tutorial how to add Weapon Effects!
This has been done on my way without the packet_effect, packet_agree.
You're probably thinking, "Why so ananas?". Well..
PACKET_EFFECT, PACKET_AGREE only places an effect on the spot.
So lets say an epic fast monster chases you and you shoot it.
The effect stays on the tile wile the monster moves.
So I made my own function. In NPC.CPP!(And NPC.HPP)
Ok Lets get started.

What do we need?
----------------
You'd need some copy+pasting skills.
Some common sense.


Lets start with npc.cpp.
------------------------
Search for;
-----------

bool NPC::Walk(Direction direction)
{
    return this->map->Walk(this, direction);
}

Place below that;
-----------------

<Code it yourself ^^> Or ask me if you really want it.

Done with npc.cpp!
-----------------------------------------

Go to npc.hpp
-------------

Search for;
-----------

void Die(bool show = true);

Place below that;
-----------------

<Code it yourself ^^> Or ask me if you really want it.

Done with npc.hpp!
------------------

Now.. if you don't got the spells in your server etc. then you would need to add the packets (PACKET_SPELLATT)

Open packet.hpp
---------------

Search for;
-----------

PACKET_BOARD = 43,

Place below that;
-----------------

<Code it yourself ^^> Or ask me if you really want it.

Nice! Done with packet.hpp.


Now! we go to world.cpp.
------------------------

Search for;
-----------
this->home_config.Read(this->config["HomeFile"]);

Place below that;
-----------------
<Code it yourself ^^> Or ask me if you really want it.

Then search at the rehash() for;
----------------
this->home_config.Read(this->config["HomeFile"]);

Place below that;
-----------------
<Code it yourself ^^> Or ask me if you really want it.

Done with world.cpp!
--------------------


Go to world.hpp
----------------

Search for;
-----------
Config home_config;

Add below that;
---------------

<Code it yourself ^^> Or ask me if you really want it.
----------------------

Done with world.hpp.
--------------------

Go to your config.ini and search for;
-------------------------------------
## HomeFile (string)
# Spawn point and innkeeper data
HomeFile = ./data/home.ini

Add below that;
----------------
<Code it yourself ^^> Or ask me if you really want it.

Done with the config.ini!
-------------------------

Now go to your data folder and create an effects.ini

And fill it with the following file;

<Code it yourself ^^> Or ask me if you really want it.

Done!
-----

Now we go to map.cpp
And we search for;
------------------
npc->Damage(from, amount);

Add ABOVE that add;
---------------


<Code it yourself ^^> Or ask me if you really want it.

Now we search for;
------------------
character_ptr->hp -= limitamount;

Add BELOW that;
---------------

<Code it yourself ^^> Or ask me if you really want it.

Done!!!!!!

Enjoy your weapon effects! If I forgot something then please let me know! Errors? Please post below!
No need to make seperated topics.


---
"Pineapples and shit."
13 years, 36 weeks ago
Post #48454 Re: Ananas Weapon Effect System

Okay, this pwns ;P Thanks for sharing this. this might come handy too :P


Edit; I test it right away =)

---
Eoserv classes: Forum ghost, test player, ex-server owner, TOP 50, mapper & an
oldbie
13 years, 36 weeks ago
Post #48455 Re: Ananas Weapon Effect System

Here's an interesting thought, Ananas, Have you thought about making a weapon effect for transferring the enemy HP to your own? =p

---
Web developer, currently looking for graphic artists / designers.
13 years, 36 weeks ago
Post #48459 Re: Ananas Weapon Effect System

Now thats something to look at :] Good idea. If no one else figured it yet then I will release it.

---
"Pineapples and shit."
13 years, 36 weeks ago
Post #48461 Re: Ananas Weapon Effect System
Klutz posted: (5th Sep 2010 05:46 pm)

Here's an interesting thought, Ananas, Have you thought about making a weapon effect for transferring the enemy HP to your own? =p


That's a good idea :)
I might work on this if I have the time.
13 years, 36 weeks ago
Post #48462 Re: Ananas Weapon Effect System

Wow, This is nice, I'll add this right away!


Okay, I get this error C:\Documents and Settings\Owner\Desktop\Rev 189 Compiled\src\handlers\Talk.cpp|1248|error: expected '}' at end of input|


I don't know if this is due to what i've added of yours, I'll see if I can fix this.


EDIT: I don't know if this is my compiler but, when I get those errors ^ It points to the bottom of the page, I was told it's because the newer CodeBlocks Compilers do that.

13 years, 36 weeks ago
Post #48465 Re: Ananas Weapon Effect System
xIFearlessIxx posted: (5th Sep 2010 06:39 pm)

Wow, This is nice, I'll add this right away!


Okay, I get this error C:\Documents and Settings\Owner\Desktop\Rev 189 Compiled\src\handlers\Talk.cpp|1248|error: expected '}' at end of input|


I don't know if this is due to what i've added of yours, I'll see if I can fix this.


When I take a good look at my tutorial I can't find the problem. You could be pasting over a "}" and then deleted it. Do note its in talk.cpp :]
---
"Pineapples and shit."
13 years, 36 weeks ago
Post #48466 Re: Ananas Weapon Effect System

Read my edited post, and yea, I must have not noticed this, when I compiled it before.


EDIT: Yes I fixed it. Missed a  } on mute command.

13 years, 36 weeks ago
Post #48470 Re: Ananas Weapon Effect System

find 

this->hp -= amount;

in npc.cpp and add

opponent->attacker->hp += amount;

see if that works?

---
If money doesn't grow on trees, then why do banks have branches?
13 years, 36 weeks ago
Post #48471 Re: Ananas Weapon Effect System

You would of need the the recover packets etc so just that won't work.

---
"Pineapples and shit."
13 years, 36 weeks ago
Post #48544 Re: Ananas Weapon Effect System

just awesome.. i cant wait for more releases :D

13 years, 35 weeks ago
Post #48545 Re: Ananas Weapon Effect System

Awesome Ananas people should give you a +1.

---
opensource isometric game engine ~ www.avac-engine.blogspot.com
13 years, 35 weeks ago
Post #48582 Re: Ananas Weapon Effect System

1 word Perfect!

tested with both mysql (external) and sqlite


13 years, 35 weeks ago
Post #48610 Re: Ananas Weapon Effect System

Ok i added everything, jus need a point out to where i add the item id, and effect id, pls so i dont mess up anything thx ananas for the release btw

13 years, 35 weeks ago
Post #48753 Re: Ananas Weapon Effect System

thanks this works nicely


13 years, 35 weeks ago
Page: << 1 2 >>
Topic is locked.
EOSERV Forum > EOSERV > Ananas Weapon Effect System