Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #46  
Old 05-19-2009, 09:52 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Is there any reason why the default.pl couldn't be used like I mentioned to make all of the pet stuff work with 1 simple script? I posted an example. Maybe there is something I am not thinking about. Here it is again:

default.pl
Code:
sub EVENT_SPAWN {

#75 Elemental
#209 Earth Elemental
#210 Air Elemental
#211 Water Elemental
#212 Fire Elemental

  if ($race == 75 && $texture != 3 || $race == 209 || $race == 211 || $race == 212)
    quest::echo(15,"You can only summon Air pets here");
    quest::depop();
  }

  if ($race == 75 && $texture == 3 || $race == 210) {
    #set your timer and do the race change stuff
  }

}
Can probably just do similar stuff like that for all scenarios I bet. If needed, I am sure it wouldn't be hard to check to make sure it is a client's pet before depoping or changing it. I dunno if texture is a variable yet or not, but if not, I think "my $texture = $npc->GetTexture();" should work.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 05-20-2009 at 06:00 AM..
Reply With Quote
  #47  
Old 05-19-2009, 10:01 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

because the player burns the mana for casting the pet if you do it that way.
__________________
The Realm
Reply With Quote
  #48  
Old 05-19-2009, 10:21 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Ahh, I see. There is probably a way to correct that (at least most of the way) by using some of the following commands:

GetActSpellCost(spell_id, cost)
CastingSpellID()
GetMana()
GetMaxMana()
SetMana(amount)

But most likely it would take a sub EVENT type to allow what you would be needing to do. A sub EVENT_CASTING would do the trick I think. That and/or a new function that could actually check certain fields of the spell table and get their values would be sweet. Then, you would just check for those type of spells and do an interrupt on them if they are cast. Then, you would just use the new command to do what you were wanting to do in the first place with this line:

Quote:
if(strncmp(spells[spell_id].teleport_zone, "SumAir", 6) != 0)
Accept you would be able to do it with Perl instead and save a lot of hassle.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #49  
Old 05-19-2009, 11:30 PM
Congdar
Developer
 
Join Date: Jul 2007
Location: my own little world
Posts: 751
Default

I think adding the new sub EVENT is the hassle, so I added the spells to the blocked_spells table instead.
__________________
The Realm
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 01:50 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3