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

Development::Feature Requests Post suggestions/feature requests here.

Reply
 
Thread Tools Display Modes
  #1  
Old 06-17-2009, 09:13 AM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default scribespell for one level

My server is meant to be legit, so I don't let people scribespells. I made a quest to give 66-70 spells that has taken me forever, so I was wondering a command to scribespells for just one level could be used, so it wouldn't give all spells.
Reply With Quote
  #2  
Old 06-17-2009, 02:18 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Let me clarify, it was 3 A.M. when I posted that. I finished the 66-70 spells quest, but now I want people to be able to acquire 71+ spells. I think a very easy way to do this would be adding a quest command to scribspells for just level 71 or 72, so then it would still mean spending time on lower level spell quests would still be useful and I wouldn't have to invest the weeks making a quest to give spells one at a time like I did for 66-70.
Reply With Quote
  #3  
Old 06-24-2009, 05:00 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Does anyone think this can be done?
Reply With Quote
  #4  
Old 06-24-2009, 06:37 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

personaly I don't use scribe command, cuase my server is also ultra legit and the only true way to scribe a spell is to get the scroll =)

BUT overall scribe command could use little enhancement, and not just by specific level, but by specific spell ID too.
Reply With Quote
  #5  
Old 06-24-2009, 11:30 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Scribing spells for just 1 level or for a range of specified levels is something I have been meaning to setup for a while. I just have a hard time finding time to get everything in that I want to do :P I will probably add that in once I am able to get qglobal requirements added into the spells table. By that, I mean giving an option to set a qglobal in the spells_new table that will require the player to have that same global in order to scribe that particular spell.

I don't have any plans to add in single spell ID scribing, though I thought there might already be a quest function for that. IMO, if you want to do single spells, the actual scrolls are probably the best way to do it.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #6  
Old 06-24-2009, 11:39 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

That sounds great. I've been working on an incredibly long quest that has an npc take an item and build up that persons credit which they can use to purchase specific 66-70 spells. It has taken me forever to do and I don't really feel like doing it all again, lol
Reply With Quote
  #7  
Old 06-25-2009, 12:51 PM
Kayen
Developer
 
Join Date: Mar 2009
Location: -
Posts: 228
Default

ScribeSpell(spell_id, slot, update_client= true)

I think i have tested this and it works.
Reply With Quote
  #8  
Old 06-25-2009, 02:16 PM
Yeormom
Discordant
 
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
Default

Rather than setting the slot, you should actually pull that using the next available slot function just before you assign the spell to that book slot. One less variable to chase.
__________________
Yeorwned
Bane of Life [Custom Classic/PvP]
Reply With Quote
  #9  
Old 06-25-2009, 02:46 PM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

btw one of the problem with scribespell is that it overwrites any custom placing of spells in the spell book. It simple starts writing from first spell slot and on, ignoring if I allreday have something in there, some times resultign in double, triple or even 8x writings of the same spell.

one of the reason I don't use it at all =)
Reply With Quote
  #10  
Old 06-28-2009, 12:16 AM
AndMetal
Developer
 
Join Date: Mar 2007
Location: Ohio
Posts: 648
Default

Just a quick thought on how to implement this...

Code:
ScribeSpells(max_level, min_level = 1)
That way we default from 1 through max_level if we don't provide the second argument. So, to scribe spells for just level 71:

Code:
quest::scribespells(71, 71)
Should be pretty easy to implement in the server code. I haven't compiled or tested this, but this should do it:

