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:
21
_module/nss/nk_swimcheck.nss
Normal file
21
_module/nss/nk_swimcheck.nss
Normal file
@@ -0,0 +1,21 @@
|
||||
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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user