View Full Version : Perl-Based Dynamic Runes
Hateborne
01-05-2015, 11:26 PM
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
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
\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
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
Removed as you answered it while typing this up. Pewp.
-Hate
Something like this:
https://github.com/EQEmu/Server/blob/master/zone/spells.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
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
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
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.