summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-13 04:03:37 +0000
committerzephyrus <zephyrus@54d463be-8e91-2dee-dedb-b68131a5f0ec>2008-03-13 04:03:37 +0000
commitb87d090446143bfafdc9e801f745edcb16d93767 (patch)
tree27041e48324d79829cdd290b5117cb5220a56cdc /src/map/atcommand.c
parent9f3181501f0d95ffcc37bcb6a816c36362d1b164 (diff)
downloadhercules-b87d090446143bfafdc9e801f745edcb16d93767.tar.gz
hercules-b87d090446143bfafdc9e801f745edcb16d93767.tar.bz2
hercules-b87d090446143bfafdc9e801f745edcb16d93767.tar.xz
hercules-b87d090446143bfafdc9e801f745edcb16d93767.zip
- Added a fix for Abracadabra, this skills allways should use minimum a Yellow Gem.
- Added some code "suggestion" to handle the new Barricades, please test it with: - @barricade <x> <y> <size> <direction> <killable> <Event Name> - @killbarricade <Event Name> - If x and y are -1, it will use your current position. - Direction 0 Vertical 1 Horizontal. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12352 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 702a7550d..7a202d3fd 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -7811,6 +7811,45 @@ int atcommand_showdelay(const int fd, struct map_session_data* sd, const char* c
}
/*==========================================
+ * Barricade Build
+ *------------------------------------------*/
+int atcommand_barricade(const int fd, struct map_session_data* sd, const char* command, const char* message)
+{
+ int x = 0, y = 0, size = 1, killable = 0, dir = 0;
+ char event[50];
+ short result;
+
+ if( !message || !*message || (sscanf(message, "%d %d %d %d %d %50s", &x, &y, &size, &dir, &killable, event) < 6) )
+ {
+ clif_displaymessage(fd, "usage @barricade <x> <y> <size> <dir> <killable> <event>");
+ return -1;
+ }
+
+ if( x == -1 ) x = sd->bl.x;
+ if( y == -1 ) y = sd->bl.y;
+
+ result = mob_barricade_build(sd->bl.m, x, y, size, dir, (bool)killable, event);
+
+ switch( result )
+ {
+ case 0: clif_displaymessage(fd, "Barricade build."); return 0; break;
+ case 1: clif_displaymessage(fd, "Barricade fail. Invalid Size"); break;
+ case 2: clif_displaymessage(fd, "Barricade fail. Wall problem."); break;
+ case 3: clif_displaymessage(fd, "Barricade fail. Invalid Event"); break;
+ case 4: clif_displaymessage(fd, "Barricade fail. Event allready exists"); break;
+ }
+
+ return -1;
+}
+
+int atcommand_barricade_destroy(const int fd, struct map_session_data* sd, const char* command, const char* message)
+{
+ mob_barricade_destroy(sd->bl.m, message);
+
+ return 0;
+}
+
+/*==========================================
* Duel organizing functions [LuzZza]
*
* @duel [limit|nick] - create a duel
@@ -8529,6 +8568,8 @@ AtCommandInfo atcommand_info[] = {
{ "allowks", 6, atcommand_allowks },
{ "cash", 60, atcommand_cash },
{ "points", 60, atcommand_cash },
+ { "barricade", 60, atcommand_barricade },
+ { "killbarricade", 60, atcommand_barricade_destroy },
};