* Added 'summon' script command
* Added Wallex's fix for script.c git-svn-id: https://svn.code.sf.net/p/rathena/svn/branches/stable@935 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
a0d8292adc
commit
0fa3848f60
@ -1,5 +1,15 @@
|
|||||||
Date Added
|
Date Added
|
||||||
01/07
|
01/07
|
||||||
|
* Added 'summon' script command. Syntax:
|
||||||
|
|
||||||
|
summon <monster name>,<monster id>[,<event>];
|
||||||
|
|
||||||
|
Example: 'summon "Poring", 1002, "OnPoringKilled"; 'will summon (note:
|
||||||
|
not *spawn*) 1 poring that'll help its master for 1 minute,
|
||||||
|
and activate the "OnPoringKilled" event when killed.
|
||||||
|
'summon "--ja--",-1;' will summon a random monster.
|
||||||
|
|
||||||
|
* Added Wallex's fix for the wedding script functions [celest]
|
||||||
* Added the below-mentioned alive packet to SQL's char and login [celest]
|
* Added the below-mentioned alive packet to SQL's char and login [celest]
|
||||||
* Enabled login server 'anti-freeze' by default as a temporary solution
|
* Enabled login server 'anti-freeze' by default as a temporary solution
|
||||||
to char-login disconnection [celest]
|
to char-login disconnection [celest]
|
||||||
|
@ -299,6 +299,7 @@ int buildin_guildgetexp(struct script_state *st); // [celest]
|
|||||||
int buildin_skilluseid(struct script_state *st); // originally by Qamera [celest]
|
int buildin_skilluseid(struct script_state *st); // originally by Qamera [celest]
|
||||||
int buildin_skillusepos(struct script_state *st); // originally by Qamera [celest]
|
int buildin_skillusepos(struct script_state *st); // originally by Qamera [celest]
|
||||||
int buildin_logmes(struct script_state *st); // [Lupus]
|
int buildin_logmes(struct script_state *st); // [Lupus]
|
||||||
|
int buildin_summon(struct script_state *st); // [celest]
|
||||||
|
|
||||||
void push_val(struct script_stack *stack,int type,int val);
|
void push_val(struct script_stack *stack,int type,int val);
|
||||||
int run_func(struct script_state *st);
|
int run_func(struct script_state *st);
|
||||||
@ -469,9 +470,9 @@ struct {
|
|||||||
{buildin_failedremovecards,"failedremovecards","ii"},
|
{buildin_failedremovecards,"failedremovecards","ii"},
|
||||||
{buildin_marriage,"marriage","s"},
|
{buildin_marriage,"marriage","s"},
|
||||||
{buildin_wedding_effect,"wedding",""},
|
{buildin_wedding_effect,"wedding",""},
|
||||||
{buildin_divorce,"divorce",""},
|
{buildin_divorce,"divorce","*"},
|
||||||
{buildin_ispartneron,"ispartneron",""},
|
{buildin_ispartneron,"ispartneron","*"},
|
||||||
{buildin_getpartnerid,"getpartnerid",""},
|
{buildin_getpartnerid,"getpartnerid","*"},
|
||||||
{buildin_warppartner,"warppartner","sii"},
|
{buildin_warppartner,"warppartner","sii"},
|
||||||
{buildin_getitemname,"getitemname","i"},
|
{buildin_getitemname,"getitemname","i"},
|
||||||
{buildin_makepet,"makepet","i"},
|
{buildin_makepet,"makepet","i"},
|
||||||
@ -519,6 +520,7 @@ struct {
|
|||||||
{buildin_skilluseid,"doskill","ii"}, // since a lot of scripts would already use 'doskill'...
|
{buildin_skilluseid,"doskill","ii"}, // since a lot of scripts would already use 'doskill'...
|
||||||
{buildin_skillusepos,"skillusepos","iiii"}, // [Celest]
|
{buildin_skillusepos,"skillusepos","iiii"}, // [Celest]
|
||||||
{buildin_logmes,"logmes","s"}, //this command actls as MES but prints info into LOG file either SQL/TXT [Lupus]
|
{buildin_logmes,"logmes","s"}, //this command actls as MES but prints info into LOG file either SQL/TXT [Lupus]
|
||||||
|
{buildin_summon,"summon","si*"}, // summons a slave monster [Celest]
|
||||||
{NULL,NULL,NULL},
|
{NULL,NULL,NULL},
|
||||||
};
|
};
|
||||||
int buildin_message(struct script_state *st); // [MouseJstr]
|
int buildin_message(struct script_state *st); // [MouseJstr]
|
||||||
@ -6426,6 +6428,35 @@ int buildin_logmes(struct script_state *st)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int buildin_summon(struct script_state *st)
|
||||||
|
{
|
||||||
|
int class, id;
|
||||||
|
char *str,*event="";
|
||||||
|
struct map_session_data *sd;
|
||||||
|
struct mob_data *md;
|
||||||
|
|
||||||
|
sd=script_rid2sd(st);
|
||||||
|
if (sd) {
|
||||||
|
int tick = gettick();
|
||||||
|
str =conv_str(st,& (st->stack->stack_data[st->start+2]));
|
||||||
|
class=conv_num(st,& (st->stack->stack_data[st->start+3]));
|
||||||
|
if( st->end>st->start+4 )
|
||||||
|
event=conv_str(st,& (st->stack->stack_data[st->start+4]));
|
||||||
|
|
||||||
|
id=mob_once_spawn(sd, "this", 0, 0, str,class,1,event);
|
||||||
|
if((md=(struct mob_data *)map_id2bl(id))){
|
||||||
|
md->master_id=sd->bl.id;
|
||||||
|
md->state.special_mob_ai=1;
|
||||||
|
md->mode=mob_db[md->class_].mode|0x04;
|
||||||
|
md->deletetimer=add_timer(tick+60000,mob_timer_delete,id,0);
|
||||||
|
clif_misceffect2(&md->bl,344);
|
||||||
|
}
|
||||||
|
clif_skill_poseffect(&sd->bl,AM_CALLHOMUN,1,sd->bl.x,sd->bl.y,tick);
|
||||||
|
}
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// ŽÀ<C5BD>s•”main
|
// ŽÀ<C5BD>s•”main
|
||||||
//
|
//
|
||||||
|
Loading…
x
Reference in New Issue
Block a user