|
|
 |
 |
 |
 |
|
 |
 |
|
 |
 |
|
 |
|
Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself. |

04-20-2008, 02:35 AM
|
Fire Beetle
|
|
Join Date: Apr 2008
Location: California, USA
Posts: 27
|
|
Autoscribe spells/skills?
I played on a server that auto-scribed spells and learned skills for you. I find this takes part of the "job" out of the game. Any idea on how I can do this? I tried searched the forums and browsed through 100's of posts...Any advice would be appreciated.
|
 |
|
 |

04-20-2008, 03:07 AM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
These are probably what you're looking for:
Source: Wiki
Quote:
quest::setallskill(0-252); - Sets all skills to value.
quest::setskill(skill_id,value); - Sets a single skill to a value.
quest::incstat(statid,0-126); - Increases a stat by value x2 (Str=0, Sta=1, Agi=2, Dex=3, Int=4; Wis=5, Cha=6)
quest::setstat(statid,0-252); - Sets a stat to value (Str=0, Sta=1, Agi=2, Dex=3, Int=4; Wis=5, Cha=6)
quest::setlanguage(skill_id,0-100); - Sets a language to value (Common Tongue=0, Barbarian=1, Erudian=2, Elvish=3, Dark Elvish=4, Dwarvish=5, Troll=6, Ogre=7, Gnomish=8, Halfling=9, Thieves Cant=10, Old Erudian=11, Elder Elvish=12, Froglok=13, Goblin=14, Gnoll=15, Comgine Tongue=16, Elder Teir'Dal=17, Lizardman=18, Orcish=19, Faerie=20, Dragon=21, Elder Dragon=22, Dark Speech=23, Vah Shir=24, Unknown 1=25, Unknown 2=26)
quest::scribespells(); - Scribes all your spells up to the current level
quest::unscribespells(); - Unscribes all your spells
|
Hope that's what you're looking for.
|
 |
|
 |
 |
|
 |

04-20-2008, 03:22 AM
|
Discordant
|
|
Join Date: Aug 2006
Posts: 394
|
|
We do this on Jest Server and the code is still considered "in testing" which is why we have yet to release it to the community.
We also have code to auto-train discs when you level but currently have it turned off in our compiled binaries.
We will probably leave the autotrain of discs off and (if the autotrain code for spells passes muster) leave spells training on, because on our server, we want to help casters a bit more since melee in the emu is way out of whack in terms of power compared to casters.
Our users like it when spells are just given to them where they stand, when they level, automatically. We on Jest do not want our players hunting down spells. To me, the difficulty of getting level 65+ spells made EQ Live unplayable for casual players, as only those in raid guilds had a chance for many group spells and such.
On Jest, we have players chasing down other goodies instead 
__________________
--
Keelyeh
Owner, ServerOp and Developer
Jest 4 Server
Linux (Jest3 runs on Fedora, our Dev servers usually run on Ubuntu and/or Gentoo), OC-12 Connection = Hella Fast
Last edited by gernblan; 04-20-2008 at 11:26 AM..
|
 |
|
 |

04-20-2008, 11:29 PM
|
Fire Beetle
|
|
Join Date: Apr 2008
Location: California, USA
Posts: 27
|
|
gern: would you mind sharing, or divulging more of where to edit the source code? I looked a bit and didn't see what code gets called on level. You can PM me if you don't want to post the code publicly. Any help would be greatly appreciated!
|
 |
|
 |

04-21-2008, 12:09 PM
|
Hill Giant
|
|
Join Date: Oct 2003
Posts: 105
|
|
One way might be to look into Player Quests and use the EVENT_LEVEL_UP event to trigger some spell additions.
From the changelog announcing player quests:
KLS: Added player quests, player quests are quests designed to be attached to player processes such as zoning and clicking objects.
KLS: Player quests are loaded as either 'quests/zonename/player.pl' or as a template in 'quests/template/player.pl'
KLS: Player quests will export qglobals the client should be able to see and the following events are available for player quests:
EVENT_TIMER with var $timer
EVENT_CLICKDOOR with var $doorid
EVENT_LOOT with vars $looted_id and $looted_charges
EVENT_ZONE with var $target_zone_id
EVENT_ENTERZONE with no special var
EVENT_LEVEL_UP with no special var
And here is the best Wiki documentation on the topic: Link
Given the player quest feature and the functions that AndMetal pointed out, you should be able to get close to the functionality you're describing.
|
 |
|
 |

04-21-2008, 02:57 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Just as an example, I would assume this would scribe all of your spells to the current level when you level up:
quests/template/player.pl
Code:
sub EVENT_LEVEL_UP {
quest::scribespells();
}
The hard part about learning skills is easily finding out what the values should be set to. You could probably pull the skill levels from the database into an array, then do a foreach to change all of the skills. I think this would, as a result, give you the skills that you have to normally train, but I'm not 100% sure. On top of that, I'm not sure how/if you can directly query the DB like that with Perl without modifying the source.
|

04-24-2008, 01:26 PM
|
Fire Beetle
|
|
Join Date: Apr 2008
Location: California, USA
Posts: 27
|
|
The problem seems...that scribe() puts the spells in a random, jumbled order (maybe by spell ID?)..............
|

04-24-2008, 02:14 PM
|
Developer
|
|
Join Date: Mar 2007
Location: Ohio
Posts: 648
|
|
Quote:
Originally Posted by arkinia
The problem seems...that scribe() puts the spells in a random, jumbled order (maybe by spell ID?)..............
|
That is correct. This is a partial dump from one character's spells list (from the profile blob) after using scribespells():
Code:
[spell_book] => Array
(
[1] => 9
[2] => 12
[3] => 15
[4] => 17
[5] => 31
[6] => 32
[7] => 35
[8] => 36
[9] => 39
[10] => 40
[11] => 42
[12] => 46
[13] => 48
[14] => 49
[15] => 50
[16] => 60
[17] => 61
[18] => 62
[19] => 63
[20] => 64
[21] => 75
[22] => 79
[23] => 86
[24] => 93
[25] => 95
[26] => 96
[27] => 98
[28] => 110
[29] => 111
[30] => 112
[31] => 131
[32] => 132
[33] => 133
[34] => 134
[35] => 144
[36] => 145
[37] => 146
[38] => 147
[39] => 148
[40] => 149
[41] => 150
[42] => 151
[43] => 152
[44] => 153
[45] => 154
[46] => 155
[47] => 156
[48] => 157
[49] => 158
[50] => 159
|
 |
|
 |

06-29-2008, 06:10 PM
|
Hill Giant
|
|
Join Date: Jun 2004
Posts: 231
|
|
Would it be possible to use a quest such as this but still limit what spells the player gets? Reason I ask is on my server I would like to disable the use of the druid/wizard ports for the time being that go to Odus, Kunark, Velious, etc.
Only thing I can think of would be to either somehow edit the spells themselves to not port there, or perhaps have the quest unscribe the spell id's after it scribes all quests?
|

06-30-2008, 04:40 PM
|
Dragon
|
|
Join Date: Feb 2007
Posts: 659
|
|
Might be easier just to limit zone-ins to those zones to those with GM status. Let 'em scribe the spells, just not be able to use them until you open the zones up.
|

06-30-2008, 07:50 PM
|
Sarnak
|
|
Join Date: Aug 2006
Posts: 60
|
|
Quote:
Originally Posted by AndMetal
The hard part about learning skills is easily finding out what the values should be set to. You could probably pull the skill levels from the database into an array, then do a foreach to change all of the skills. I think this would, as a result, give you the skills that you have to normally train, but I'm not 100% sure. On top of that, I'm not sure how/if you can directly query the DB like that with Perl without modifying the source.
|
Yeah, that is pretty much the easiest method I found even if it isn't most optimal. I added this as a quest command as quest::setallskillstomax() for automatically training skills to max available for the given level. Which brings me to my question. Would any of you have a need for that really? I had a skill training npc on my server. If anyone finds it needed, I'll post it.
|

06-30-2008, 08:14 PM
|
 |
Developer
|
|
Join Date: Aug 2006
Location: USA
Posts: 5,946
|
|
I try to urge anyone who creates custom or new code to post it in the custom or server code submission threads.
Any code, no matter how small, could be very useful to people when they need it 
|
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:36 PM.
|
|
 |
|
 |
|
|
|
 |
|
 |
|
 |