Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Database/World Building

Development::Database/World Building World Building forum, dedicated to the EQEmu MySQL Database. Post partial/complete databases for spawns, items, etc.

Reply
 
Thread Tools Display Modes
  #1  
Old 05-18-2009, 01:05 PM
Irreverent
The Solo Server
 
Join Date: May 2007
Posts: 416
Default Mass-clearing of spell books

Is there a way to update all characters' spell book like they have none in there? (Same goes with discs)

Not sure where they are stored? (blob somewhere) and is there a way to whipe them?
__________________
OP of Irreverent Server (The Solo Server)
Our Forums
Reply With Quote
  #2  
Old 05-18-2009, 10:27 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

The data are defined in common/eq_packet_structs.h

Code:
static const uint32 MAX_PP_SPELLBOOK	= 400;
static const uint32 MAX_PP_MEMSPELL		= 9;
have a look at mem
/*2584*/ int32 spell_book[400];
/*4632*/ int32 mem_spells[9];

I think putting 0's in byte 2584 to 2584-1+1600=4183 will do it. uint32=4 bytes?
So the question is how do you write sql for writing bytes back to the DB?

Code:
struct PlayerProfile_Struct
{
/*0000*/	uint32				checksum;			// Checksum from CRC32::SetEQChecksum
/*0004*/	char				name[64];			// Name of player sizes not right
/*0068*/	char				last_name[32];		// Last name of player sizes not right
/*0100*/	uint32				gender;				// Player Gender - 0 Male, 1 Female
/*0104*/	uint32				race;				// Player race
/*0108*/	uint32				class_;				// Player class
/*0112*/	uint32				unknown0112;		//
/*0116*/	uint32				level;				// Level of player (might be one byte)
/*0120*/	BindStruct			binds[5];           // Bind points (primary is first)
/*0220*/	uint32				deity;				// deity
/*0224*/	uint32				guild_id;
/*0228*/	uint32				birthday;			// characters bday
/*0232*/	uint32				lastlogin;			// last login or zone time
/*0236*/	uint32				timePlayedMin;			// in minutes
/*0240*/	uint8				pvp;
/*0241*/	uint8				level2; //no idea why this is here, but thats how it is on live
/*0242*/	uint8				anon;		// 2=roleplay, 1=anon, 0=not anon
/*0243*/	uint8				gm;
/*0244*/	uint8				guildrank;
/*0245*/	uint8				unknown0245[7];	//
/*0252*/	uint32				intoxication;
/*0256*/	uint32				spellSlotRefresh[MAX_PP_MEMSPELL];	//in ms
/*0292*/	uint8                           unknown0392[4];
/*0296*/	uint8				haircolor;			// Player hair color
/*0297*/	uint8				beardcolor;			// Player beard color
/*0298*/	uint8				eyecolor1;			// Player left eye color
/*0299*/	uint8				eyecolor2;			// Player right eye color
/*0300*/	uint8				hairstyle;			// Player hair style
/*0301*/	uint8				beard;				// Beard type
/*0302*/	uint8				ability_time_seconds; //The following four spots are unknown right now.....
/*0303*/	uint8				ability_number; //ability used
/*0304*/	uint8				ability_time_minutes;
/*0305*/	uint8				ability_time_hours;//place holder
/*0306*/	uint8				unknown0306[6];		// @bp Spacer/Flag?
/*0312*/	uint32				item_material[MAX_MATERIALS];	// Item texture/material of worn/held items
/*0348*/	uint8				unknown0256[44];
/*0396*/	Color_Struct		item_tint[MAX_MATERIALS];
/*0432*/	AA_Array			aa_array[MAX_PP_AA_ARRAY];
/*2348*/	float				unknown2348;		//seen ~128, ~47
/*2352*/	char				servername[32];		// length probably not right
/*2384*/	char				title[32];			//length might be wrong
/*2416*/	char				suffix[32];			//length might be wrong
/*2448*/	uint32				guildid2;		//
/*2452*/	uint32				exp;				// Current Experience
/*2456*/	uint32				unknown1496;
/*2460*/	uint32				points;				// Unspent Practice points
/*2464*/	uint32				mana;				// current mana
/*2468*/	uint32				cur_hp;				// current hp
/*2472*/	uint32				unknown1512;		// 0x05
/*2476*/	uint32				STR;				// Strength
/*2480*/	uint32				STA;				// Stamina
/*2484*/	uint32				CHA;				// Charisma
/*2488*/	uint32				DEX;				// Dexterity
/*2492*/	uint32				INT;				// Intelligence
/*2496*/	uint32				AGI;				// Agility
/*2500*/	uint32				WIS;				// Wisdom
/*2504*/	uint8				face;				// Player face
/*2505*/	uint8				unknown1545[47];	// ?
/*2552*/	uint8				languages[MAX_PP_LANGUAGE];
/*2580*/	uint8				unknown1620[4];
/*2584*/	int32				spell_book[MAX_PP_SPELLBOOK];
/*4184*/	uint8				unknown3224[448];	// all 0xff
/*4632*/	int32				mem_spells[MAX_PP_MEMSPELL];
/*4668*/	uint8				unknown3704[32];	//
/*4700*/	float				y;					// Player y position
/*4704*/	float				x;					// Player x position
/*4708*/	float				z;					// Player z position
/*4712*/	float				heading;			// Direction player is facing
/*4716*/	uint8				unknown3756[4];		//
/*4720*/	sint32				platinum;			// Platinum Pieces on player
/*4724*/	sint32				gold;				// Gold Pieces on player
/*4728*/	sint32				silver;				// Silver Pieces on player
/*4732*/	sint32				copper;				// Copper Pieces on player
/*4736*/	sint32				platinum_bank;		// Platinum Pieces in Bank
/*4740*/	sint32				gold_bank;			// Gold Pieces in Bank
/*4744*/	sint32				silver_bank;		// Silver Pieces in Bank
/*4748*/	sint32				copper_bank;		// Copper Pieces in Bank
/*4752*/	sint32				platinum_cursor;	// Platinum on cursor
/*4756*/	sint32				gold_cursor;		// Gold on cursor
/*4760*/	sint32				silver_cursor;		// Silver on cursor
/*4764*/	sint32				copper_cursor;		// Copper on cursor
/*4768*/	sint32				platinum_shared;        // Platinum shared between characters
/*4772*/	uint8				unknown3812[24];        // @bp unknown skills?
/*4796*/	uint32				skills[MAX_PP_SKILL];
/*5096*/	uint8				unknown5096[284];     // @bp unknown skills?
/*5380*/	int32				pvp2;	//
/*5384*/	int32				unknown4420;	//
/*5388*/	int32				pvptype;	//
/*5392*/	int32				unknown4428;	//
/*5396*/	uint32				ability_down;			// Doodman - Guessing
/*5400*/	uint8				unknown4436[8];	//
/*5408*/	uint32				autosplit;			//not used right now
/*5412*/	uint8				unknown4448[8];
/*5420*/	int32				zone_change_count;      // Number of times user has zoned in their career (guessing)
/*5424*/	uint8				unknown4460[28];	//
/*5452*/	int32				expansions;		// expansion setting, bit field of expansions avaliable
/*5456*/	sint32				toxicity;	//from drinking potions, seems to increase by 3 each time you drink
/*5460*/	char				unknown4496[16];	//
/*5476*/	sint32				hunger_level;
/*5480*/	sint32				thirst_level;
/*5484*/	int32				ability_up;
/*5488*/	char				unknown4524[16];
/*5504*/	uint16				zone_id;			// Current zone of the player
/*5506*/	uint16				zoneInstance;			// Instance ID
/*5508*/	SpellBuff_Struct	buffs[BUFF_COUNT];			// Buffs currently on the player
/*6008*/	char 				groupMembers[6][64];		//
/*6392*/	char				unknown6392[668];
/*7060*/	sint32				ldon_points_guk;		//client uses these as signed
/*7064*/	sint32				ldon_points_mir;
/*7068*/	sint32				ldon_points_mmc;
/*7072*/	sint32				ldon_points_ruj;
/*7076*/	sint32				ldon_points_tak;
/*7080*/	sint32				ldon_points_available;
/*7084*/	uint8				unknown5940[112];
/*7196*/	uint32				tribute_time_remaining;	//in miliseconds
/*7200*/	uint32				unknown6048;
/*7204*/	uint32				career_tribute_points;
/*7208*/	uint32				unknown6056;
/*7212*/	uint32				tribute_points;
/*7216*/	uint32				unknown6064;
/*7220*/	uint32				tribute_active;		//1=active
/*7224*/	Tribute_Struct		tributes[MAX_PLAYER_TRIBUTES];
/*7264*/	Disciplines_Struct	disciplines;			//fathernitwit: 10-06-04
/*7664*/	char				unknown7464[240];
/*7904*/	uint32				endurance;
/*7908*/	uint32				group_leadership_exp;	//0-1000
/*7912*/	uint32				raid_leadership_exp;	//0-2000
/*7916*/	uint32				group_leadership_points;
/*7920*/	uint32				raid_leadership_points;
/*7924*/	LeadershipAA_Struct	leader_abilities;
/*8052*/	uint8				unknown8052[132];
/*8184*/	uint32				air_remaining;
/*8188*/	uint8				unknown8188[4608];
/*12796*/	uint32				aapoints_spent;
/*12800*/	uint32				expAA;
/*12804*/	uint32				aapoints;	//avaliable, unspent
/*12808*/	uint8				unknown12808[36];
/*12844*/	Bandolier_Struct	bandoliers[MAX_PLAYER_BANDOLIER];
/*14124*/	uint8				unknown14124[5120];
/*19244*/	PotionBelt_Struct	potionbelt;	//there should be 3 more of these
/*19532*/	uint8				unknown19532[8];
/*19540*/	uint32				currentRadCrystals; 	// Current count of radiant crystals
/*19544*/	uint32				careerRadCrystals; // Total count of radiant crystals ever
/*19548*/	uint32				currentEbonCrystals;		// Current count of ebon crystals
/*19552*/	uint32				careerEbonCrystals;	// Total count of ebon crystals ever
/*19556*/	uint8				groupAutoconsent;   // 0=off, 1=on
/*19557*/	uint8				raidAutoconsent;    // 0=off, 1=on
/*19558*/	uint8				guildAutoconsent;   // 0=off, 1=on
/*19559*/	uint8				unknown19559[5];    // ***Placeholder (6/29/2005)
/*19564*/	uint32				unknown15964;
/*19568*/
};
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//

