summaryrefslogtreecommitdiff
path: root/src/map/mob.c
diff options
context:
space:
mode:
authorLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 11:58:13 +0000
committerLance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec>2006-05-26 11:58:13 +0000
commit2024273648858ab009892ee38e780a835a6bd4dc (patch)
treee4b575172b0539bef0c925e41a4e9e3ca4a5f202 /src/map/mob.c
parent8f7a18236bc8ad7642cd1b9adf7b484e05b17e24 (diff)
downloadhercules-2024273648858ab009892ee38e780a835a6bd4dc.tar.gz
hercules-2024273648858ab009892ee38e780a835a6bd4dc.tar.bz2
hercules-2024273648858ab009892ee38e780a835a6bd4dc.tar.xz
hercules-2024273648858ab009892ee38e780a835a6bd4dc.zip
Added a few more events in..
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@6776 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/mob.c')
-rw-r--r--src/map/mob.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/map/mob.c b/src/map/mob.c
index 7761e3db9..efa632ef9 100644
--- a/src/map/mob.c
+++ b/src/map/mob.c
@@ -972,6 +972,13 @@ static int mob_ai_sub_hard_slavemob(struct mob_data *md,unsigned int tick)
tbl = NULL;
}
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->min_chase=md->db->range3+distance_bl(&md->bl, tbl);
if(md->min_chase>MAX_MINCHASE)
@@ -2153,10 +2160,15 @@ int mob_damage(struct block_list *src,struct mob_data *md,int damage,int type)
guild_agit_break(md);
}
- // SCRIPTˇĄ¨s
- if(md->npc_event[0]){
-// if(battle_config.battle_log)
-// printf("mob_damage : run event : %s\n",md->npc_event);
+ if(md->nd){
+ 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)
+ // printf("mob_damage : run event : %s\n",md->npc_event);
if(src && src->type == BL_PET)
sd = ((struct pet_data *)src)->msd;
if(sd && battle_config.mob_npc_event_type)