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 06-09-2009, 05:49 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default Little help with player casting detection

I like to write a player.pl script which would see if player has casted a specific spell.
If player did, the script will check what gender player is, and if male put one illusion on the player, if female put a diffirent illusion on the player.

Any sugestions? =)

PS I have looked at Trev's Illusions script

http://www.eqemulator.net/forums/showthread.php?t=25556

but the script operates of NPC who detects proximity.
I need kind of a trigger which would fire based on players themselves.
Reply With Quote
  #2  
Old 06-09-2009, 06:27 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Though I haven't tried it yet, you should be able to use the new EVENT_CAST for that. It should be something as simple as this:

player.pl
Code:
sub EVENT_CAST {

  if($spell_id == 1000) {

    if($gender == 0) {
      quest::playerrace(95);
    }
    elsif($gender == 1) {
      quest::playerrace(62);
    }
    else{
      # do nothing
    }

  }

}
As I said, I haven't tested this new event yet, but I think this should do exactly what you are wanting. I have been wanting to write some new scripts to use it and test it out, but just haven't had time yet. I am excited to have this as an option now and will definitely be taking advantage of it some time soon
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 06-09-2009, 06:34 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Ah perfect! I rememebered you offered this a while back but I had no idea it was actualy put in. Which Rev it went in?
Reply With Quote
  #4  
Old 06-09-2009, 09:47 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Realityincarnate added it in R605.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #5  
Old 06-10-2009, 12:59 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

Trev, perhaps you could help me with something related

Let say that I want to change race/put illusion on a pet when it spawns liek it was recently done for POSKY, but I want to do this for NPC pets.

Will

sub EVENT_SPAWN
{
quest::npcrace(69);
quest::npctexture(1);
quest::npcsize(4);
}

work for npc controlled pets?

If does I have even tricker question.
I ONLY want to alter race of a pet IF the NPC who summoned it belongs to specific race/class himself.

Can this be done?
Thanks! =)
Reply With Quote
  #6  
Old 06-10-2009, 05:15 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Unless it was finally changed, NPCs still cannot be set to change their race when they spawn. It has to be at least 1 second after they spawn, so you have to start a timer for 1 second when they spawn and have the timer change their race/etc.

As for the thing about the owner's race, I haven't really messed with that stuff much, but Kayen definitely has, lol. I know that quest objects for getting the pet or the pet's owner work, but I don't have any good examples to give you offhand.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #7  
Old 06-10-2009, 08:01 AM
Dibalamin
Hill Giant
 
Join Date: Dec 2007
Posts: 182
Default

I'm pretty sure Congdar fixed this for at least PC pets (PoSky pets I think encouraged the change), I'm not familiar enough with the source to know if this will affect NPC pets as well.
__________________
Retired EMarr
Project1999 Developer
Reply With Quote
Reply


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 04:03 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