Bugfix pass.
Fixed onRespawn & onDying scripts. Fixed XP awards. Added temple hospital & library.
This commit is contained in:
77
_module/nss/temple_monkhb.nss
Normal file
77
_module/nss/temple_monkhb.nss
Normal file
@@ -0,0 +1,77 @@
|
||||
/* Temple monk heartbeat script. Makes the monk do various combat
|
||||
exercises, and meditate. Hiyyyyaaaaaaaa---ha! *CRACK* *CRASH*
|
||||
|
||||
Most of the ActionSpeakString()s in this thing are for debugging
|
||||
purposes only and are not especially interesting for other uses.
|
||||
|
||||
WWWWolf 2003-10-29, for Dakanon
|
||||
*/
|
||||
|
||||
#include "temple_fun"
|
||||
|
||||
const string STAFF = "TempleMonkStaff";
|
||||
const string TARGET = "TempleMonkDummy";
|
||||
|
||||
void main()
|
||||
{
|
||||
/* Run normal heartbeat stuff */
|
||||
NormalHeartbeat();
|
||||
//ExecuteScript("nw_c2_default1",OBJECT_SELF);
|
||||
|
||||
/* This is the Staff. */
|
||||
object staff = GetObjectByTag(STAFF);
|
||||
/* This is the Target. */
|
||||
object target = GetObjectByTag(TARGET);
|
||||
|
||||
/* Are we in combat? */
|
||||
int incombat = GetIsInCombat();
|
||||
|
||||
/* Are we in conversation? Let's return, if so... */
|
||||
if(IsInConversation(OBJECT_SELF)) {
|
||||
return;
|
||||
}
|
||||
|
||||
/* Equip/Unequip the staff ocassionally. */
|
||||
if(d10(1) == 1) {
|
||||
if(incombat)
|
||||
ClearAllActions(TRUE); /* Quit attacking for a while */
|
||||
|
||||
//ActionSpeakString("To staff or not to staff, that is the question!");
|
||||
|
||||
if(GetItemInSlot(INVENTORY_SLOT_RIGHTHAND) != staff)
|
||||
ActionEquipItem(staff,INVENTORY_SLOT_RIGHTHAND);
|
||||
else
|
||||
ActionUnequipItem(staff);
|
||||
|
||||
if(incombat) /* Okay, switched, keep attacking... */
|
||||
ActionAttack(target);
|
||||
|
||||
}
|
||||
|
||||
/* Attack - or quit attacking - the dummy ocassionally. */
|
||||
if(!incombat) {
|
||||
if(d10(1) == 1) {
|
||||
//ActionSpeakString("Ryaaaaagh! Die, dummy!");
|
||||
/* Attack the dummy. */
|
||||
ActionAttack(target);
|
||||
} else {
|
||||
//ActionSpeakString("Cannot kill a harmless dummy!");
|
||||
if(d6(1) <= 2) {
|
||||
/* Sometimes, sit down and meditate. */
|
||||
ActionSpeakString("Ommmmmmmmmmmmm....");
|
||||
ActionPlayAnimation(ANIMATION_LOOPING_SIT_CROSS,1.0, 8.0);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
ActionAttack(target);
|
||||
if(d10(1) == 1) {
|
||||
/* Quit attacking the dummy. */
|
||||
ClearAllActions(TRUE);
|
||||
//ActionSpeakString("Shan't attack no more!");
|
||||
} else {
|
||||
//ActionSpeakString("Move like the water, strike like the thunder! "+
|
||||
// "Attack like a raging bull!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user