diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-26 09:46:45 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-05-26 09:46:45 +0000 |
commit | ffcebec91192484588b2a5853782d026e5370f0c (patch) | |
tree | 2e97d4e2b613bf2395f0f1b47435c0caf1686cc5 /npc/sample/monster_controller.cpp | |
parent | 4eabbb012ad6e6a4b9b3343e090b96de2841c1cf (diff) | |
download | hercules-ffcebec91192484588b2a5853782d026e5370f0c.tar.gz hercules-ffcebec91192484588b2a5853782d026e5370f0c.tar.bz2 hercules-ffcebec91192484588b2a5853782d026e5370f0c.tar.xz hercules-ffcebec91192484588b2a5853782d026e5370f0c.zip |
* Mob control engine tested 99% working so far.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6770 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'npc/sample/monster_controller.cpp')
-rw-r--r-- | npc/sample/monster_controller.cpp | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/npc/sample/monster_controller.cpp b/npc/sample/monster_controller.cpp index 58b5693a8..479320f2f 100644 --- a/npc/sample/monster_controller.cpp +++ b/npc/sample/monster_controller.cpp @@ -44,6 +44,39 @@ prontera.gat,180,200,4 script Monster Controller 123,{ return;
}
+ if(getarraysize(.ai_action) == 4){
+ announce "[Mob Control] AI Action Received from " + .ai_action[AI_ACTION_SRC] + "!",bc_all;
+ switch(.ai_action[AI_ACTION_TAR_TYPE]){
+ case AI_ACTION_TAR_TYPE_PC:
+ set .@action_from$, "Player";
+ set .@action_name$, rid2name(.ai_action[AI_ACTION_TAR]);
+ break;
+ case AI_ACTION_TAR_TYPE_MOB:
+ set .@action_from$, "Monster";
+ set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
+ break;
+ case AI_ACTION_TAR_TYPE_PET:
+ set .@action_from$, "Pet";
+ set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
+ break;
+ case AI_ACTION_TAR_TYPE_HOMUN:
+ set .@action_from$, "Homunculus";
+ set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
+ break;
+ default:
+ set .@action_from$, "Unknown";
+ set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
+ break;
+ }
+ if(.ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_ATTACK)
+ set .@action_type$, "attacked by";
+ else
+ set .@action_type$, "detected";
+ announce "Action " + .@action_type$ + " [" + .@action_from$ + "] " + .@action_name$ + "!", bc_all;
+ deletearray .ai_action, 4;
+ end;
+ }
+
L_MainMenu:
mes "[Monster Controller]";
mes "Current active monsters:";
|