|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Development::Feature Requests Post suggestions/feature requests here. |
06-17-2009, 09:13 AM
|
Dragon
|
|
Join Date: Dec 2007
Posts: 658
|
|
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.
|
06-17-2009, 02:18 PM
|
Dragon
|
|
Join Date: Dec 2007
Posts: 658
|
|
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.
|
06-24-2009, 05:00 PM
|
Dragon
|
|
Join Date: Dec 2007
Posts: 658
|
|
Does anyone think this can be done?
|
06-24-2009, 06:37 PM
|
|
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
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.
|
06-24-2009, 11:30 PM
|
|
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
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.
|
06-24-2009, 11:39 PM
|
Dragon
|
|
Join Date: Dec 2007
Posts: 658
|
|
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
|
06-25-2009, 12:51 PM
|
Developer
|
|
Join Date: Mar 2009
Location: -
Posts: 228
|
|
ScribeSpell(spell_id, slot, update_client= true)
I think i have tested this and it works.
|
06-25-2009, 02:16 PM
|
Discordant
|
|
Join Date: Apr 2004
Location: 127.0.0.1
Posts: 402
|
|
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.
|
06-25-2009, 02:46 PM
|
|
Demi-God
|
|
Join Date: Mar 2009
Location: Umm
Posts: 1,492
|
|
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 =)
|
|
|
|
06-28-2009, 12:16 AM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
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
)
{
|
|
|
|
07-08-2009, 07:35 PM
|
Dragon
|
|
Join Date: Dec 2007
Posts: 658
|
|
Did anybody test this and know if it works or not?
|
07-08-2009, 07:58 PM
|
Sarnak
|
|
Join Date: Oct 2008
Location: USA
Posts: 92
|
|
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.
|
07-08-2009, 08:03 PM
|
Dragon
|
|
Join Date: Dec 2007
Posts: 658
|
|
how do i add that in to the source code? I've never messed with it before
|
07-08-2009, 08:25 PM
|
Sarnak
|
|
Join Date: Oct 2008
Location: USA
Posts: 92
|
|
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.
|
07-08-2009, 09:23 PM
|
Dragon
|
|
Join Date: Dec 2007
Posts: 658
|
|
alright so to avoid messing with all my custom stuff, should I just recompile?
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -4. The time now is 09:49 AM.
|
|
|
|
|
|
|
|
|
|
|
|
|