Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

Reply
 
Thread Tools Display Modes
  #1  
Old 08-15-2018, 05:01 PM
GreenManalishi
Fire Beetle
 
Join Date: May 2018
Posts: 27
Default Give another class's spell to a character?

So say I am a Mage and I want to give myself Snare, is that hard to do? I can edit the db and I can find character_spells, but not sure what to do from there.
Reply With Quote
  #2  
Old 08-15-2018, 05:54 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

It is pretty easily, actually.

First of all, I'd recommend trying to edit it in EOC (on the homepage under resources). It gives a nice GUI that makes editing basically everything much easier.

If you want to modify it in the database yourself, find the spell id that you want to modify in spells_new and set the classes column for the class you want to give the spell to the level you want them to obtain it. So, if you want to give a mage a spell at level 5, set classes13 to 5 in spells_new for that spell id.

That will allow mages to use that spell on the server. You will likely have to update your client's spells_us file as well so that the client is aware of the change. I believe there are scripts to export that already.

Finally, if you're planning on using scrolls to learn spells, I believe you may have to edit the scroll to allow it to be usable by mages as well.
Reply With Quote
  #3  
Old 08-15-2018, 10:24 PM
GreenManalishi
Fire Beetle
 
Join Date: May 2018
Posts: 27
Default

Thanks that helps a lot! Never even heard of that EOC, sounds promising. I would like to do more than just add a spell, I'd like to add more spell gems and make a custom class basically, but this is the first step
Reply With Quote
  #4  
Old 08-16-2018, 12:01 AM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

auto giving players mnemonic retention on their first login on event connect is a good way to do your spell gem idea
Reply With Quote
  #5  
Old 08-16-2018, 12:06 AM
GreenManalishi
Fire Beetle
 
Join Date: May 2018
Posts: 27
Default

Thanks! I was trying to work out how to do that so went the mnemonic retention route too. I just couldn't figure out how to give it for free I tried to copy Origin but it wasn't working. I managed to give myself a new spell though Editting the DB was easy, but I had to trial and error the spells_us file which took a while. Also once I finally got it in the book, then memmed, and finally able to be cast, it crashed the game But I'll figure it out, I am gonna set up that EOC because it sounds far better. This is fun!
Reply With Quote
  #6  
Old 08-16-2018, 01:24 AM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

I'll post the code for you when I get off work in a few hours
Reply With Quote
  #7  
Old 08-16-2018, 01:40 PM
Slaymore
Fire Beetle
 
Join Date: Nov 2007
Posts: 21
Default

Hi, GreenManalishi.
I was playing around with this idea as well. Check out this post.
http://www.eqemulator.org/forums/showthread.php?t=40603
It will set the classes() to have the spell set for all to the level that a class can first get the spell. For example cleric cHeal at 39 would be available to all classes at 39. I was unable to get to to work but was unaware about modifying the spell_us file. I will try again with that information.

Splose,
I am also interesting in that code for the extra spell slot, thanks in advance.
Reply With Quote
  #8  
Old 08-16-2018, 05:23 PM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

Depending on how many spell gems you want to give.

