Quote:
Originally Posted by KingMort
If this is posted in the wrong section , I apologize
Ran into some funny issues when completely re-making / organizing our spells file.
What I really want to do at this point is wipe out everyone's spell books, and discs. (Later of course to refund them)
Of course this is a simple matter with a Hail npc or Player script. But to do it with an SQL query has proven to be pretty rough..
Am I correct to assume that data is stored in Character_ under the extprofile BLOB ?
But is there no way to access said data ? If so what would the query look like to remove spells and discs from all chars (if you don't mind going that far)
Thank you in advance to anyone who can help this old troll find the answer to this puzzling ordeal.
KM
|
Mort, one thing you can do simply because this is most likely an issue that could really ruin things... On all of your sub EVENT_ENTERZONE 's for your player.pl you could generate a script that wipes all of their spells and gives all of them back to a certain level. Put a qglobal on it so it doesn't happen twice, only to them logging in for the first time.
Only reason I say this is because you can't really query against a blob unless there is some way that I haven't heard of. But here, I just woke up, so this should be a good enough example...
Assuming you have a bunch of spell ID's that are messed up and out of order now, this is how I would do it...
Code:
sub EVENT_ENTERZONE{
if(!$qglobals{"OperationNuke"}){ ### If they don't have flag, give it to them, a one time operation
$client->UnscribeSpellAll(); ###Wipe Spells, requires force update
$client->UntrainDiscAll(); ###Wipe Discs, requires force update
quest::traindiscs(1, 90);
quest::scribespells(1, 90);
quest::setglobal("OperationNuke",1,5,"F");
$client->Save();
$client->Disconnect();
}
}
You could also put something like this on an NPC, depends on how urgent you find this matter. But that should definitely get the job done for you. They will need to rezone or recamp to see the abilities again.