Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO 2.0]Add Buffer type spell


mmearrccii
 Share

Recommended Posts

  • Replies 63
  • Created
  • Last Reply

Top Posters In This Topic

Not exactly. You know that Transformation Spell tutorial out there? I was going to try and mix it with this, but I wanted to make it so that, for instance:

You transform into a wolf and acquire +X AGI. If I now decide to use a different transformation spell with a different buff, like maybe into a bear with +X STR, I don't want the wolf spell effect to stay active. Yes, I intend for a transformation spell to be permanent until a different one is done to revert the effect or transform into something different.

Thanks in advance for any help. :D
Link to comment
Share on other sites

  • 3 weeks later...
This code is completely wrong. Works fine but is very unstable. When I test it works fine, but when there are more players becomes unstable and crashes the server giving runtime error 9\. If a stat has increased and crashes the server, this stat is permanent. I turn off my game and I'm looking for an alternative.
Link to comment
Share on other sites

I think i said that this code might contains bugs. And insted of just copy and pasting you should try to understand what the code does.

It always adds the bonus permanently to your stats. Yeah that might not be the best way to do this. The stats are only set back if the timer runs out or the player loggs out. So if the server crashes nothing would set it back the way it was. You should set it back with a security check if the server would crash (thats what the ClearBuffs sub does).

Also by crying here that you got an RTE 9 error will help me nothing.  You should debug it, and tell us where did you got that error. I may could help with it. Nobody will or even could fix eníthing if you just say, it's not working.
Link to comment
Share on other sites

  • 1 month later...
Hello I'm a problem when I use the spell debug points me to this line.

```
Player(index).Stat(Stat) = value
```
the server in modPlayer > Public Sub SetPlayerStat

more time nothing happens and does not work

Edit: Deleted from the server and the spells work, does not show the counter buff?
Link to comment
Share on other sites

@chevalier:

> Hello I'm a problem when I use the spell debug points me to this line.
>
> ```
> Player(index).Stat(Stat) = value
> ```
> the server in modPlayer > Public Sub SetPlayerStat
>
> more time nothing happens and does not work
>
> Edit: Deleted from the server and the spells work, does not show the counter buff?

Of course if you delete that line it won't work. I think you inserted the code wrong, since the others got it working. Or you are using a custom verson of Eclipse.

But no matter what you do, the whole system is wrong, it does increase the number of your stats but somewhy it doesn't affects the attacks… I basicly stopped Eclipse but maybe somebody will fix it.
Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
Anyone who is looking to get this tutorial working, i will tell you kind of how i did it.
1\. Follow tutorial and do everything as it says.
2\. Delete the parts that relate to adding or decreasing the stats
3\. Change it so that everything is stored in the temporary buff rec where you can store .Starttime .Used etc
4\. Change any part of your combat etc that relies on the buff
Eg. At the end of the GetDamage mod on server, i added something to say
For 1 to max buffs
If TempBuff(i).Type = 1 (type 1 = attack buff in my case)
then Damage = Damage + TempBuff(i).Vital
End If
Next

I repeated this for the rest of my buff types, this way you have no errors with the stats.
If you use this approach, you will not remember a players buff if they log out, this can easily be changed.
This way will mean that the buffs will apply for set time, and will be removed without fail.

I then looked at the Item Loot Bar and with some very easy tweaks, you can change it so that it shows your TempBuffs.

I dont think i couldve coded a buff system from scratch, whilst this tutorial may not work out of the box, the way in which the creator has set the code to work with the temp buffs allows for very easy fixes. I am not very experienced with this engine and i found it easy to change to a working system using simple logic, it took me one attempt to get the system changed over by simply searching the rest of the project for things like how to pull from the recs etc.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share


×
×
  • Create New...