View Single Post
  #1  
Old 07-03-2002, 11:37 AM
kathgar
Discordant
 
Join Date: May 2002
Posts: 434
Default #scribespells <level>

Code:
}
		else if (strcasecmp(sep.arg[0], "#scribespells")==0 ) {
			if(sep.arg[1][0]==0) {
				Message(0,"FORMAT: #scribespells &lt;level>");
			}
			if((sep.arg[1][0] &lt; 1) || (sep.arg[1][0] > 60))
				Message(0,"ERROR: Enter a level between 1 and 60 inclusive."); 
			else {
				Message(0, "Scribing spells to spellbook");
				cout &lt;&lt; "Scribing spells " &lt;&lt; endl;
				int bookcount =0;
				for (int i = 0; i &lt; SPDAT_RECORDS; i++)
				{
					if (spells[i].classes[(pp.class_ - 1)] &lt;= sep.arg[1][0])
					{
						if(bookcount &lt;=255)
						{
							if(spells[1].name[0]!=' ')
{pp.spell_book[bookcount]=i;
							bookcount++;}
						}
					}else break;
				}
			}
		}
put that in zone's client.cpp in the commands.. like line 1697

very horrible way to do it.. but adding spelllists for every class world take a lot of mem.. on every zone server..can't make files when zone reads, because then each zone does it..
Reply With Quote