Jump to content

Critical hit on Magic [2]


goddameit

Recommended Posts


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

alright here's the fix.

change:

if ( src->type == BL_PC || battle_get_master(src)->type == BL_PC )

to

if ( (src->type == BL_PC || battle_get_master(src)->type == BL_PC) && skillid != NPC_EARTHQUAKE )
Edited by Dissidia
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  60
  • Topics Per Day:  0.01
  • Content Count:  562
  • Reputation:   217
  • Joined:  11/22/11
  • Last Seen:  

I will fix it later.

(studying)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  155
  • Topics Per Day:  0.03
  • Content Count:  535
  • Reputation:   23
  • Joined:  11/19/11
  • Last Seen:  

stone curse + crimson rock = map server crash (max damage)

and

monster "mapname",96,87,"White Lady",1630,1,"HidNpc::OnColoMVPdead_23" (double the spawn of monster if crit is work)

Edited by Dissidia
Link to comment
Share on other sites

  • 4 weeks later...

  • Group:  Members
  • Topic Count:  37
  • Topics Per Day:  0.01
  • Content Count:  177
  • Reputation:   9
  • Joined:  06/25/12
  • Last Seen:  

Server crashes when i'm pking people. I'm using latest revision

Link to comment
Share on other sites

  • 2 weeks later...

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  102
  • Reputation:   4
  • Joined:  12/05/11
  • Last Seen:  

skill.c: In function âskill_attackâ:

skill.c:2561: error: ânumâ undeclared (first use in this function)

skill.c:2561: error: (Each undeclared identifier is reported only once

skill.c:2561: error: for each function it appears in.)

skill.c:2561: error: âskillidâ undeclared (first use in this function)

skill.c:2561: error: âskilllvâ undeclared (first use in this function)

skill.c:2561: error: â_damageâ undeclared (first use in this function)

got error on this code

   int i=0,num=abs(skill_get_num(skillid,skilllv)),_damage=0;

Using Latest SVN......

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  95
  • Reputation:   0
  • Joined:  12/23/12
  • Last Seen:  

got error when i patch it

160zv2b.jpg

Link to comment
Share on other sites

  • 1 month later...

  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  26
  • Reputation:   0
  • Joined:  02/09/13
  • Last Seen:  

error: 'skillid' & 'skillv' - undeclared identifier    

 

@line:    2561,2567,2572,2582

 

Latest revision
Link to comment
Share on other sites

  • 4 months later...

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  82
  • Reputation:   1
  • Joined:  04/30/13
  • Last Seen:  

Hello, which do I comment out so the script only crits on magic again and not other damage skills?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  296
  • Reputation:   2
  • Joined:  04/11/13
  • Last Seen:  

is there anyway that can make this into an item script?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  2
  • Topics Per Day:  0.00
  • Content Count:  6
  • Reputation:   0
  • Joined:  07/24/13
  • Last Seen:  

Hey my mob created from @monster did not die due to the crit.

 

Tested: with crit and non-crit.

 

Non crit mob decayed.

Crit mob doesn't when u move out of sight and walk back.

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  57
  • Topics Per Day:  0.01
  • Content Count:  374
  • Reputation:   5
  • Joined:  03/09/12
  • Last Seen:  

Rejected patch
 

--- src/map/skill.h
+++ src/map/skill.h
@@ -21,7 +21,8 @@
 #define MAX_SKILL_IMPROVISE_DB 50
 
 #define MAX_SKILL_LEVEL 100
