Initial upload

Initial upload.  PRC8 has been added.  Module compiles, PRC's default AI & treasure scripts have been integrated.  Started work on top hak for SLA / Ability / Scripting modifications.
This commit is contained in:
Jaysyn904
2024-03-11 23:44:08 -04:00
parent c4b5794c59
commit 7b9e44ebbb
11454 changed files with 10436475 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
//Basic Commented Combat Dummy Trainer
//Rewards an average of 10 xp to lvl 1 characters per hostile action
void main()
{
object oSelf = OBJECT_SELF; //The thing calling this, nameily the dummy itself
object oAttacker = GetLastHostileActor(oSelf); //The last person to act hostilely, attacker, dammagers, spellcaster (if hostile), or disturber(in case of pickpocketing)
int iPc = GetIsPC(oAttacker); //Wanna make sure it is a pc, just for good measure but we don't want wizard's pets getting lvls do we.
int nXP = GetXP(oAttacker); //Easiest way to restrict via a lvl
int iXp = d2();//Averages out to 10 xp, random amounts often make things feel more fluid, and organic
if (iPc == TRUE){ //When the last attacker, is a pc
if (nXP <= 500){ //If the pc is lvl 1, in this case left lvl 1 or lower to simplify editing for people whom want to make dumbies for higher lvl characters
GiveXPToCreature(oAttacker, iXp); //Give the xp to the attacker
}
else{
SendMessageToPC(oAttacker,"You cannot increase your skills further by attacking this combat dummy");
}//If the attack doesn't meet the level restrictions do this, (nothing)
}
else{} //If the Attack isn't a pc, do this (nothing)
}