summaryrefslogtreecommitdiff
path: root/npc/sample
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 18:54:07 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 18:54:07 +0000
commit2e35eff8bfe55314e30aaa2b88bd0bf1e7bd7647 (patch)
tree53fbb31579d6e7c4f9572090379dd0ac36c53000 /npc/sample
parent894951cb5bb625050cc6da1ce409aed575f034f0 (diff)
downloadhercules-2e35eff8bfe55314e30aaa2b88bd0bf1e7bd7647.tar.gz
hercules-2e35eff8bfe55314e30aaa2b88bd0bf1e7bd7647.tar.bz2
hercules-2e35eff8bfe55314e30aaa2b88bd0bf1e7bd7647.tar.xz
hercules-2e35eff8bfe55314e30aaa2b88bd0bf1e7bd7647.zip
* Patches to allow everything to work right. + 1 more sample script.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6779 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/sample')
-rw-r--r--npc/sample/monster_controller.cpp28
1 files changed, 20 insertions, 8 deletions
diff --git a/npc/sample/monster_controller.cpp b/npc/sample/monster_controller.cpp
index 035215300..385059d31 100644
--- a/npc/sample/monster_controller.cpp
+++ b/npc/sample/monster_controller.cpp
@@ -69,14 +69,26 @@ prontera.gat,180,200,4 script Monster Controller 123,{
break;
}
- if(.ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_ATTACK)
- set .@action_type$, "Attacked by";
- else if(.ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_DETECT)
- set .@action_type$, "Detected";
- else if (.ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_ASSIST)
- set .@action_type$, "Killed by";
- else
- set .@action_type$, "Assisting";
+ switch(.ai_action[AI_ACTION_TYPE]){
+ case AI_ACTION_TYPE_ATTACK:
+ set .@action_type$, "Attacked by";
+ break;
+ case AI_ACTION_TYPE_DETECT:
+ set .@action_type$, "Detected";
+ break;
+ case AI_ACTION_TYPE_DEAD:
+ set .@action_type$, "Killed by";
+ break;
+ case AI_ACTION_TYPE_ASSIST:
+ set .@action_type$, "Assisting";
+ break;
+ case AI_ACTION_TYPE_UNLOCK:
+ set .@action_type$, "Unlocked target";
+ break;
+ case AI_ACTION_TYPE_KILL:
+ set .@action_type$, "Killed";
+ break;
+ }
announce "Details - " + .@action_type$ + " [" + .@action_from$ + "] " + .@action_name$ + "!", bc_all;
deletearray .ai_action, 4;