summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-16 15:17:04 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-06-16 15:17:04 +0000
commit07b78e2a410adde4767805ece549b4840b9ba254 (patch)
tree86b1c32a7ef3c4000ae473a0c2d4d5bd7bfdf42e
parent1c77fae514c9a0c9971de96830d3450b48a6cdc7 (diff)
downloadhercules-07b78e2a410adde4767805ece549b4840b9ba254.tar.gz
hercules-07b78e2a410adde4767805ece549b4840b9ba254.tar.bz2
hercules-07b78e2a410adde4767805ece549b4840b9ba254.tar.xz
hercules-07b78e2a410adde4767805ece549b4840b9ba254.zip
* 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
-rw-r--r--npc/Changelog.txt1
-rw-r--r--npc/sample/monster_controller.cpp26
2 files changed, 24 insertions, 3 deletions
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;
@@ -170,6 +185,11 @@ L_AttackMenu:
mobrandomwalk .@src, .@flag;
break;
case 9:
+ set .@src, make_menu();
+ input .@flag;
+ setmobdata .@src, 25, .@flag;
+ break;
+ case 9:
next;
goto L_MainMenu;
}