Last edited by GeorgeS; 05-19-2009 at 07:21 AM..
Reply With Quote
  #3  
Old 05-18-2009, 10:50 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

..so to continue, AndMetal's SQL for modifying BLOBS in profile can be done according to

Code:
UPDATE character_ SET  profile = INSERT
  ((SELECT profile FROM (SELECT * FROM character_) AS x WHERE id = 748),
  (4720+1),4,RPAD(CHAR(100),4,CHAR(0))) WHERE id = 748;
from AndMetal's message quoted--
"In theory, you can change 4720 to any field # in the profile blob & the 100 to whatever numeric value you want it set to. You would then need to change the 4's to correspond with however many characters the data takes up (32-bit integers are 4, for example), otherwise the blob will become corrupt (too many/too few characters)."

I think you can expand on this..

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//

Last edited by GeorgeS; 05-19-2009 at 06:55 AM..
Reply With Quote
  #4  
Old 05-19-2009, 12:18 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

George - how about to add an actual char editor to your item/inventory editor =)

things like race, class, deity, gender, spells in spell book and so on =)
Reply With Quote
  #5  
Old 05-19-2009, 12:33 AM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

I am thinking about it now, but the spells is a hard one to figure out exactly.
race, class, deity, gender and others are easy, so I may do it

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
  #6  
Old 05-19-2009, 12:43 AM
ChaosSlayerZ's Avatar
ChaosSlayerZ
Demi-God
 
Join Date: Mar 2009
Location: Umm
Posts: 1,492
Default

ok drop the spells for now, i will take rest anytime =)
Reply With Quote
  #7  
Old 05-25-2009, 03:37 PM
GeorgeS
Forum Guide
 
Join Date: Sep 2003
Location: California
Posts: 1,475
Default

All of the above (except AA editing) are coded into the new item editor.
clearing of spell books (1 toon at a time) is built in
You can also edit the spell book and assign memmed spells

GeorgeS
__________________
Your source for EQ database tools
Toolshop is open for business


http://www.georgestools.chrsschb.com//
Reply With Quote
Reply


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