Bugfix pass.
Fixed onRespawn & onDying scripts. Fixed XP awards. Added temple hospital & library.
This commit is contained in:
45
_module/nss/temple_fun.nss
Normal file
45
_module/nss/temple_fun.nss
Normal file
@@ -0,0 +1,45 @@
|
||||
/*
|
||||
Temple functions include file.
|
||||
|
||||
WWWWolf 2003-11-09
|
||||
*/
|
||||
|
||||
string CASTER = "Marleta";
|
||||
|
||||
void CastSpellOnPC(int spell, int cost)
|
||||
{
|
||||
object pc = GetPCSpeaker();
|
||||
object caster = GetObjectByTag(CASTER);
|
||||
|
||||
if(cost > 0) {
|
||||
TakeGoldFromCreature(cost, pc, TRUE);
|
||||
}
|
||||
|
||||
AssignCommand(caster, ActionPauseConversation());
|
||||
AssignCommand(caster, ActionCastSpellAtObject(spell, pc, METAMAGIC_NONE,
|
||||
TRUE, 5, TRUE));
|
||||
AssignCommand(caster, ActionResumeConversation());
|
||||
}
|
||||
|
||||
void NormalHeartbeat()
|
||||
{
|
||||
// Run normal heartbeat stuff
|
||||
ExecuteScript("nw_c2_default1",OBJECT_SELF);
|
||||
}
|
||||
|
||||
int TooBusyToConverse()
|
||||
{
|
||||
return(GetIsInCombat() || IsInConversation(OBJECT_SELF));
|
||||
}
|
||||
|
||||
// Create a waypoint called <creaturetag>Location.
|
||||
// Subject will take the waypoint's location and walk there,
|
||||
// and face where the waypoint is pointing.
|
||||
void FaceToMyLocation()
|
||||
{
|
||||
object wp = GetObjectByTag(GetTag(OBJECT_SELF)+"Location");
|
||||
location here = GetLocation(wp);
|
||||
ActionMoveToLocation(here);
|
||||
SetFacing(GetFacing(wp)); // Turn to the direction of the waypoint
|
||||
}
|
||||
|
Reference in New Issue
Block a user