PoA_PRC8/_module/nss/royalroguesecret.nss
Jaysyn904 3e00bab038 Big Demonic Update
Big Demonic Update. Full compile.  Updated release archive.
2024-05-08 17:19:06 -04:00

86 lines
2.3 KiB
Plaintext

//Put this script OnEnter
#include "prc_class_const"
void main()
{
location lTarget;
object oTarget;
object oPC = GetEnteringObject();
int nClass;
nClass = GetLevelByClass(CLASS_TYPE_ROGUE, oPC)
+GetLevelByClass(CLASS_TYPE_NINJA, oPC)
+GetLevelByClass(CLASS_TYPE_SCOUT, oPC)
+GetLevelByClass(CLASS_TYPE_BARD, oPC)
+GetLevelByClass(CLASS_TYPE_BEGUILER, oPC)
+GetLevelByClass(CLASS_TYPE_FACTOTUM, oPC)
+GetLevelByClass(CLASS_TYPE_PSYCHIC_ROGUE, oPC);
int nSearch = GetSkillRank(SKILL_SEARCH, oPC, TRUE);
//:: They must be a level 21 rogue nothing happens
if (nClass <= 20)
{
//:: Only if they can spot it!
if(nSearch >= 30)
{
FloatingTextStringOnCreature("You notice a strange looking crack in the wall.", oPC, FALSE);
}
}
else if (nClass >= 21)
{
if(nSearch >= 34)
{
int nHench;
object oHench;
object oTarget;
// Send a message to the player's chat window.
SendMessageToPC(oPC, "You have found a secret lever!");
// Have text appear over the PC's head.
FloatingTextStringOnCreature("You have found a secret lever!", oPC);
// Find the location to which to teleport.
oTarget = GetWaypointByTag("royalrogueway");
// Save the PC's current location for the return trip.
SetLocalLocation(oPC, "ls_stored_loc", GetLocation(oPC));
// Teleport the PC.
AssignCommand(oPC, ClearAllActions());
AssignCommand(oPC, JumpToObject(oTarget));
// Also teleport associates.
oHench = GetAssociate(ASSOCIATE_TYPE_ANIMALCOMPANION, oPC);
AssignCommand(oHench, ClearAllActions());
AssignCommand(oHench, JumpToObject(oTarget));
oHench = GetAssociate(ASSOCIATE_TYPE_DOMINATED, oPC);
AssignCommand(oHench, ClearAllActions());
AssignCommand(oHench, JumpToObject(oTarget));
oHench = GetAssociate(ASSOCIATE_TYPE_FAMILIAR, oPC);
AssignCommand(oHench, ClearAllActions());
AssignCommand(oHench, JumpToObject(oTarget));
oHench = GetAssociate(ASSOCIATE_TYPE_SUMMONED, oPC);
AssignCommand(oHench, ClearAllActions());
AssignCommand(oHench, JumpToObject(oTarget));
// Support for multiple henchmen (includes horses).
nHench = 1;
oHench = GetHenchman(oPC, 1);
while ( oHench != OBJECT_INVALID )
{
AssignCommand(oHench, ClearAllActions());
AssignCommand(oHench, JumpToObject(oTarget));
// Next henchman.
oHench = GetHenchman(oPC, ++nHench);
}
}
}
}