Jump to content
  • 1

show viewpoint on minimap upon traps triggered by victim.


Hanashi

Question


  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  113
  • Reputation:   40
  • Joined:  10/23/13
  • Last Seen:  

how to check if player(x) use a skid trap and get the location of player(y) that got hit by a skid trap and show  location(viewpoint) of player(y) to player(x) who set the trap?

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 1

  • Group:  Developer
  • Topic Count:  153
  • Topics Per Day:  0.04
  • Content Count:  2285
  • Reputation:   745
  • Joined:  06/16/12
  • Last Seen:  

try this maybe

 src/map/skill.c | 10 ++++++++++
 src/map/skill.h |  1 +
 2 files changed, 11 insertions(+)

diff --git a/src/map/skill.c b/src/map/skill.c
index db8cc49..23c3a4c 100755
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -13500,6 +13500,7 @@ int skill_unit_onplace_timer(struct skill_unit *unit, struct block_list *bl, uns
 				sg->limit=DIFF_TICK(tick,sg->tick)+1500;
 				//Target will be stopped for 3 seconds
 				sc_start(ss,bl,SC_STOP,100,0,skill_get_time2(sg->skill_id,sg->skill_lv));
+				skill_someoneStepOnMyTrap(ss, bl);
 			}
 			break;
 
@@ -21184,6 +21185,15 @@ static void skill_db_destroy(void) {
 	skill_db = NULL;
 }
 
+void skill_someoneStepOnMyTrap(struct block_list *src, struct block_list *bl) {
+	if (!bl || !src)
+		return;
+	if (src == bl || src->type != BL_PC || src->m != bl->m)
+		return;
+	/* clif_viewpoint need id, and it's bad! */
+	clif_viewpoint(BL_CAST(BL_PC, src), src->id, 0, bl->x, bl-> y, rnd()%255, 0xFF0000);
+}
+
 /*===============================
  * DB reading.
  * skill_db.txt
diff --git a/src/map/skill.h b/src/map/skill.h
index a5df73b..df669d8 100644
--- a/src/map/skill.h
+++ b/src/map/skill.h
@@ -2135,6 +2135,7 @@ void skill_combo_toogle_inf(struct block_list* bl, uint16 skill_id, int inf);
 void skill_combo(struct block_list* src,struct block_list *dsrc, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int tick);
 
 void skill_reveal_trap_inarea(struct block_list *src, int range, int x, int y);
+void skill_someoneStepOnMyTrap(struct block_list *src, struct block_list *bl);
 
 #ifdef ADJUST_SKILL_DAMAGE
 /// Skill Damage target

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  42
  • Topics Per Day:  0.01
  • Content Count:  113
  • Reputation:   40
  • Joined:  10/23/13
  • Last Seen:  

thanks @Cydh /kis

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   261
  • Joined:  04/25/12
  • Last Seen:  

Nice one

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
Answer this question...

×   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...