Hanashi Posted November 18, 2016 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 113 Reputation: 40 Joined: 10/23/13 Last Seen: Friday at 03:54 PM Share Posted November 18, 2016 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? Quote Link to comment Share on other sites More sharing options...
1 Cydh Posted November 18, 2016 Group: Developer Topic Count: 153 Topics Per Day: 0.03 Content Count: 2285 Reputation: 748 Joined: 06/16/12 Last Seen: February 21 Share Posted November 18, 2016 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 1 Quote Link to comment Share on other sites More sharing options...
0 Hanashi Posted November 18, 2016 Group: Members Topic Count: 42 Topics Per Day: 0.01 Content Count: 113 Reputation: 40 Joined: 10/23/13 Last Seen: Friday at 03:54 PM Author Share Posted November 18, 2016 thanks @Cydh Quote Link to comment Share on other sites More sharing options...
0 Zell Posted November 21, 2016 Group: Members Topic Count: 53 Topics Per Day: 0.01 Content Count: 412 Reputation: 266 Joined: 04/25/12 Last Seen: Saturday at 11:42 PM Share Posted November 21, 2016 Nice one Quote Link to comment Share on other sites More sharing options...
Question
Hanashi
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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.