william_hunter
Joined: 31 Jan 2007 Posts: 149
|
Posted: Sat Jul 12, 2008 12:48 Post subject: Changing a script to work with APS/SQL |
|
|
Just updated my server and I installed CEP 2.1, and was monkeying around with the horse system, and the initial client enter times have gone through the roof, and I think it may well be because of this:
Code: | //:://////////////////////////////////////////////
#include "x3_inc_horse"
void main()
{
object oPC=GetEnteringObject();
ExecuteScript("x3_mod_pre_enter",OBJECT_SELF); // Override for other skin systems
if ((GetIsPC(oPC)||GetIsDM(oPC))&&!GetHasFeat(FEAT_HORSE_MENU,oPC))
{ // add horse menu
HorseAddHorseMenu(oPC);
if (GetLocalInt(GetModule(),"X3_ENABLE_MOUNT_DB"))
{ // restore PC horse status from database
DelayCommand(2.0,HorseReloadFromDatabase(oPC,X3_HORSE_DATABASE));
} // restore PC horse status from database
} // add horse menu
if (GetIsPC(oPC))
{ // more details
// restore appearance in case you export your character in mounted form, etc.
if (!GetSkinInt(oPC,"bX3_IS_MOUNTED")) HorseIfNotDefaultAppearanceChange(oPC);
// pre-cache horse animations for player as attaching a tail to the model
HorsePreloadAnimations(oPC);
DelayCommand(3.0,HorseRestoreHenchmenLocations(oPC));
} // more details
} |
Which applies a skin that gives the players the horse radial commands. Pretty nice solution for those of us that have skin based subraces, but it seems to me that it would be faster if it were using MySQL instead of the Bioware database. Can someone walk me through how to change it over? _________________ The Realm of Tharagon NWN PW |
|