23 lines
1.0 KiB
Plaintext
23 lines
1.0 KiB
Plaintext
/////////////////////////////////////////////////////////////////////
|
|
//:: Move Across Script ////////////////
|
|
//:: Created By: Mathew Edwards, aka - DCMage ////////////////
|
|
//:: Created On: 21st July 2003 ////////////////
|
|
/////////////////////////////////////////////////////////////////////
|
|
void main()
|
|
{
|
|
object oPC = GetPCSpeaker();
|
|
int nAbilityDex = ABILITY_DEXTERITY; // Type of Ability to Check for
|
|
object oDest = GetObjectByTag("WP_SwimBack"); // Location Waypoint here
|
|
location iLoc = GetLocation(oDest);
|
|
if (GetAbilityScore(oPC, nAbilityDex) >= 22) // Ability Check Success DC
|
|
{
|
|
SendMessageToPC(oPC, "Dexterity Ability Check, DC 22 - Success");
|
|
AssignCommand(oPC, JumpToLocation(iLoc));
|
|
}
|
|
else if(GetAbilityScore(oPC, nAbilityDex) <=21) // Ability Check Fail DC
|
|
{
|
|
SendMessageToPC(oPC, "Dexterity Ability Check, DC 22 - Failed");
|
|
FloatingTextStringOnCreature("I can't swim across, the under current is too strong!", oPC, TRUE);
|
|
}
|
|
}
|