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
  #1  
Old 05-20-2019, 06:33 PM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default Workaround for large race bash?

On TLPs, large races that get slam also get 2h bash out of the box. I'm trying to implement this via the global_player.pl file in the connect function but can't get it to fire (I've implemented some custom AAs here that do work but this is the only one race based). Here's the code, cut down to just the pertinent parts:

Code:
sub EVENT_CONNECT {
	# 2her bash 
	if( $race == "Ogre" or $race == "Troll" or $race == "Barbarian" )
	{	$client->GrantAlternateAdvancementAbility(79, 1);
	}

	# class based custom AA
	if( $class == "Warrior" )
	{	$client->GrantAlternateAdvancementAbility(30200, 1);
	}
}
Simply put, the first one doesn't work but the class based one does.

Any ideas? Is it possible the $race global isn't being set and if so, what would be the work around (I tried $client->GetRace( ) on a whim but no-go).
Reply With Quote
  #2  
Old 05-20-2019, 09:13 PM
Uleat's Avatar
Uleat
Developer
 
Join Date: Apr 2012
Location: North Carolina
Posts: 2,815
Default

Try changing your equality operator from
Code:
==
to
Code:
eq
Use eq for strings and == for numbers.
__________________
Uleat of Bertoxxulous

Compilin' Dirty
Reply With Quote
  #3  
Old 05-20-2019, 09:55 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

Things will differ between lua and perl, (for those who need the info), like this little clip example from the Priest of Discord, for the wiz/druid spells.

LUA
Code:
elseif((e.other:Class() == "Wizard" or e.other:Class() == "Druid")
Perl
Code:
elsif(($class eq "Wizard" || $class eq "Druid")
__________________
Hanging out at Antonica.World
Reply With Quote
  #4  
Old 05-20-2019, 10:23 PM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default

Thank gang but still not firing. :(
Code:
	if( $race eq "Ogre" || $race eq "Troll" || $race eq "Barbarian" )
	{	$client->GrantAlternateAdvancementAbility(79, 1);
	}

Update: afte adding in some statements here & there, it turns out there's nothing wrong with the comparison - the AA just won't grant (I get inside the if statement, just the AA doesn't come through). So that's that. Thanks folks.
Reply With Quote
  #5  
Old 05-21-2019, 12:54 AM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

Technically, you don't need a script to assign an AA to specific classes or races. You can do that in the aa_ability table. Set races to 770 for Ogre, Troll and Barbarian. Then in aa_actions table (aaid entrry) set the rank to 0, then whatever reuse time, spell_id and target. In altadv_vars, set cost to 0, max level to 1. In aa_ranks set the cost to 0 and level_req to 1. After that, when an ogre, barbarian or troll login, they will have the option to purchase the AA for 0 cost. (I just tested all this out). I logged in other races and there was no AA for them to purchase.
__________________
Hanging out at Antonica.World
Reply With Quote
  #6  
Old 05-21-2019, 02:02 AM
Xanathol
Sarnak
 
Join Date: Oct 2009
Posts: 52
Default

Thanks I may try that. I'll have to code up a secondary 2 hand bash AA to do it though, since I was hijacking the knight on in my testing. I do like the autogrant btw - that way a user doesn't have to go look for it and buy it. Works well on my custom warrior aggro proc one.
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 07:18 AM.


 

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