-
+int skill_mcri_hit(int tid, unsigned int tick, int _damage, intptr_t data);
+int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data);
 //Constants to identify the skill's inf value:
 enum e_skill_inf
 {
 

 

 

Link to comment
Share on other sites

  • 3 years later...

  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

I tryed to use it, but show me erros.

 

Gravidade    Código    Descrição    Projeto    Arquivo    Linha    Estado de Supressão
Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3457    
Erro    C2198    'clif_damage': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3030    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3450    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3451    
Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3456    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    
 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

23 minutes ago, estoudegreve said:

I tryed to use it, but show me erros.

Gravidade    Código    Descrição    Projeto    Arquivo    Linha    Estado de Supressão
Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3457    
Erro    C2198    'clif_damage': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3030    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3450    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3451    
Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3456    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    
 

try skill_id & skill_lv

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

On 20/08/2017 at 10:24 PM, Bringer said:

try skill_id & skill_lv

where i put it/?

 

Index: src/map/mob.h
===================================================================
--- src/map/mob.h	(revision 16936)
+++ src/map/mob.h	(working copy)
@@ -123,6 +123,7 @@
 	struct block_list bl;
 	struct unit_data  ud;
 	struct view_data *vd;
+	struct tmp_data tmpd;
 	struct status_data status, *base_status; //Second one is in case of leveling up mobs, or tiny/large mobs.
 	struct status_change sc;
 	struct mob_db *db;	//For quick data access (saves doing mob_db(md->class_) all the time) [Skotlex]
Index: src/map/pc.h
===================================================================
--- src/map/pc.h	(revision 16936)
+++ src/map/pc.h	(working copy)
@@ -91,6 +91,7 @@
 	struct block_list bl;
 	struct unit_data ud;
 	struct view_data vd;
+	struct tmp_data tmpd;
 	struct status_data base_status, battle_status;
 	struct status_change sc;
 	struct regen_data regen;
Index: src/map/skill.c
===================================================================
--- src/map/skill.c	(revision 16936)
+++ src/map/skill.c	(working copy)
@@ -2110,7 +2110,38 @@
 
 	return 0;
 }
