Get sitting state inside a spell script?
I've been working on the Yaulp V spell. It's supposed to fade on sitting, but the current code seems to only check against that during the first tick of the buff. Then the cleric can sit and the buff remains.
My first thought was just to throw a timer in when the spell hits, and check it over and over for sit state and whether the buff is on the character. If it is, drop it. The issue with that is, as I know now, that the spell quests don't seem to have access to the same functions - $client->IsSitting() in this case. Does that sound about right? Is there any way at all the spell scripts can ascertain the sitting state of the client? Thanks! |
It's a spell not a client script.
You'll want to get the mob entity (client in this case) using $caster_id so think Code:
my $client = $entitylist->GetClientByID($caster_id); The screwiness may come because of the EVENT_TIMER sub. Quote:
|
Well, even checking/removing on buff tic would be way more than there is currently.
|
It's been a long while, but since I never posted how I actually did this, I figure it might be a good time to do that. :)
Here's the solution I came up with. Basically it runs a timer all the time for the PAL/CLR class and clears the Yaulp buffs (by ID) when those classes sit. It's probably not real efficient, but it does work. In quests/global/global_player.pl Code:
sub EVENT_ENTERZONE { |
Better yet, remove the quest code since I fixed this.
|
Got a link to details anywhere in particular?
|
|
All times are GMT -4. The time now is 03:01 PM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.