quests/global/global_player.pl
Code:
sub EVENT_CONNECT {
	if(!defined($qglobals{"SpellGem"}) {
		$client->IncrementAA(1071);	#:: Mnemonic Retention Rk. I
		#$client->IncrementAA(4764);	#:: Mnemonic Retention RK. II
		#$client->IncrementAA(7553);	#:: Mnemonic Retention RK. III
		#$client->IncrementAA(7681);	#:: Mnemonic Retention RK. IV
		$client->SetGlobal("SpellGem", 1, 5, "F");
	}
}
Reply With Quote
  #9  
Old 08-17-2018, 01:04 AM
Slaymore
Fire Beetle
 
Join Date: Nov 2007
Posts: 21
Default

Thanks, Splose.
I think I get the first part, what does this
$client->SetGlobal("SpellGem", 1, 5, "F");
do? at level 1, 5 and 15?
Reply With Quote
  #10  
Old 08-17-2018, 04:24 AM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

Quote:
Originally Posted by Slaymore View Post
Thanks, Splose.
I think I get the first part, what does this
$client->SetGlobal("SpellGem", 1, 5, "F");
do? at level 1, 5 and 15?
This puts a flag on your character so this code only runs once for players who do not have the flag.
Reply With Quote
  #11  
Old 08-17-2018, 10:28 AM
GreenManalishi
Fire Beetle
 
Join Date: May 2018
Posts: 27
Default

Thanks! That helps a lot.
Reply With Quote
  #12  
Old 08-20-2018, 03:35 AM
GreenManalishi
Fire Beetle
 
Join Date: May 2018
Posts: 27
Default

Quote:
Originally Posted by Splose View Post
quests/global/global_player.pl
Code:
sub EVENT_CONNECT {
	if(!defined($qglobals{"SpellGem"}) {
		$client->IncrementAA(1071);	#:: Mnemonic Retention Rk. I
		#$client->IncrementAA(4764);	#:: Mnemonic Retention RK. II
		#$client->IncrementAA(7553);	#:: Mnemonic Retention RK. III
		#$client->IncrementAA(7681);	#:: Mnemonic Retention RK. IV
		$client->SetGlobal("SpellGem", 1, 5, "F");
	}
}
Got the spell part working, it is fun But I can't manage to give myself any new spell slots, I wonder if it is because I am low level. I tried editing level requirement and lots of stuff but still couldn't get it to work. I tried making the mneominc retention free and lots of stuff but nada. Also I am not sure where to put the code from above. Here is my (default) sub event, do I put it inside this?

Code:
sub EVENT_CONNECT {
    # the main key is the ID of the AA
    # the first set is the age required in seconds
    # the second is if to ignore the age and grant anyways live test server style
    # the third is enabled
    my %vet_aa = (
        481 => [31536000, 1, 1], ## Lesson of the Devote 1 yr
        482 => [63072000, 1, 1], ## Infusion of the Faithful 2 yr
        483 => [94608000, 1, 1], ## Chaotic Jester 3 yr
        484 => [126144000, 1, 1], ## Expedient Recovery 4 yr
        485 => [157680000, 1, 1], ## Steadfast Servant 5 yr
        486 => [189216000, 1, 1], ## Staunch Recovery 6 yr
        487 => [220752000, 1, 1], ## Intensity of the Resolute 7 yr
        511 => [252288000, 1, 1], ## Throne of Heroes 8 yr
        2000 => [283824000, 1, 1], ## Armor of Experience 9 yr
        8081 => [315360000, 1, 1], ## Summon Resupply Agent 10 yr
        8130 => [346896000, 1, 1], ## Summon Clockwork Banker 11 yr
        453 => [378432000, 1, 1], ## Summon Permutation Peddler 12 yr
        182 => [409968000, 1, 1], ## Summon Personal Tribute Master 13 yr
        600 => [441504000, 1, 1] ## Blessing of the Devoted 14 yr
    );
	    my $age = $client->GetAccountAge();
    for (my ($aa, $v) = each %vet_aa) {
        if ($v[2] && ($v[1] || $age >= $v[0])) {
            $client->GrantAlternateAdvancementAbility($aa, 1);

        }
    }
}
I am not a coder so don't know where to fit it in.
Reply With Quote
  #13  
Old 08-20-2018, 03:56 AM
Splose
Banned
 
Join Date: Apr 2014
Posts: 279
Default

This should be fine. Another thing to note is that anything with a "#" before it is commented out. So you will have to comment out the other 3 ranks if you want to give all 4 before any character is hit by this code.

Once it is hit once by this code it won't be hit again by it due to the flag. You will have to go into your quest_globals db table and delete the specific global for your charid if you need it to be ran multiple times.

Code:
sub EVENT_CONNECT {
	if(!defined($qglobals{"SpellGem"}) {
		$client->IncrementAA(1071);	#:: Mnemonic Retention Rk. I
		#$client->IncrementAA(4764);	#:: Mnemonic Retention RK. II
		#$client->IncrementAA(7553);	#:: Mnemonic Retention RK. III
		#$client->IncrementAA(7681);	#:: Mnemonic Retention RK. IV
		$client->SetGlobal("SpellGem", 1, 5, "F");
	}
    # the main key is the ID of the AA
    # the first set is the age required in seconds
    # the second is if to ignore the age and grant anyways live test server style
    # the third is enabled
    my %vet_aa = (
        481 => [31536000, 1, 1], ## Lesson of the Devote 1 yr
        482 => [63072000, 1, 1], ## Infusion of the Faithful 2 yr
        483 => [94608000, 1, 1], ## Chaotic Jester 3 yr
        484 => [126144000, 1, 1], ## Expedient Recovery 4 yr
        485 => [157680000, 1, 1], ## Steadfast Servant 5 yr
        486 => [189216000, 1, 1], ## Staunch Recovery 6 yr
        487 => [220752000, 1, 1], ## Intensity of the Resolute 7 yr
        511 => [252288000, 1, 1], ## Throne of Heroes 8 yr
        2000 => [283824000, 1, 1], ## Armor of Experience 9 yr
        8081 => [315360000, 1, 1], ## Summon Resupply Agent 10 yr
        8130 => [346896000, 1, 1], ## Summon Clockwork Banker 11 yr
        453 => [378432000, 1, 1], ## Summon Permutation Peddler 12 yr
        182 => [409968000, 1, 1], ## Summon Personal Tribute Master 13 yr
        600 => [441504000, 1, 1] ## Blessing of the Devoted 14 yr
    );
	    my $age = $client->GetAccountAge();
    for (my ($aa, $v) = each %vet_aa) {
        if ($v[2] && ($v[1] || $age >= $v[0])) {
            $client->GrantAlternateAdvancementAbility($aa, 1);

        }
    }
}
Reply With Quote
  #14  
Old 08-20-2018, 11:05 AM
GreenManalishi
Fire Beetle
 
Join Date: May 2018
Posts: 27
Default

Thank you <3
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:20 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