Added a few more events in..
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@6776 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
parent
2fcfdbdd46
commit
7e5a2c9c34
@ -708,6 +708,8 @@ AI_ACTION_TAR_TYPE_PET 4
|
|||||||
AI_ACTION_TAR_TYPE_HOMUN 8
|
AI_ACTION_TAR_TYPE_HOMUN 8
|
||||||
AI_ACTION_TYPE_ATTACK 1
|
AI_ACTION_TYPE_ATTACK 1
|
||||||
AI_ACTION_TYPE_DETECT 2
|
AI_ACTION_TYPE_DETECT 2
|
||||||
|
AI_ACTION_TYPE_DEAD 3
|
||||||
|
AI_ACTION_TYPE_ASSIST 4
|
||||||
|
|
||||||
ALL_CLIENT 0
|
ALL_CLIENT 0
|
||||||
ALL_SAMEMAP 1
|
ALL_SAMEMAP 1
|
||||||
|
@ -68,11 +68,17 @@ prontera.gat,180,200,4 script Monster Controller 123,{
|
|||||||
set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
|
set .@action_name$, ""+.ai_action[AI_ACTION_TAR];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(.ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_ATTACK)
|
if(.ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_ATTACK)
|
||||||
set .@action_type$, "attacked by";
|
set .@action_type$, "Attacked by";
|
||||||
|
else if(.ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_DETECT)
|
||||||
|
set .@action_type$, "Detected";
|
||||||
|
else if (.ai_action[AI_ACTION_TYPE] == AI_ACTION_TYPE_ASSIST)
|
||||||
|
set .@action_type$, "Killed by";
|
||||||
else
|
else
|
||||||
set .@action_type$, "detected";
|
set .@action_type$, "Assisting";
|
||||||
announce "Action " + .@action_type$ + " [" + .@action_from$ + "] " + .@action_name$ + "!", bc_all;
|
|
||||||
|
announce "Details - " + .@action_type$ + " [" + .@action_from$ + "] " + .@action_name$ + "!", bc_all;
|
||||||
deletearray .ai_action, 4;
|
deletearray .ai_action, 4;
|
||||||
end;
|
end;
|
||||||
}
|
}
|
||||||
|
@ -972,6 +972,13 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
|
|||||||
tbl = NULL;
|
tbl = NULL;
|
||||||
}
|
}
|
||||||
if (tbl && status_check_skilluse(&md->bl, tbl, 0, 0)) {
|
if (tbl && status_check_skilluse(&md->bl, tbl, 0, 0)) {
|
||||||
|
if(md->nd){
|
||||||
|
setd_sub(NULL, NULL, ".ai_action", 0, (void *)(int)4, &md->nd->u.scr.script->script_vars);
|
||||||
|
setd_sub(NULL, NULL, ".ai_action", 1, (void *)(int)tbl->type, &md->nd->u.scr.script->script_vars);
|
||||||
|
setd_sub(NULL, NULL, ".ai_action", 2, (void *)tbl->id, &md->nd->u.scr.script->script_vars);
|
||||||
|
setd_sub(NULL, NULL, ".ai_action", 3, (void *)md->bl.id, &md->nd->u.scr.script->script_vars);
|
||||||
|
run_script(md->nd->u.scr.script, 0, 0, md->nd->bl.id);
|
||||||
|
}
|
||||||
md->target_id=tbl->id;
|
md->target_id=tbl->id;
|
||||||
md->min_chase=md->db->range3+distance_bl(&md->bl, tbl);
|
md->min_chase=md->db->range3+distance_bl(&md->bl, tbl);
|
||||||
if(md->min_chase>MAX_MINCHASE)
|
if(md->min_chase>MAX_MINCHASE)
|
||||||
@ -2153,8 +2160,13 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
|
|||||||
guild_agit_break(md);
|
guild_agit_break(md);
|
||||||
}
|
}
|
||||||
|
|
||||||
// SCRIPTŽÀ<C5BD>s
|
if(md->nd){
|
||||||
if(md->npc_event[0]){
|
setd_sub(NULL, NULL, ".ai_action", 0, (void *)(int)3, &md->nd->u.scr.script->script_vars);
|
||||||
|
setd_sub(NULL, NULL, ".ai_action", 1, (void *)(int)src->type, &md->nd->u.scr.script->script_vars);
|
||||||
|
setd_sub(NULL, NULL, ".ai_action", 2, (void *)src->id, &md->nd->u.scr.script->script_vars);
|
||||||
|
setd_sub(NULL, NULL, ".ai_action", 3, (void *)md->bl.id, &md->nd->u.scr.script->script_vars);
|
||||||
|
run_script(md->nd->u.scr.script, 0, 0, md->nd->bl.id);
|
||||||
|
} else if(md->npc_event[0]){
|
||||||
// if(battle_config.battle_log)
|
// if(battle_config.battle_log)
|
||||||
// printf("mob_damage : run event : %s\n",md->npc_event);
|
// printf("mob_damage : run event : %s\n",md->npc_event);
|
||||||
if(src && src->type == BL_PET)
|
if(src && src->type == BL_PET)
|
||||||
|
@ -10322,11 +10322,12 @@ int buildin_rid2name(struct script_state *st){
|
|||||||
}
|
}
|
||||||
|
|
||||||
int buildin_pcwalkxy(struct script_state *st){
|
int buildin_pcwalkxy(struct script_state *st){
|
||||||
int id, x, y;
|
int id, x, y = 0;
|
||||||
struct map_session_data *sd = NULL;
|
struct map_session_data *sd = NULL;
|
||||||
|
|
||||||
id = conv_num(st, & (st->stack->stack_data[st->start + 2]));
|
id = conv_num(st, & (st->stack->stack_data[st->start + 2]));
|
||||||
x = conv_num(st, & (st->stack->stack_data[st->start + 3]));
|
x = conv_num(st, & (st->stack->stack_data[st->start + 3]));
|
||||||
|
if(st->end > st->start + 4)
|
||||||
y = conv_num(st, & (st->stack->stack_data[st->start + 4]));
|
y = conv_num(st, & (st->stack->stack_data[st->start + 4]));
|
||||||
|
|
||||||
if(id)
|
if(id)
|
||||||
@ -10334,8 +10335,12 @@ int buildin_pcwalkxy(struct script_state *st){
|
|||||||
else
|
else
|
||||||
sd = script_rid2sd(st);
|
sd = script_rid2sd(st);
|
||||||
|
|
||||||
if(sd)
|
if(sd){
|
||||||
|
if(y)
|
||||||
unit_walktoxy(&sd->bl, x, y, 0);
|
unit_walktoxy(&sd->bl, x, y, 0);
|
||||||
|
else
|
||||||
|
unit_walktobl(&sd->bl, map_id2bl(x), 65535, 1);
|
||||||
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user