PDA

View Full Version : Long lasting spells


Mortykins
10-12-2015, 08:16 PM
Hi Folks,

Just trying to create a new clicky buff line, and would like the spells to last at least 5 days , is there a way to do this ? Seems like every duration I try to set it won't reach anywhere near that long, almost like the duration formula's themselves are capped.

Mort

demonstar55
10-12-2015, 09:33 PM
Why not just permanent? (formula 50)

AdrianD
10-12-2015, 09:34 PM
Just about to say..

case 50: // Permanent. Cancelled by casting/combat for perm invis, non-lev zones for lev, curing poison/curse
// counters, etc.
return -1;
case 51: // Permanent. Cancelled when out of range of aura.
return -4;

Mortykins
10-13-2015, 01:42 PM
So perma lasts 5 days?

AdrianD
10-13-2015, 02:09 PM
Heh.

Just a suggestion.

I assume you have your reason for wanting it to last a definitive amount of time. I don't know if there is a cap. I saw something possibly related as I was skimming through C++ files related to Bards and 16 hours.

That's as far as I got but, below is where I found the formulas. Maybe a custom formula can be created for your needs.

<int CalcBuffDuration_formula(int level, int formula, int duration)> - \zone\spells.cpp(~2746)

Good day.

demonstar55
10-13-2015, 02:39 PM
So perma lasts 5 days?

No, they last until they are removed somehow. If you really want 5 days just set both to 72000 (5 days in ticks) that will work, but why not just make them perma buffs? You can make these still dispellable, not persistent through death etc, those are controlled by other fields. A perma duration just means it can not fade due to time.


Basically, a buffdurationformula of 1-15, 50, and 51 has some sort of meaning to it. A buffdurationformula greater than 200 will just use the buffdurationformula as the duration. The buffduration is really just a cap that is used with every formula. So you can use a buffdurationformula of 99999999 or something ridiculous and just use a buffduration as what you want the duration to be.

Mortykins
10-13-2015, 03:17 PM
Thanks got it :)

Mortykins
10-21-2015, 11:44 PM
Ok so got it so they last 7 days, however how can i set it so they can't accidentally click them off ? I tried to set the "Deleteable" field to nothing, also put a check into it and they are still able to click them off, any ideas?

atrayas
10-22-2015, 12:36 AM
One thing ive done in the past with long duration buffs is instead of having them go to the spell window i have them go to the song window. Less chance of them being clicked off that way imo.

Mortykins
10-22-2015, 12:41 AM
oh yeah , excellent idea !

(edit) , OK so made them Short Buff Box, put them in song window but when i zone the effect vanishes... How did you go about fixing that ?

demonstar55
10-22-2015, 02:36 AM
I think it's field232? Or no_remove if you ran the optional SQL update.

I think that's mostly a client thing? But we do have the server checking against it too now.

Mortykins
10-22-2015, 07:19 PM
I tried to set that field to like 1, and 0, and -1, but nothing seemed to work