summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorjaBote <jaBote@fake-emails-rock.com>2013-05-24 00:55:00 +0200
committerjaBote <jaBote@fake-emails-rock.com>2013-05-24 00:55:00 +0200
commitd0c501816214cd604e7f7efddb8debff03c514e8 (patch)
tree65997ed7e2606a86bb6818002815cc3d45dc49b7 /src/map
parentb0a65ecfe65415414b24c24a41e1a5199d0ed96b (diff)
downloadhercules-d0c501816214cd604e7f7efddb8debff03c514e8.tar.gz
hercules-d0c501816214cd604e7f7efddb8debff03c514e8.tar.bz2
hercules-d0c501816214cd604e7f7efddb8debff03c514e8.tar.xz
hercules-d0c501816214cd604e7f7efddb8debff03c514e8.zip
Edited doc/script_commands.txt:
- Now lines will have up to 75 characters, no more (this does not affect functions or example codes, except most comments). - Some random lines have been shortened up a bit in order to fit wherever possible, in a way that doesn't affect quality of explanation. - Removed any references to past eA/rA revisions, changed SVN references to Git (except in get_revision), and removed most references to past devs of *Athena: this text is informative, not for credits. - Removed any references to TXT servers. - Removed any references to mob control suite. - Improved a bit the part on how to obtain a GID. - Slight improvements on some commands explanations. - Corrected mes script command definition as it can show more than 1 string at once. - Improved set script command to tell the abridged method: a = 7; - Removed reference to an unused parameter (flag) in source, in guildskill script command. - Corrected an error in the rate of autobonus command (100% is 10000, not 1000 as it was before). - Added ways to get a monster's GID through 'monster' and 'areamonster' script commands. - rAthena reference removed in sprintf and sscanf functions. - Please remove cell_basilica references in sercell function if it doesn't work anymore, as said in http://hercules.ws/board/topic/546-how-to-put-safe-zone-on-some-pvp-map/?hl=cell_basilica - Removed "Whew. That's about all of them." at end of the document. Edited src/map/script.c: - Added modification to 'monster' and 'areamonster' to return GID of summoned monster. Signed-off-by: jaBote <jaBote@fake-emails-rock.com>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/script.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 41f8e7472..9a123705b 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -8417,6 +8417,7 @@ BUILDIN(monster)
const char* event = "";
unsigned int size = SZ_SMALL;
unsigned int ai = AI_NONE;
+ int mob_id;
struct map_session_data* sd;
int16 m;
@@ -8470,7 +8471,8 @@ BUILDIN(monster)
}
}
- mob_once_spawn(sd, m, x, y, str, class_, amount, event, size, ai);
+ mob_id = mob_once_spawn(sd, m, x, y, str, class_, amount, event, size, ai);
+ script_pushint(st, mob_id);
return true;
}
/*==========================================
@@ -8524,6 +8526,7 @@ BUILDIN(areamonster)
const char* event = "";
unsigned int size = SZ_SMALL;
unsigned int ai = AI_NONE;
+ int mob_id;
struct map_session_data* sd;
int16 m;
@@ -8571,7 +8574,9 @@ BUILDIN(areamonster)
}
}
- mob_once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, amount, event, size, ai);
+ mob_id = mob_once_spawn_area(sd, m, x0, y0, x1, y1, str, class_, amount, event, size, ai);
+ script_pushint(st, mob_id);
+
return true;
}
/*==========================================