EOSERV Forum > EOSERV > Effects
Topic is locked.
Page: << 1 2 >>
Effects
Author Message
Post #37346 Effects

How can you add an effect to an item/a tile?
Like, it displays a certain effect on you, i tried just modifying GFX files but that way the animation stops when you're standing still, Example : I want the terror star to turn under you when you have a certain armor equipped.
And how to display an animation on a tile? Something like the thundershock

14 years, 5 days ago
Post #37348 Re: Effects

Walk.cpp

if(this->player->character->mapid == 5 && this->player->character->x == 5 && this->player->character->y == 5){
this->player-character->Effect(10, true);

}

If you walk over tile x5 y5 in aeven it gives an effect.

---
"Pineapples and shit."
14 years, 5 days ago
Post #37368 Re: Effects

Thanks, but thats not really what i ment. For the armor I meant a continous effect, it just keeps on turning lol
And for the tile effect i just mean you can see it even if you don't walk over it, it's sort of a sign that theres a warp there.

Sorry for being a bit unclear

14 years, 4 days ago
Post #37396 Re: Effects

I believe i may help with teh armour one, but not with the continuous effect on a tile.

for the armour one, add this in, erm, how should i say, character.cpp?


if(this->player->character->paperdoll[Character::Armor] == 200){


this->player->character->Effect(12, true);


}


I do not know if this will work, as i havn't tried it, but yeah.

~Austin

---
Create your own destiny, don't let someone else do it for you.
14 years, 4 days ago
Post #37450 Re: Effects

It's not recommended that you use the "Effect" packet. It's has limitations and is known to cause memory leaks in the client if you use anything other than pot effects.

A better solution would be to use the tile effect packet:
PacketFamily: 31 (Effect)
PacketAction: 5 (Agree)
Int1:         X position
Int1:         Y position
Int2:         Effect ID

Credit for this packet goes to Bart (If I remember correctly XD).

You can also repeat the data within the same packet to send multiple effects at the same time. Just as a matter of interest, this is how I made weather (rain) and flame throwers on the Kalandra test server =D

Rain:


Flamethrowers:







---
http://sordie.co.uk
http://twitter.com/@SordieEO
14 years, 3 days ago
Post #37452 Re: Effects
Sordie posted: (18th May 2010 11:13 pm)


It's not recommended that you use the "Effect" packet. It's has limitations and is known to cause memory leaks in the client if you use anything other than pot effects.

A better solution would be to use the tile effect packet:
PacketFamily: 31 (Effect)
PacketAction: 5 (Agree)
Int1:         X position
Int1:         Y position
Int2:         Effect ID

Credit for this packet goes to Bart (If I remember correctly XD).

You can also repeat the data within the same packet to send multiple effects at the same time. Just as a matter of interest, this is how I made weather (rain) and flame throwers on the Kalandra test server =D

Rain:


Flamethrowers:







Is it possible to do that with Eoserv?
Thats awesome.

14 years, 3 days ago
Post #37454 Re: Effects
microchip posted: (18th May 2010 11:16 pm)

Is it possible to do that with Eoserv?
Thats awesome.


Indeed. That post contains the packet information you need to play effects on any and multiple tiles. All you have to do is alter the ranged attack check to build that packet and send it to all players in range (Assuming you meant the flamethrower) If you mean rain, well that's even easier. Just build a packet that contains all the tiles in view for the the player and send it too them.


---
http://sordie.co.uk
http://twitter.com/@SordieEO
14 years, 3 days ago
Post #37455 Re: Effects

Ok, Sweet. So what feature does Ananas Code do he posted, would I be able to edit that..


 I'm teaching my self Simple C++ so thats why I'm asking.


14 years, 3 days ago
Post #37456 Re: Effects
microchip posted: (18th May 2010 11:24 pm)

Ok, Sweet. So what feature does Ananas Code do he posted, would I be able to edit that..


 I'm teaching my self Simple C++ so thats why I'm asking.



It's a horrible example of the bad programming practice of hard coding values. You should ignore it. All it does is play the thunder effect if someone walks onto square 5,5 on map 5.

You could edit it, but I'd suggest just writing it yourself. Me, personally, I'd add a byte layer to the servers map information that stores various tile effects.




---
http://sordie.co.uk
http://twitter.com/@SordieEO
14 years, 3 days ago
Post #37457 Re: Effects

Mm Figured. I know this sucks but If I just changed all the x.y and made it work on every tile?


Could you give me an example of what yours would look like.

14 years, 3 days ago
Post #37458 Re: Effects
Just remove the "&& this->player->character->x == 5 && this->player->character->y == 5" to make it work for every tile. This is a horrible waste of bandwidth though XD


---
http://sordie.co.uk
http://twitter.com/@SordieEO
14 years, 3 days ago
Post #37462 Re: Effects

So It would like this

if(this->player->character->mapid == 5
{
this->player-character->Effect(10, true);

}

14 years, 3 days ago
Post #37828 Re: Effects

hey sordie about the weather system

i made it too but it lags the client :S sometimes the whole client will shutdown.

how did you make this?

---
opensource isometric game engine ~ www.avac-engine.blogspot.com
13 years, 51 weeks ago
Post #37862 Re: Effects
Sordie posted: (18th May 2010 11:13 pm)


It's not recommended that you use the "Effect" packet. It's has limitations and is known to cause memory leaks in the client if you use anything other than pot effects.

A better solution would be to use the tile effect packet:
PacketFamily: 31 (Effect)
PacketAction: 5 (Agree)
Int1:         X position
Int1:         Y position
Int2:         Effect ID

Credit for this packet goes to Bart (If I remember correctly XD).

You can also repeat the data within the same packet to send multiple effects at the same time. Just as a matter of interest, this is how I made weather (rain) and flame throwers on the Kalandra test server =D

Rain:


Flamethrowers:



I only want to inform, that Int1 is Char and int2 is Short. The most lagging thing in weather is sound. You need to create new effect and use it to make client less laggy.
13 years, 51 weeks ago
Post #37863 Re: Effects

The difference there is the audio isn't called in newly made effect files. If I am not mistaken, the sound effects associated with a spell are hard coded into the client. Sending a small fire effect on a 10x10 would try to play the sound 100 times, but just as easily, you could send the sound once to the client and send the effect to a character in range and be a lot more efficient.

13 years, 51 weeks ago
Page: << 1 2 >>
Topic is locked.
EOSERV Forum > EOSERV > Effects