summaryrefslogtreecommitdiff
path: root/src/map/script.c
diff options
context:
space:
mode:
authorskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-16 19:30:28 +0000
committerskotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-02-16 19:30:28 +0000
commit6196f0e6d34dba214a1598d7df7ab2f07b860a07 (patch)
treedb3fff0e89fab29becb961f39b968751a78cd6a2 /src/map/script.c
parent8d048f50359a01b56e1224ff8664f0a22ee8821d (diff)
downloadhercules-6196f0e6d34dba214a1598d7df7ab2f07b860a07.tar.gz
hercules-6196f0e6d34dba214a1598d7df7ab2f07b860a07.tar.bz2
hercules-6196f0e6d34dba214a1598d7df7ab2f07b860a07.tar.xz
hercules-6196f0e6d34dba214a1598d7df7ab2f07b860a07.zip
- Modified the "guardian" spawn script command, it no longer receives a "amount" argument (since that only leads to trouble), if the class is negative, it'll pick a random class the same way the monster spawn script command does, and if you pass a spawn position with coordinates equal or less to 0, a random spot in the map will be taken. However you can't use "this" as a map name anymore since these script commands do not need an attached player.
- Guardian spawning will now fail if you attempt to spawn a guardian that already exists on the same position. - Collapsed clif_party_main_info and clif_party_join_info into a single function: clif_party_member_info - Collapsed config settings "sg_miracle_skill_min_duration" and "sg_miracle_skill_max_duration" into "sg_miracle_skill_duration", which defaults to an hour. - Miracle of the Sun, Moon and Stars can now retrigger to lenghten it's effect, and it is cancelled on warp/map-change. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@9871 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/script.c')
-rw-r--r--src/map/script.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/map/script.c b/src/map/script.c
index a211bf73b..e64034276 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -4010,7 +4010,7 @@ struct script_function buildin_func[] = {
BUILDIN_DEF(soundeffect,"si"),
BUILDIN_DEF(soundeffectall,"si*"), // SoundEffectAll [Codemaster]
BUILDIN_DEF(strmobinfo,"ii"), // display mob data [Valaris]
- BUILDIN_DEF(guardian,"siisii??"), // summon guardians
+ BUILDIN_DEF(guardian,"siisi??"), // summon guardians
BUILDIN_DEF(guardianinfo,"i"), // display guardian data [Valaris]
BUILDIN_DEF(petskillbonus,"iiii"), // [Valaris]
BUILDIN_DEF(petrecovery,"ii"), // [Valaris]
@@ -9626,12 +9626,12 @@ BUILDIN_FUNC(strmobinfo)
/*==========================================
* Summon guardians [Valaris]
- * guardian "<map name>",<x>,<y>,"<name to show>",<mob id>,<amount>{,"<event label>"}{,<guardian index>};
+ * guardian "<map name>",<x>,<y>,"<name to show>",<mob id>,{,"<event label>"}{,<guardian index>};
*------------------------------------------
*/
BUILDIN_FUNC(guardian)
{
- int class_=0,amount=1,x=0,y=0,guardian=0;
+ int class_=0,x=0,y=0,guardian=0;
char *str,*map,*evt="";
struct script_data *data;
@@ -9640,21 +9640,20 @@ BUILDIN_FUNC(guardian)
y =conv_num(st,script_getdata(st,4));
str =conv_str(st,script_getdata(st,5));
class_=conv_num(st,script_getdata(st,6));
- amount=conv_num(st,script_getdata(st,7));
- if( script_hasdata(st,9) )
+ if( script_hasdata(st,8) )
{// "<event label>",<guardian index>
- evt=conv_str(st,script_getdata(st,8));
- guardian=conv_num(st,script_getdata(st,9));
- } else if( script_hasdata(st,8) ){
- data=script_getdata(st,8);
+ evt=conv_str(st,script_getdata(st,7));
+ guardian=conv_num(st,script_getdata(st,8));
+ } else if( script_hasdata(st,7) ){
+ data=script_getdata(st,7);
get_val(st,data);
if( data_isstring(data) )
{// "<event label>"
- evt=conv_str(st,script_getdata(st,8));
+ evt=conv_str(st,script_getdata(st,7));
} else if( data_isint(data) )
{// <guardian index>
- guardian=conv_num(st,script_getdata(st,8));
+ guardian=conv_num(st,script_getdata(st,7));
} else {
ShowError("buildin_guardian: invalid data type for argument #8 (%d).", data->type);
report_src(st);
@@ -9663,8 +9662,7 @@ BUILDIN_FUNC(guardian)
}
check_event(st, evt);
-
- mob_spawn_guardian(map_id2sd(st->rid),map,x,y,str,class_,amount,evt,guardian);
+ mob_spawn_guardian(map,x,y,str,class_,evt,guardian);
return 0;
}