Go Back   EQEmulator Home > EQEmulator Forums > Quests > Quests::Q&A

Quests::Q&A This is the quest support section

Reply
 
Thread Tools Display Modes
  #1  
Old 01-01-2016, 07:43 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default 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!
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #2  
Old 01-01-2016, 08:53 PM
ghanja's Avatar
ghanja
Dragon
 
Join Date: Aug 2012
Location: Hershey, PA
Posts: 499
Default

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);
Then $client->IsSitting() may be available.

The screwiness may come because of the EVENT_TIMER sub.


Quote:
Originally Posted by N0ctrnl View Post
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!
Reply With Quote
  #3  
Old 01-01-2016, 09:16 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

Well, even checking/removing on buff tic would be way more than there is currently.
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #4  
Old 01-15-2018, 05:16 AM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

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 {
  if($class eq "Cleric" || $class eq "Paladin") {
    quest::settimer("yaulp",2);
  }
}

sub EVENT_TIMER {
  if ($timer eq "yaulp") {
    quest::stoptimer("yaulp");
    if ($client->IsSitting() && ($client->FindBuff(3186) || $client->FindBuff(2326) || $client->FindBuff(1534) || $client->FindBuff(210) || $client->FindBuff(44) || $client->FindBuff(43))) {
      $client->BuffFadeBySpellID(3186);
      $client->BuffFadeBySpellID(2326);
      $client->BuffFadeBySpellID(1534);
      $client->BuffFadeBySpellID(210);
      $client->BuffFadeBySpellID(44);
      $client->BuffFadeBySpellID(43);
    }
    quest::settimer("yaulp",1);
  }
}
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
  #5  
Old 01-15-2018, 02:53 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

Better yet, remove the quest code since I fixed this.
Reply With Quote
  #6  
Old 01-15-2018, 03:07 PM
N0ctrnl's Avatar
N0ctrnl
Discordant
 
Join Date: Jan 2007
Posts: 443
Default

Got a link to details anywhere in particular?
__________________
Ender - Lead GM/Developer
Vegarlson Asylum Server - http://www.vegarlson-server.org/
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 05:49 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3