Code:
Index: Y:/svn/trunk/EQEmuServer/zone/command.cpp
===================================================================
--- Y:/svn/trunk/EQEmuServer/zone/command.cpp	(revision 700)
+++ Y:/svn/trunk/EQEmuServer/zone/command.cpp	(working copy)
@@ -5694,7 +5695,7 @@
 
 void command_scribespells(Client *c, const Seperator *sep)
 {
-	int level;
+	uint8 max_level, min_level;
 	int16 book_slot;
 	int16 curspell;
 	Client *t=c;
@@ -5704,29 +5705,36 @@
 
 	if(!sep->arg[1][0])
 	{
-		c->Message(0, "FORMAT: #scribespells <level>");
+		c->Message(0, "FORMAT: #scribespells <max level> <min level>");
 		return;
 	}
 
-	level = atoi(sep->arg[1]);
+	max_level = (uint8)atoi(sep->arg[1]);
+	min_level = sep->arg[2][0] ? (uint8)atoi(sep->arg[2]) : 1;
 
-	if(level < 1)
+	if(max_level < 1)
 	{
 		c->Message(0, "ERROR: Enter a level greater than 1.");
 		return;
 	}
 
+	if (max_level < min_level) {
+		c->Message(0, "ERROR: Min Level can't be greater than Max Level.");
+		return;
+	}
+
 	t->Message(0, "Scribing spells to spellbook.");
 	if(t != c)
 		c->Message(0, "Scribing spells for %s.", t->GetName());
-	LogFile->write(EQEMuLog::Normal, "Scribe spells request for %s from %s, level: %d", t->GetName(), c->GetName(), level);
+	LogFile->write(EQEMuLog::Normal, "Scribe spells request for %s from %s (min level: %u, max_level: %u)", t->GetName(), c->GetName(), min_level, max_level);
 
 	for(curspell = 0, book_slot = 0; curspell < SPDAT_RECORDS && book_slot < MAX_PP_SPELLBOOK; curspell++)
 	{
 		if
 		(
 			spells[curspell].classes[WARRIOR] != 0 && // check if spell exists
-			spells[curspell].classes[t->GetPP().class_-1] <= level && 
+			spells[curspell].classes[t->GetPP().class_-1] <= max_level &&	//maximum level
+			spells[curspell].classes[t->GetPP().class_-1] >= min_level &&	//minimum level
 			spells[curspell].skill != 52
 		)
 		{

Index: Y:/svn/trunk/EQEmuServer/zone/perlparser.cpp
===================================================================
--- Y:/svn/trunk/EQEmuServer/zone/perlparser.cpp	(revision 700)
+++ Y:/svn/trunk/EQEmuServer/zone/perlparser.cpp	(working copy)
@@ -789,12 +789,16 @@
 XS(XS__scribespells)
 {
 	dXSARGS;
-	if (items != 1)
+	if (items < 1)
 		Perl_croak(aTHX_ "Usage: scribespells(spell_level)");
 
-	int	spell_level = (int)SvIV(ST(0));
+	uint8 max_level = (uint8)SvIV(ST(0));
+	uint8 min_level = (uint8)SvIV(ST(1));
 
-	quest_manager.scribespells(spell_level);
+	if (min_level)
+		quest_manager.scribespells(max_level, min_level);
+	else
+		quest_manager.scribespells(max_level);
 
 	XSRETURN_EMPTY;
 }

Index: Y:/svn/trunk/EQEmuServer/zone/questmgr.cpp
===================================================================
--- Y:/svn/trunk/EQEmuServer/zone/questmgr.cpp	(revision 701)
+++ Y:/svn/trunk/EQEmuServer/zone/questmgr.cpp	(working copy)
@@ -624,7 +624,7 @@
 	initiator->Kick();
 }
 
-void QuestManager::scribespells(int spell_level) {
+void QuestManager::scribespells(uint8 max_level, uint8 min_level = 1) {
  	//Cofruben:-Scribe spells for user up to his actual level.
 	int16 book_slot;
 	int16 curspell;
@@ -633,7 +633,8 @@
 	   if
 	   (
 		  spells[curspell].classes[WARRIOR] != 0 &&
-		  spells[curspell].classes[initiator->GetPP().class_-1] <= spell_level &&
+		  spells[curspell].classes[initiator->GetPP().class_-1] <= max_level &&	//maximum level
+		  spells[curspell].classes[initiator->GetPP().class_-1] <= min_level &&	//minimum level
 		  spells[curspell].skill != 52
 	   )
 	   {
__________________
GM-Impossible of 'A work in progress'
A non-legit PEQ DB server
How to create your own non-legit server

My Contributions to the Wiki
Reply With Quote
  #11  
Old 07-08-2009, 07:35 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

Did anybody test this and know if it works or not?
Reply With Quote
  #12  
Old 07-08-2009, 07:58 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

It works. Traindiscs wasn't working at first but that's been fixed now too. I haven't tested it extensively but from what I saw it did work.
Reply With Quote
  #13  
Old 07-08-2009, 08:03 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

how do i add that in to the source code? I've never messed with it before
Reply With Quote
  #14  
Old 07-08-2009, 08:25 PM
Zeice
Sarnak
 
Join Date: Oct 2008
Location: USA
Posts: 92
Default

If you compile your own source it's already in the latest revision. If you go off the binaries, I believe the latest binary has it included.
Reply With Quote
  #15  
Old 07-08-2009, 09:23 PM
Randymarsh9
Dragon
 
Join Date: Dec 2007
Posts: 658
Default

alright so to avoid messing with all my custom stuff, should I just recompile?
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 08:40 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