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,62 @@
void main()
{
object oSelf = OBJECT_SELF;
object oAttacker = GetLastHostileActor(oSelf); //The last person to act hostilely, attacker, dammagers, spellcaster (if hostile), or disturber(in case of pickpocketing)
int iDexMod = GetAbilityModifier(ABILITY_DEXTERITY, oAttacker);
int nBowFocus;
int nCalledShot;
string nPCname = GetPCPlayerName(oSelf);
{
// Apply bonuses for beneficial feats
if (GetHasFeat(FEAT_WEAPON_FOCUS_LONGBOW, oAttacker))
nBowFocus = 1;
}
{
if (GetHasFeat(FEAT_WEAPON_FOCUS_SHORTBOW, oAttacker))
nBowFocus = 1;
}
{
if (GetHasFeat(FEAT_CALLED_SHOT, oAttacker))
nCalledShot = 1;
}
int iHitCalc = d20()+iDexMod+nCalledShot+nBowFocus;
int iRandomChance = d20();
if (iRandomChance == 20)
{
ActionSpeakString ("Contestant makes a lucky shot! Centre Ring (5 Points)");
return;
}
else if (iRandomChance == 1)
{
ActionSpeakString ("Scoring shot made on target edge (1 Point)");
return;
}
else if (iHitCalc <= 5)
{
ActionSpeakString ("Scoring shot made on target edge (1 Point)");
return;
}
else if (iHitCalc <= 12)
{
ActionSpeakString ("BLUE: Scoring shot made on outer circle (3 Points)");
return;
}
else if (iHitCalc <= 19)
{
ActionSpeakString ("WHITE: Scoring shot made on inner circle (4 Points)");
return;
}
else if (iHitCalc <= 30)
{
ActionSpeakString ("RED: Scoring shot made on centre circle! (5 Points)");
return;
}
}