Battledale_PRC8/_module/nss/nk_swimcheck.nss
Jaysyn904 7b9e44ebbb 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.
2024-03-11 23:44:08 -04:00

22 lines
718 B
Plaintext

void main()
{
object oPC = GetLastUsedBy();
int nSwimBonus = 0;
int nSwimCheck = 0;
int nSwimResult = 0; //0=failure, 1=success
nSwimBonus = nSwimBonus + (GetAbilityModifier(ABILITY_STRENGTH, oPC) * 2);
nSwimBonus = nSwimBonus + (GetAbilityModifier(ABILITY_CONSTITUTION, oPC) * 2);
nSwimBonus = nSwimBonus + GetAbilityModifier(ABILITY_DEXTERITY, oPC);
nSwimCheck = nSwimBonus + d10(1);
if (nSwimCheck>9)
{
nSwimResult = 1;
}
//SendMessageToPC(oPC, "Your result is " + IntToString(nSwimCheck));
SetLocalInt(OBJECT_SELF, "SWIM_BONUS", nSwimBonus);
SetLocalInt(OBJECT_SELF, "SWIM_RESULT", nSwimResult);
ActionStartConversation(oPC, "", TRUE);
}