From 6196f0e6d34dba214a1598d7df7ab2f07b860a07 Mon Sep 17 00:00:00 2001 From: skotlex Date: Fri, 16 Feb 2007 19:30:28 +0000 Subject: - 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 --- src/map/script.c | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) (limited to 'src/map/script.c') 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 "",,,"",,{,""}{,}; + * guardian "",,,"",,{,""}{,}; *------------------------------------------ */ 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) ) {// "", - 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) ) {// "" - evt=conv_str(st,script_getdata(st,8)); + evt=conv_str(st,script_getdata(st,7)); } else if( data_isint(data) ) {// - 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; } -- cgit v1.2.3-70-g09d2