EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Spell Support (https://www.eqemulator.org/forums/forumdisplay.php?f=664)
-   -   Perl-Based Dynamic Runes (https://www.eqemulator.org/forums/showthread.php?t=39187)

Hateborne 01-05-2015 11:26 PM

Perl-Based Dynamic Runes
 
Evening Ladies and Gents,

I'm curious if there is a way that one might either dynamically set or dynamically cast a rune. I am looking to allow certain heals to generate short duration runes based off of their healing amount, but I'm somewhat lost on how to begin such a task. I'm sure that I cannot be alone in this. I would also like to not have to make 50 or so spells and cast them that way unless completely and totally necessary. :)


-Hate

ghanja 01-05-2015 11:30 PM

Quote:

Originally Posted by Hateborne (Post 236599)
Evening Ladies and Gents,

I'm curious if there is a way that one might either dynamically set or dynamically cast a rune. I am looking to allow certain heals to generate short duration runes based off of their healing amount, but I'm somewhat lost on how to begin such a task. I'm sure that I cannot be alone in this. I would also like to not have to make 50 or so spells and cast them that way unless completely and totally necessary. :)


-Hate

\global\spells\*.*

sub EVENT_SPELL_EFFECT_CLIENT

ghanja 01-05-2015 11:31 PM

Oh, based on healing amount just read that. Lemme dig a bit.

Hateborne 01-05-2015 11:33 PM

Quote:

Originally Posted by ghanja (Post 236600)
\global\spells\*.*

sub EVENT_SPELL_EFFECT_CLIENT

Yes, but how would one tamper with the effect on a rune or generate the dynamic amount to block/deflect?


-Hate

ghanja 01-05-2015 11:34 PM

Yeah that's right. The script will be called when the spell is casted, the SPELL_EFFECT_CLIENT will be called when it lands.

So, set a variable to $client->GetHP() in the beginning of the script and compare that to the HP in the EVENT_SPELL_EFFECT_CLIENT

I suppose that would work, haven't tried it in practice yet.

ghanja 01-05-2015 11:36 PM

Quote:

Originally Posted by Hateborne (Post 236602)
Yes, but how would one tamper with the effect on a rune or generate the dynamic amount to block/deflect?


-Hate

Not sure if the actual absorption could be adjusted on the fly or not (at least as the source stands). You may be set on doing just that, otherwise, I would just make Rune spells with differing absorption amounts, deciding which to cast on the client based on the amount the spell healed for.

Hateborne 01-05-2015 11:37 PM

Removed as you answered it while typing this up. Pewp.


-Hate

ghanja 01-05-2015 11:41 PM

Quote:

Originally Posted by Hateborne (Post 236605)
Removed as you answered it while typing this up. Pewp.


-Hate

Something like this:

https://github.com/EQEmu/Server/blob...pells.cpp#L145

But, allows one to pass spell category, duration, etc. would be, well, real nice. It -may- exist, I'll dig some more. If it doesn't, *it would be great to have*. :)

Hateborne 01-05-2015 11:50 PM

ghanja,

Thank you for your time in this. I'll harass Akkadius about this as well to see if he has any input as well.


-Hate

ghanja 01-05-2015 11:53 PM

Quote:

Originally Posted by Hateborne (Post 236608)
ghanja,

Thank you for your time in this. I'll harass Akkadius about this as well to see if he has any input as well.


-Hate

I dont mind at all, I'm curious myself. If you find an answer though (a more definitive one) please update the post. I'll be watching it. :)

c0ncrete 01-06-2015 12:14 AM

i've been curious as to how well perl would respond to something like this. you're wanting to set maybe a fraction of the total amount healed (not maximum heal power) as absorption AND base the time it fades on the amount healed as well?

depending on what gets triggered when, i'm guessing you could perhaps have the "rune" itself handled entirely by perl. it wouldn't show up as a normal spell effect icon on the client, but the idea has me interested. :)

ghanja 01-06-2015 12:20 AM

Quote:

Originally Posted by c0ncrete (Post 236611)
i've been curious as to how well perl would respond to something like this. you're wanting to set maybe a fraction of the total amount healed (not maximum heal power) as absorption AND base the time it fades on the amount healed as well?

depending on what gets triggered when, i'm guessing you could perhaps have the "rune" itself handled entirely by perl. it wouldn't show up as a normal spell effect icon on the client, but the idea has me interested. :)

In preliminary digging, displaying a spell icon with the effect itself -may- not be an issue. I may be premature here, though I believe I found something that already exists somewhat similar (as far as giving the appearance that something like this addition would add).

I'd prefer someone far more intimate with the source than I to look though. It is an interesting concept, hopefully if it exists and/or is added would be done just for those pesky LUA guys. :p


All times are GMT -4. The time now is 12:01 AM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.