-
+int skill_mcri_hit(int tid, unsigned int tick, int id, intptr_t data)
+{
+	struct mob_data *md = (struct mob_data *)data;
+	struct tmp_data *tmpd;
+	tmpd = &md->tmpd;
+	if(tmpd!=NULL)
+	{
+	switch(1) // 1 = red ; 2 = blue
+	{
+	case 1:
+		clif_damage(tmpd->src, tmpd->bl, gettick(), 1, 1, id, 0, 10, 0);
+		break;
+	case 2:
+		clif_skill_damage(tmpd->src,tmpd->bl,gettick(), 1, 1, id, 0, TK_STORMKICK, 1, 8);
+		clif_skill_nodamage(tmpd->src,tmpd->src,tmpd->num[0],tmpd->num[1],1);
+		break;
+	}
+	}
+	return 0;
+}
+int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data)
+{
+	struct block_list *bl = map_id2bl(id);
+	struct block_list *src = (struct block_list *)data;
+	struct mob_data *md = BL_CAST(BL_MOB, bl);
+	if(bl!=NULL)
+	{
+		mob_dead(md,src,0);
+		status_kill(bl);
+	}
+	return 0;
+}
 /*
  * =========================================================================
  * Does a skill attack with the given properties.
@@ -2449,6 +2480,48 @@
 	default:
 		if( flag&SD_ANIMATION && dmg.div_ < 2 ) //Disabling skill animation doesn't works on multi-hit.
 			type = 5;
+		//m_cri
+		if ( src->type == BL_PC || battle_get_master(src)->type == BL_PC )
+		{
+			char m_cri = 0;
+			if(sd==NULL)
+				m_cri = cap_value(map_id2sd(battle_get_master(src)->id)->battle_status.cri/10,1,100);
+			else
+				m_cri = cap_value(sd->battle_status.cri/10,1,100);
+			if( rand()%100 < m_cri )
+			{
+				struct mob_data *md=NULL;
+				struct tmp_data *tmpd=NULL;
+				int d_ = 200;
+				unsigned int u_ = 0;
+				int i=0, num=abs(skill_get_num(skillid,skilllv)), _damage=0;
+				damage *= 2;				
+				md = mob_once_spawn_sub(src, src->m, src->x, src->y, "--en--",1083,"", SZ_SMALL, AI_NONE);
+				md->deletetimer=add_timer(tick+d_*num+1,mob_timer_delete,md->bl.id,0);
+				status_set_viewdata(&md->bl, INVISIBLE_CLASS);
+				tmpd = &md->tmpd;				
+				if(skill_get_splash(skillid,skilllv)>1&&num>1)
+					num = 1;
+				_damage = damage/num;
+				tmpd->src = src;
+				tmpd->bl = bl;
+				tmpd->num[0]=skillid;
+				tmpd->num[1]=skilllv;
+				u_ = tick+d_*num+1;
+				if( tstatus->hp <= damage )//delay to kill it
+				{
+					damage = 1;
+					status_change_start(bl, SC_BLADESTOP_WAIT, 10000, 1, 0, 0, 0, u_, 2);
+					status_change_start(bl, SC_INVINCIBLE, 10000, 1, 0, 0, 0, u_, 2);
+					add_timer(u_,skill_mcri_kill_delay,bl->id,(intptr_t)src);
+				}
+				clif_skill_nodamage(src,src,skillid,skilllv,1);
+				for(i=0;i<num;i++)
+					add_timer(tick+d_*i +1,skill_mcri_hit,_damage,(intptr_t)md);
+				u_ = d_ = _damage = 0;
+				break;
+			}
+		}
 		if( bl->type == BL_SKILL ){
 			TBL_SKILL *su = (TBL_SKILL*)bl;
 			if( su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP )// show damage on trap targets
Index: src/map/skill.h
===================================================================
--- src/map/skill.h	(revision 16936)
+++ src/map/skill.h	(working copy)
@@ -21,7 +21,8 @@
 #define MAX_SKILL_IMPROVISE_DB 50
 
 #define MAX_SKILL_LEVEL 100
-
+int skill_mcri_hit(int tid, unsigned int tick, int _damage, intptr_t data);
+int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data);
 //Constants to identify the skill's inf value:
 enum e_skill_inf
 {
Index: src/map/unit.h
===================================================================
--- src/map/unit.h	(revision 16936)
+++ src/map/unit.h	(working copy)
@@ -13,7 +13,11 @@
 #include "map.h" // struct block_list
 #include "path.h" // struct walkpath_data
 #include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset
-
+struct tmp_data {
+	struct block_list *src;
+	struct block_list *bl;
+	int num[2];
+};
 struct unit_data {
 	struct block_list *bl;
 	struct walkpath_data walkpath;

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  737
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

On 8/23/2017 at 6:45 AM, estoudegreve said:

where i put it/?

 


Index: src/map/mob.h
===================================================================
--- src/map/mob.h	(revision 16936)
+++ src/map/mob.h	(working copy)
@@ -123,6 +123,7 @@
 	struct block_list bl;
 	struct unit_data  ud;
 	struct view_data *vd;
+	struct tmp_data tmpd;
 	struct status_data status, *base_status; //Second one is in case of leveling up mobs, or tiny/large mobs.
 	struct status_change sc;
 	struct mob_db *db;	//For quick data access (saves doing mob_db(md->class_) all the time) [Skotlex]
Index: src/map/pc.h
===================================================================
--- src/map/pc.h	(revision 16936)
+++ src/map/pc.h	(working copy)
@@ -91,6 +91,7 @@
 	struct block_list bl;
 	struct unit_data ud;
 	struct view_data vd;
+	struct tmp_data tmpd;
 	struct status_data base_status, battle_status;
 	struct status_change sc;
 	struct regen_data regen;
Index: src/map/skill.c
===================================================================
--- src/map/skill.c	(revision 16936)
+++ src/map/skill.c	(working copy)
@@ -2110,7 +2110,38 @@
 
 	return 0;
 }
-
+int skill_mcri_hit(int tid, unsigned int tick, int id, intptr_t data)
+{
+	struct mob_data *md = (struct mob_data *)data;
+	struct tmp_data *tmpd;
+	tmpd = &md->tmpd;
+	if(tmpd!=NULL)
+	{
+	switch(1) // 1 = red ; 2 = blue
+	{
+	case 1:
+		clif_damage(tmpd->src, tmpd->bl, gettick(), 1, 1, id, 0, 10, 0);
+		break;
+	case 2:
+		clif_skill_damage(tmpd->src,tmpd->bl,gettick(), 1, 1, id, 0, TK_STORMKICK, 1, 8);
+		clif_skill_nodamage(tmpd->src,tmpd->src,tmpd->num[0],tmpd->num[1],1);
+		break;
+	}
+	}
+	return 0;
+}
+int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data)
+{
+	struct block_list *bl = map_id2bl(id);
+	struct block_list *src = (struct block_list *)data;
+	struct mob_data *md = BL_CAST(BL_MOB, bl);
+	if(bl!=NULL)
+	{
+		mob_dead(md,src,0);
+		status_kill(bl);
+	}
+	return 0;
+}
 /*
  * =========================================================================
  * Does a skill attack with the given properties.
@@ -2449,6 +2480,48 @@
 	default:
 		if( flag&SD_ANIMATION && dmg.div_ < 2 ) //Disabling skill animation doesn't works on multi-hit.
 			type = 5;
+		//m_cri
+		if ( src->type == BL_PC || battle_get_master(src)->type == BL_PC )
+		{
+			char m_cri = 0;
+			if(sd==NULL)
+				m_cri = cap_value(map_id2sd(battle_get_master(src)->id)->battle_status.cri/10,1,100);
+			else
+				m_cri = cap_value(sd->battle_status.cri/10,1,100);
+			if( rand()%100 < m_cri )
+			{
+				struct mob_data *md=NULL;
+				struct tmp_data *tmpd=NULL;
+				int d_ = 200;
+				unsigned int u_ = 0;
+				int i=0, num=abs(skill_get_num(skillid,skilllv)), _damage=0;
+				damage *= 2;				
+				md = mob_once_spawn_sub(src, src->m, src->x, src->y, "--en--",1083,"", SZ_SMALL, AI_NONE);
+				md->deletetimer=add_timer(tick+d_*num+1,mob_timer_delete,md->bl.id,0);
+				status_set_viewdata(&md->bl, INVISIBLE_CLASS);
+				tmpd = &md->tmpd;				
+				if(skill_get_splash(skillid,skilllv)>1&&num>1)
+					num = 1;
+				_damage = damage/num;
+				tmpd->src = src;
+				tmpd->bl = bl;
+				tmpd->num[0]=skillid;
+				tmpd->num[1]=skilllv;
+				u_ = tick+d_*num+1;
+				if( tstatus->hp <= damage )//delay to kill it
+				{
+					damage = 1;
+					status_change_start(bl, SC_BLADESTOP_WAIT, 10000, 1, 0, 0, 0, u_, 2);
+					status_change_start(bl, SC_INVINCIBLE, 10000, 1, 0, 0, 0, u_, 2);
+					add_timer(u_,skill_mcri_kill_delay,bl->id,(intptr_t)src);
+				}
+				clif_skill_nodamage(src,src,skillid,skilllv,1);
+				for(i=0;i<num;i++)
+					add_timer(tick+d_*i +1,skill_mcri_hit,_damage,(intptr_t)md);
+				u_ = d_ = _damage = 0;
+				break;
+			}
+		}
 		if( bl->type == BL_SKILL ){
 			TBL_SKILL *su = (TBL_SKILL*)bl;
 			if( su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP )// show damage on trap targets
Index: src/map/skill.h
===================================================================
--- src/map/skill.h	(revision 16936)
+++ src/map/skill.h	(working copy)
@@ -21,7 +21,8 @@
 #define MAX_SKILL_IMPROVISE_DB 50
 
 #define MAX_SKILL_LEVEL 100
-
+int skill_mcri_hit(int tid, unsigned int tick, int _damage, intptr_t data);
+int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data);
 //Constants to identify the skill's inf value:
 enum e_skill_inf
 {
Index: src/map/unit.h
===================================================================
--- src/map/unit.h	(revision 16936)
+++ src/map/unit.h	(working copy)
@@ -13,7 +13,11 @@
 #include "map.h" // struct block_list
 #include "path.h" // struct walkpath_data
 #include "skill.h" // struct skill_timerskill, struct skill_unit_group, struct skill_unit_group_tickset
-
+struct tmp_data {
+	struct block_list *src;
+	struct block_list *bl;
+	int num[2];
+};
 struct unit_data {
 	struct block_list *bl;
 	struct walkpath_data walkpath;

 

check your recompile error skilllv and skilllvid

on Skill.c Find all that and change to skill_id skill_lv

Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3457    
Erro    C2198    'clif_damage': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3030    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3439    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3445    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3450    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3451    
Erro    C2198    'status_change_start': poucos argumentos para chamada    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3456    
Erro    C2065    'skillid': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    
Erro    C2065    'skilllv': identificador não declarado    map-server    d:\servidor\emulador\rathena\src\map\skill.c    3460    

Index: src/map/skill.c
===================================================================
--- src/map/skill.c	(revision 16936)
+++ src/map/skill.c	(working copy)
@@ -2110,7 +2110,38 @@
 
 	return 0;
 }
-
+int skill_mcri_hit(int tid, unsigned int tick, int id, intptr_t data)
+{
+	struct mob_data *md = (struct mob_data *)data;
+	struct tmp_data *tmpd;
+	tmpd = &md->tmpd;
+	if(tmpd!=NULL)
+	{
+	switch(1) // 1 = red ; 2 = blue
+	{
+	case 1:
+		clif_damage(tmpd->src, tmpd->bl, gettick(), 1, 1, id, 0, 10, 0);
+		break;
+	case 2:
+		clif_skill_damage(tmpd->src,tmpd->bl,gettick(), 1, 1, id, 0, TK_STORMKICK, 1, 8);
+		clif_skill_nodamage(tmpd->src,tmpd->src,tmpd->num[0],tmpd->num[1],1);
+		break;
+	}
+	}
+	return 0;
+}
+int skill_mcri_kill_delay(int tid, unsigned int tick, int id, intptr_t data)
+{
+	struct block_list *bl = map_id2bl(id);
+	struct block_list *src = (struct block_list *)data;
+	struct mob_data *md = BL_CAST(BL_MOB, bl);
+	if(bl!=NULL)
+	{
+		mob_dead(md,src,0);
+		status_kill(bl);
+	}
+	return 0;
+}
 /*
  * =========================================================================
  * Does a skill attack with the given properties.
@@ -2449,6 +2480,48 @@
 	default:
 		if( flag&SD_ANIMATION && dmg.div_ < 2 ) //Disabling skill animation doesn't works on multi-hit.
 			type = 5;
+		//m_cri
+		if ( src->type == BL_PC || battle_get_master(src)->type == BL_PC )
+		{
+			char m_cri = 0;
+			if(sd==NULL)
+				m_cri = cap_value(map_id2sd(battle_get_master(src)->id)->battle_status.cri/10,1,100);
+			else
+				m_cri = cap_value(sd->battle_status.cri/10,1,100);
+			if( rand()%100 < m_cri )
+			{
+				struct mob_data *md=NULL;
+				struct tmp_data *tmpd=NULL;
+				int d_ = 200;
+				unsigned int u_ = 0;
+				int i=0, num=abs(skill_get_num(skillid,skilllv)), _damage=0;
+				damage *= 2;				
+				md = mob_once_spawn_sub(src, src->m, src->x, src->y, "--en--",1083,"", SZ_SMALL, AI_NONE);
+				md->deletetimer=add_timer(tick+d_*num+1,mob_timer_delete,md->bl.id,0);
+				status_set_viewdata(&md->bl, INVISIBLE_CLASS);
+				tmpd = &md->tmpd;				
+				if(skill_get_splash(skillid,skilllv)>1&&num>1)
+					num = 1;
+				_damage = damage/num;
+				tmpd->src = src;
+				tmpd->bl = bl;
+				tmpd->num[0]=skillid;
+				tmpd->num[1]=skilllv;
+				u_ = tick+d_*num+1;
+				if( tstatus->hp <= damage )//delay to kill it
+				{
+					damage = 1;
+					status_change_start(bl, SC_BLADESTOP_WAIT, 10000, 1, 0, 0, 0, u_, 2);
+					status_change_start(bl, SC_INVINCIBLE, 10000, 1, 0, 0, 0, u_, 2);
+					add_timer(u_,skill_mcri_kill_delay,bl->id,(intptr_t)src);
+				}
+				clif_skill_nodamage(src,src,skillid,skilllv,1);
+				for(i=0;i<num;i++)
+					add_timer(tick+d_*i +1,skill_mcri_hit,_damage,(intptr_t)md);
+				u_ = d_ = _damage = 0;
+				break;
+			}
+		}
 		if( bl->type == BL_SKILL ){
 			TBL_SKILL *su = (TBL_SKILL*)bl;
 			if( su->group && skill_get_inf2(su->group->skill_id)&INF2_TRAP )// show damage on trap targets

 

Link to comment
Share on other sites

  • 4 months later...

  • Group:  Members
  • Topic Count:  84
  • Topics Per Day:  0.02
  • Content Count:  309
  • Reputation:   82
  • Joined:  11/15/11
  • Last Seen:  

Update patch please

5>c:\users\renato guedes\downloads\ragnarok\ra\src\map\skill.cpp(3114): error C2660: 'clif_damage': function does not take 9 arguments
5>c:\users\renato guedes\downloads\ragnarok\ra\src\map\skill.cpp(3117): error C2664: 'int clif_skill_damage(block_list *,block_list *,unsigned int,int,int,int64,int,uint16,uint16,e_damage_type)': cannot convert argument 10 from 'int' to 'e_damage_type'
5>  c:\users\renato guedes\downloads\ragnarok\ra\src\map\skill.cpp(3117): note: Conversion to enumeration type requires an explicit cast (static_cast, C-style cast or function-style cast)
5>c:\users\renato guedes\downloads\ragnarok\ra\src\map\skill.cpp(3528): error C2065: 'INVISIBLE_CLASS': undeclared identifier
5>c:\users\renato guedes\downloads\ragnarok\ra\src\map\skill.cpp(3532): warning C4244: '=': conversion from 'int64' to 'int', possible loss of data
5>c:\users\renato guedes\downloads\ragnarok\ra\src\map\skill.cpp(3541): error C2660: 'status_change_start': function does not take 9 arguments
5>c:\users\renato guedes\downloads\ragnarok\ra\src\map\skill.cpp(3542): error C2660: 'status_change_start': function does not take 9 arguments

 

Edited by Popcorn
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  1
  • Topics Per Day:  0.00
  • Content Count:  15
  • Reputation:   0
  • Joined:  09/02/17
  • Last Seen:  

When the mob be killed, and exit from the map, return to this and the same mob appear but with HP 0% and immortal :$

Link to comment
Share on other sites

  • 1 year later...

  • Group:  Members
  • Topic Count:  62
  • Topics Per Day:  0.02
  • Content Count:  217
  • Reputation:   16
  • Joined:  01/28/15
  • Last Seen:  

Hey @goddameit, thanks for this, but is it possible for you to update this to be fully working with latest rAthena?
If so, it would be great!
/thx

Link to comment
Share on other sites

  • 2 months later...

  • Group:  Members
  • Topic Count:  16
  • Topics Per Day:  0.00
  • Content Count:  60
  • Reputation:   3
  • Joined:  01/28/12
  • Last Seen:  

Can you please update this to work on the latest rathena.. 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

On 8/21/2019 at 1:44 AM, Phaige said:

Can you please update this to work on the latest rathena.. 

would be great.
Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  34
  • Topics Per Day:  0.01
  • Content Count:  159
  • Reputation:   58
  • Joined:  07/11/14
  • Last Seen:  

a doubt, is the critic based on luk stats?

Link to comment
Share on other sites

  • 3 weeks later...

  • Group:  Members
  • Topic Count:  12
  • Topics Per Day:  0.01
  • Content Count:  235
  • Reputation:   63
  • Joined:  04/29/19
  • Last Seen:  

On 3/17/2020 at 8:47 AM, FelipeMartins said:

Is it working? 

No... 

This diff is from 2012 lol
I took a look at diff and tried to apply it, but the codes are very different.
Someone needs to update the code, or create a new one.

 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  26
  • Topics Per Day:  0.01
  • Content Count:  174
  • Reputation:   6
  • Joined:  07/01/12
  • Last Seen:  

On 3/19/2020 at 8:54 PM, Gladius said:

No... 

This diff is from 2012 lol
I took a look at diff and tried to apply it, but the codes are very different.
Someone needs to update the code, or create a new one.

 

Do you know a new one? Working in our days?

Link to comment
Share on other sites

  • 5 months later...

  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.02
  • Content Count:  176
  • Reputation:   60
  • Joined:  01/11/19
  • Last Seen:  

If I understand correctly, skills can Crit in the current RAthena, all you need to do to enable it is adding the flag to every skill where you want it. I haven't tried using it yet myself on skills that don't have it by default.

(skill_db.yml)

Quote


DamageFlags: Skill damage properties.

...
Critical        - Skill can critical.

Edited by Seravy
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...