From 07b78e2a410adde4767805ece549b4840b9ba254 Mon Sep 17 00:00:00 2001 From: Lance Date: Fri, 16 Jun 2006 15:17:04 +0000 Subject: * Updated sample script mob_controller.cpp to the latest standards. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7206 54d463be-8e91-2dee-dedb-b68131a5f0ec --- npc/Changelog.txt | 1 + npc/sample/monster_controller.cpp | 26 +++++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) (limited to 'npc') diff --git a/npc/Changelog.txt b/npc/Changelog.txt index fd197054f..fe97f0cb3 100644 --- a/npc/Changelog.txt +++ b/npc/Changelog.txt @@ -37,6 +37,7 @@ Musashiden Date Added ====== 06/16 + * Updated sample script mob_controller.cpp to the latest standards. [Lance] * Commited Silent's Fix to the duplicate NPCs [Playtester] - needs testing - can't be fully fixed because of length limitation of names diff --git a/npc/sample/monster_controller.cpp b/npc/sample/monster_controller.cpp index 385059d31..a7e6fbce4 100644 --- a/npc/sample/monster_controller.cpp +++ b/npc/sample/monster_controller.cpp @@ -33,6 +33,15 @@ prontera.gat,180,200,4 script Monster Controller 123,{ set .@mob_size, getarraysize(.mc_moblist); set .mc_moblist[.@mob_size], spawnmob("Slave - " + .@mob_size, getarg(0), "prontera.gat", 180, 200); mobattach .mc_moblist[.@mob_size]; + setmobdata .mc_moblist[.@mob_size], 25, + AI_ACTION_TYPE_ATTACK| + AI_ACTION_TYPE_DETECT| + AI_ACTION_TYPE_DEAD| + AI_ACTION_TYPE_ASSIST| + AI_ACTION_TYPE_KILL| + AI_ACTION_TYPE_UNLOCK| + AI_ACTION_TYPE_WALKACK| + AI_ACTION_TYPE_WARPACK); return; } @@ -45,7 +54,7 @@ prontera.gat,180,200,4 script Monster Controller 123,{ } if(getarraysize(.ai_action) == 4){ - announce "[Mob Control] AI Action Received from " + .ai_action[AI_ACTION_SRC] + "!",bc_all; + mapannounce "prontera.gat", "[Mob Control] AI Action Received from " + .ai_action[AI_ACTION_SRC] + "!",16; switch(.ai_action[AI_ACTION_TAR_TYPE]){ case AI_ACTION_TAR_TYPE_PC: set .@action_from$, "Player"; @@ -88,9 +97,15 @@ prontera.gat,180,200,4 script Monster Controller 123,{ case AI_ACTION_TYPE_KILL: set .@action_type$, "Killed"; break; + case AI_ACTION_TYPE_WALKACK: + set .@action_type$, "Completed Walking"; + break; + case AI_ACTION_TYPE_WARPACK: + set .@action_type$, "Warped"; + break; } - announce "Details - " + .@action_type$ + " [" + .@action_from$ + "] " + .@action_name$ + "!", bc_all; + mapannounce "prontera.gat", "Details - " + .@action_type$ + " [" + .@action_from$ + "] " + .@action_name$ + "!", 16; deletearray .ai_action, 4; end; } @@ -128,7 +143,7 @@ L_MainMenu: } L_AttackMenu: - switch(select("Walk","Follow","Attack","Stop","Defend","Talk","Emote","Random Walk","Back")){ + switch(select("Walk","Follow","Attack","Stop","Defend","Talk","Emote","Random Walk","Callback","Back")){ case 1: // Walk set .@src, make_menu(); input .@x; @@ -169,6 +184,11 @@ L_AttackMenu: input .@flag; mobrandomwalk .@src, .@flag; break; + case 9: + set .@src, make_menu(); + input .@flag; + setmobdata .@src, 25, .@flag; + break; case 9: next; goto L_MainMenu; -- cgit v1.2.3-70-g09d2