Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 03-30-2019, 02:55 AM
Kattamaran.CH
Fire Beetle
 
Join Date: Mar 2013
Location: Switzerland
Posts: 15
Default Buff your players example aint working

Howdy all

So i tryed to implement the scripts for "buff your players" and nothing happens. i am referencing: https://github.com/EQEmu/Server/wiki/Buff-your-Players

Maybe i missinterpret things here. It sais i can simply add the code to global_player.pl:

Code:
sub EVENT_LEVEL_UP {
	#:: Train all disciplines, maximum set to player's level, minimum set to the level prior
	quest::traindiscs($ulevel,$ulevel - 1);
}
what i dont understand when i read this code (as a novice) i kinda interpret that it triggers the quest named "traindiscs". But i dont think i have that quest/script anywhere.
Is that the problem? Do i have to add those quests (train discs, skills, spells) first? If so where do i put them?

And what or where is the trigger for "sub Event_LEVEL_UP"? Do i need to add a trigger somewhere as well?

Thanks guys

EDIT: Im using the windows installer: https://github.com/EQEmu/Server/wiki/Windows-Server
Reply With Quote
  #2  
Old 03-30-2019, 03:13 AM
Kattamaran.CH
Fire Beetle
 
Join Date: Mar 2013
Location: Switzerland
Posts: 15
Default

After further googling around i found out, that the quests should be present within "questmgr.cpp".
Is that a physical file wich should be in the eqemu directory?

Maybe the windows installer comes without it?
Reply With Quote
  #3  
Old 03-30-2019, 09:23 AM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

You just need to add what you're trying to do to the global_player.pl. The subroutine SUB EVENT_LEVEL_UP would trigger anytime a player levels. The example given would train discs on level up.

I've referenced the ones you're probably intersted in:
Code:
quest::scribespells(maxlevel, minlevel) # Scribes all spells up to the specified level.
quest::setallskill(value) # Sets all skills to 'value'.
quest::traindiscs(maxlevel, minlevel) # Trains all disciplines up to the specified level. To train up to any level, use $ulevel as the variable.
From: http://wiki.eqemulator.org/p?Ultimate_Perl_Reference

So your global_player.pl would look something like:

Code:
sub EVENT_LEVEL_UP {
	quest::traindiscs($ulevel,$ulevel - 1);
        quest::scribespells($ulevel,$ulevel -1);
}
I would caution using setallskills cause it raises ALL skills, including tradeskills and resets specializations.
__________________
Clumsy's World: Resurgence [2019-Present]
Clumsy's World 2.0 [2014-2016]
Clumsy's World [2006-2012]
Reply With Quote
  #4  
Old 03-30-2019, 09:36 AM
Kattamaran.CH
Fire Beetle
 
Join Date: Mar 2013
Location: Switzerland
Posts: 15
Default

Hmm your code reflects what i posted without the comment. I can try it again but i dont think it will work.

On a side note, when i use #level command to test it out, it should trigger as well right?
Reply With Quote
  #5  
Old 03-30-2019, 09:45 AM
chrsschb's Avatar
chrsschb
Dragon
 
Join Date: Nov 2008
Location: GA
Posts: 904
Default

Quote:
Originally Posted by Kattamaran.CH View Post
Hmm your code reflects what i posted without the comment. I can try it again but i dont think it will work.

On a side note, when i use #level command to test it out, it should trigger as well right?
Yes, make sure you're reloading quests after making changes to quest files #reloadqst
__________________
Clumsy's World: Resurgence [2019-Present]
Clumsy's World 2.0 [2014-2016]
Clumsy's World [2006-2012]
Reply With Quote
  #6  
Old 03-30-2019, 10:03 AM
Kattamaran.CH
Fire Beetle
 
Join Date: Mar 2013
Location: Switzerland
Posts: 15
Default

This should handle all but trading- and spec skills:

Code:
sub EVENT_LEVEL_UP {
	#:: Set available (non-trade, non-casting specialization) skills to maximum for race/class at current level
	foreach my $skill ( 0 .. 42, 48 .. 54, 70 .. 74 ) {
		next unless $client->CanHaveSkill($skill);
		#:: Create a scalar variable to store each skill's maximum skill level at the player's current level
		my $maxSkill = $client->MaxSkill($skill, $client->GetClass(), $ulevel);
		#:: Check that the player's skill does not already exceed the maximum skill based on level
		next unless $maxSkill > $client->GetRawSkill($skill);
		#:: Set the skill to the maximum
		$client->SetSkill($skill, $maxSkill);
	}
}
Reply With Quote
  #7  
Old 03-31-2019, 07:39 AM
Kattamaran.CH
Fire Beetle
 
Join Date: Mar 2013
Location: Switzerland
Posts: 15
Default

it still doesent work

i tryed your examples and it does not work.
why do i have a global_player.lua file next to the global_player.pl
do i need to add it to the lua one? is maybe perl old and lua is new?

but if i need to add it to the lua one, i guess it might need to be altered to work there?
Reply With Quote
  #8  
Old 03-31-2019, 03:15 PM
Kattamaran.CH
Fire Beetle
 
Join Date: Mar 2013
Location: Switzerland
Posts: 15
Default

Went throu the trouble to add NPCs and add the scripts to them for skills, disc and spell trainer.
That works .. guess it will have to do
Reply With Quote
  #9  
Old 03-31-2019, 04:23 PM
Huppy's Avatar
Huppy
Demi-God
 
Join Date: Oct 2010
Posts: 1,332
Default

Quote:
Originally Posted by Kattamaran.CH View Post
why do i have a global_player.lua file next to the global_player.pl
do i need to add it to the lua one? is maybe perl old and lua is new?
If you have two files in the same quest folder with the same name (one being .lua and other .pl), the .lua script will take priority and be used. global_player.lua would have to be disabled(renamed) for the global_player.pl to be used. This applies to any quest scripts of the same name in the same quest folder. lua is an alternative to perl.
Reply With Quote
  #10  
Old 04-03-2019, 12:55 PM
belvino
Fire Beetle
 
Join Date: Feb 2019
Location: MS
Posts: 25
Default

I found it easier to make the npc version where you just hail and it trains for you. it should be on the same page. the skill on the npc only does the class skills I believe.
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 12:41 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