Go Back   EQEmulator Home > EQEmulator Forums > Archives > Archive::Development > Archive::Development

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 05-05-2002, 01:21 PM
kathgar
Discordant
 
Join Date: May 2002
Posts: 434
Default Spell scribing - Code snippets

Code snippets complete, with a radix sort =)

A command to scribe all spells for someone would be useful.

There are serveral ways to go about this, one would to be on #scribespells <level>.. search all spells, if they are <= level and the character level, add them to the spellbook in the first availible space. Another way would be to do that, sort that list by level (assend or desend), maybe by basic type(icon) or by affects..

Level 1 Pet L1 Buff L1 Nuke L2 Nuke L2 Buff L3 Buff L3 Pet
L1 Pet L3 Pet L1 Buff L2 Buff L3 Buff L1 Nuke L2 Nuke
all would be pretty simple to implement, but would require O(n), assuming 5000 spells, thats 5000 + (sorting)

Another way if on load, create spell lists for each class, have them arranged by level and class and maybe type then when someone requested the spells, you would use a lot less O, and if more than one person did this, the saving would be tremendous.

So far, the precreated lists are the most appropriate and should be relatively easy to make. However, not having experience with the general code it is quite hard. If anyone needs help with the coding of the searching, sorting, I can help and will be working on it, but I would not be able to merge it easily.

ed. Need to do a better sort and get rid of index operator
Reply With Quote
 


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 04:17 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 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3