Notorius Posted April 27, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 109 Reputation: 1 Joined: 09/24/19 Last Seen: March 11 Share Posted April 27, 2023 Hello Rathena, I have a question, how do I change the direction of the skill back stab? to work in all directions case RG_BACKSTAP: { if (!check_distance_bl(src, bl, 0)) { #ifdef RENEWAL uint8 dir = map_calc_dir(src, bl->x, bl->y); short x, y; if (dir > 0 && dir < 4) x = -1; else if (dir > 4) x = 1; else x = 0; if (dir > 2 && dir < 6) y = -1; else if (dir == 7 || dir < 2) y = 1; else y = 0; if (battle_check_target(src, bl, BCT_ENEMY) > 0 && unit_movepos(src, bl->x + x, bl->y + y, 2, true)) { // Display movement + animation. #else uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (!map_check_dir(dir, t_dir) || bl->type == BL_SKILL) { #endif status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); #ifdef RENEWAL clif_blown(src); #endif skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } } break; Quote Link to comment Share on other sites More sharing options...
0 LadyNanuia Posted April 27, 2023 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 94 Reputation: 2 Joined: 02/25/19 Last Seen: 17 hours ago Share Posted April 27, 2023 Can you elaborate what you mean? right now you use the skill and it puts you behind the target no matter where you started as far as i know, what exactly is it that you want it to do? Quote Link to comment Share on other sites More sharing options...
0 Notorius Posted April 27, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 109 Reputation: 1 Joined: 09/24/19 Last Seen: March 11 Author Share Posted April 27, 2023 5 hours ago, LadyNanuia said: Can you elaborate what you mean? right now you use the skill and it puts you behind the target no matter where you started as far as i know, what exactly is it that you want it to do? I want the backstab skill to work from all directions without having to be behind its target Quote Link to comment Share on other sites More sharing options...
0 LadyNanuia Posted April 28, 2023 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 94 Reputation: 2 Joined: 02/25/19 Last Seen: 17 hours ago Share Posted April 28, 2023 You dont have to be behind to use it.. Quote Link to comment Share on other sites More sharing options...
0 Notorius Posted April 28, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 109 Reputation: 1 Joined: 09/24/19 Last Seen: March 11 Author Share Posted April 28, 2023 1 hour ago, LadyNanuia said: You dont have to be behind to use it.. I think if it should be behind the target or in the case of my emulator if it should be behind I don't know how to edit it so that it works from any direction Relax-Ro 2023-04-28 01-52-37.mp4 Quote Link to comment Share on other sites More sharing options...
0 LadyNanuia Posted April 28, 2023 Group: Members Topic Count: 19 Topics Per Day: 0.01 Content Count: 94 Reputation: 2 Joined: 02/25/19 Last Seen: 17 hours ago Share Posted April 28, 2023 Update your rA to the latest one. Quote Link to comment Share on other sites More sharing options...
0 joecalis Posted May 1, 2023 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 64 Reputation: 41 Joined: 03/26/12 Last Seen: March 29 Share Posted May 1, 2023 Your server setting might be in Renewal, it's like that by default. If you want to change it Find: case RG_BACKSTAP: { #ifndef RENEWAL uint8 dir = map_calc_dir(src,target->x,target->y), t_dir = unit_getdir(target); if (map_check_dir(dir, t_dir)) return USESKILL_FAIL_MAX; #endif if (check_distance_bl(src, target, 0)) return USESKILL_FAIL_MAX; } break; Change to: case RG_BACKSTAP: { if (check_distance_bl(src, target, 0)) return USESKILL_FAIL_MAX; } break; Quote Link to comment Share on other sites More sharing options...
0 Notorius Posted May 1, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 109 Reputation: 1 Joined: 09/24/19 Last Seen: March 11 Author Share Posted May 1, 2023 6 hours ago, joecalis said: Your server setting might be in Renewal, it's like that by default. If you want to change it Find: case RG_BACKSTAP: { #ifndef RENEWAL uint8 dir = map_calc_dir(src,target->x,target->y), t_dir = unit_getdir(target); if (map_check_dir(dir, t_dir)) return USESKILL_FAIL_MAX; #endif if (check_distance_bl(src, target, 0)) return USESKILL_FAIL_MAX; } break; Change to: case RG_BACKSTAP: { if (check_distance_bl(src, target, 0)) return USESKILL_FAIL_MAX; } break; Hello, my server is pre-renewal and this is the only line that I can find the change for the second one that you sent me? case RG_BACKSTAP: { if (!check_distance_bl(src, bl, 0)) { #ifdef RENEWAL uint8 dir = map_calc_dir(src, bl->x, bl->y); short x, y; if (dir > 0 && dir < 4) x = -1; else if (dir > 4) x = 1; else x = 0; if (dir > 2 && dir < 6) y = -1; else if (dir == 7 || dir < 2) y = 1; else y = 0; if (battle_check_target(src, bl, BCT_ENEMY) > 0 && unit_movepos(src, bl->x + x, bl->y + y, 2, true)) { // Display movement + animation. #else uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (!map_check_dir(dir, t_dir) || bl->type == BL_SKILL) { #endif status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); #ifdef RENEWAL clif_blown(src); #endif skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } } break; Quote Link to comment Share on other sites More sharing options...
0 joecalis Posted May 1, 2023 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 64 Reputation: 41 Joined: 03/26/12 Last Seen: March 29 Share Posted May 1, 2023 Try this: case RG_BACKSTAP: { if (!check_distance_bl(src, bl, 0)) { #ifdef RENEWAL uint8 dir = map_calc_dir(src, bl->x, bl->y); short x, y; if (dir > 0 && dir < 4) x = -1; else if (dir > 4) x = 1; else x = 0; if (dir > 2 && dir < 6) y = -1; else if (dir == 7 || dir < 2) y = 1; else y = 0; if (battle_check_target(src, bl, BCT_ENEMY) > 0 && unit_movepos(src, bl->x + x, bl->y + y, 2, true)) { // Display movement + animation. #else uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (bl->type == BL_SKILL) { // Changed Here (Removed Direction Check) #endif status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); #ifdef RENEWAL clif_blown(src); #endif skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } } break; Quote Link to comment Share on other sites More sharing options...
0 Notorius Posted May 1, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 109 Reputation: 1 Joined: 09/24/19 Last Seen: March 11 Author Share Posted May 1, 2023 9 hours ago, joecalis said: Try this: case RG_BACKSTAP: { if (!check_distance_bl(src, bl, 0)) { #ifdef RENEWAL uint8 dir = map_calc_dir(src, bl->x, bl->y); short x, y; if (dir > 0 && dir < 4) x = -1; else if (dir > 4) x = 1; else x = 0; if (dir > 2 && dir < 6) y = -1; else if (dir == 7 || dir < 2) y = 1; else y = 0; if (battle_check_target(src, bl, BCT_ENEMY) > 0 && unit_movepos(src, bl->x + x, bl->y + y, 2, true)) { // Display movement + animation. #else uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (bl->type == BL_SKILL) { // Changed Here (Removed Direction Check) #endif status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); #ifdef RENEWAL clif_blown(src); #endif skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } } break; it didn't work Quote Link to comment Share on other sites More sharing options...
0 joecalis Posted May 1, 2023 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 64 Reputation: 41 Joined: 03/26/12 Last Seen: March 29 Share Posted May 1, 2023 in your skill.cpp search all the "case RG_BACKSTAP:" copy it all until the "break;" and paste all the codes here, maybe it's checking the direction somewhere else. Quote Link to comment Share on other sites More sharing options...
0 Notorius Posted May 1, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 109 Reputation: 1 Joined: 09/24/19 Last Seen: March 11 Author Share Posted May 1, 2023 5 minutes ago, joecalis said: en tu skill.cpp busca todo el " case RG_BACKSTAP : " copia todo hasta el " break ; " y pega todos los códigos aquí, tal vez esté revisando la dirección en otro lugar. case RG_BACKSTAP: { if (!check_distance_bl(src, bl, 0)) { #ifdef RENEWAL uint8 dir = map_calc_dir(src, bl->x, bl->y); short x, y; if (dir > 0 && dir < 4) x = -1; else if (dir > 4) x = 1; else x = 0; if (dir > 2 && dir < 6) y = -1; else if (dir == 7 || dir < 2) y = 1; else y = 0; if (battle_check_target(src, bl, BCT_ENEMY) > 0 && unit_movepos(src, bl->x + x, bl->y + y, 2, true)) { // Display movement + animation. #else uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (bl->type == BL_SKILL) { // Changed Here (Removed Direction Check) #endif status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); #ifdef RENEWAL clif_blown(src); #endif skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } } break; This is the one that changed but the skill stopped working so I returned it to how it is, that is, like this case RG_BACKSTAP: { if (!check_distance_bl(src, bl, 0)) { #ifdef RENEWAL uint8 dir = map_calc_dir(src, bl->x, bl->y); short x, y; if (dir > 0 && dir < 4) x = -1; else if (dir > 4) x = 1; else x = 0; if (dir > 2 && dir < 6) y = -1; else if (dir == 7 || dir < 2) y = 1; else y = 0; if (battle_check_target(src, bl, BCT_ENEMY) > 0 && unit_movepos(src, bl->x + x, bl->y + y, 2, true)) { // Display movement + animation. #else uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (!map_check_dir(dir, t_dir) || bl->type == BL_SKILL) { #endif status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); #ifdef RENEWAL clif_blown(src); #endif skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } } break; and I have the other one like this but that one did not change anything, it was the first one to change case RG_BACKSTAP: { if (check_distance_bl(src, target, 0)) return USESKILL_FAIL_MAX; } break; Quote Link to comment Share on other sites More sharing options...
0 joecalis Posted May 1, 2023 Group: Members Topic Count: 8 Topics Per Day: 0.00 Content Count: 64 Reputation: 41 Joined: 03/26/12 Last Seen: March 29 Share Posted May 1, 2023 8 minutes ago, Notorius said: This is the one that changed but the skill stopped working so I returned it to how it is, that is, like this case RG_BACKSTAP: { if (!check_distance_bl(src, bl, 0)) { #ifdef RENEWAL uint8 dir = map_calc_dir(src, bl->x, bl->y); short x, y; if (dir > 0 && dir < 4) x = -1; else if (dir > 4) x = 1; else x = 0; if (dir > 2 && dir < 6) y = -1; else if (dir == 7 || dir < 2) y = 1; else y = 0; if (battle_check_target(src, bl, BCT_ENEMY) > 0 && unit_movepos(src, bl->x + x, bl->y + y, 2, true)) { // Display movement + animation. #else uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (!map_check_dir(dir, t_dir) || bl->type == BL_SKILL) { #endif status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); #ifdef RENEWAL clif_blown(src); #endif skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } } break; The one I quoted, replace all of that with this: case RG_BACKSTAP: { uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (!check_distance_bl(src, bl, 0) || bl->type == BL_SKILL) { status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } break; Quote Link to comment Share on other sites More sharing options...
0 Notorius Posted May 16, 2023 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 109 Reputation: 1 Joined: 09/24/19 Last Seen: March 11 Author Share Posted May 16, 2023 On 5/1/2023 at 3:57 PM, joecalis said: The one I quoted, replace all of that with this: case RG_BACKSTAP: { uint8 dir = map_calc_dir(src, bl->x, bl->y), t_dir = unit_getdir(bl); if (!check_distance_bl(src, bl, 0) || bl->type == BL_SKILL) { status_change_end(src, SC_HIDING, INVALID_TIMER); dir = dir < 4 ? dir+4 : dir-4; // change direction [Celest] unit_setdir(bl,dir); skill_attack(BF_WEAPON, src, src, bl, skill_id, skill_lv, tick, flag); } else if (sd) clif_skill_fail(sd,skill_id,USESKILL_FAIL_LEVEL,0); } break; still not working Quote Link to comment Share on other sites More sharing options...
0 blinzer Posted May 23, 2023 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 20 Reputation: 0 Joined: 12/11/14 Last Seen: April 19, 2024 Share Posted May 23, 2023 (edited) i got you. goes without saying, but you have to compile after making these changes Edited May 23, 2023 by blinzer Quote Link to comment Share on other sites More sharing options...
0 shyguy Posted August 27, 2023 Group: Members Topic Count: 1 Topics Per Day: 0.00 Content Count: 2 Reputation: 0 Joined: 08/19/23 Last Seen: July 24, 2024 Share Posted August 27, 2023 Hello @Notorius. Did you get this to work? I have the same issue. Tried to change the code to what @blinzer posted but no luck... Backstab can only be casted behind the target... I even tried using the renewal code on my pre-renewal setup, but no luck. Nothing let's me backstab from the front. If anyone can help would be really happy. I am using the latest build as per today (27.08.23) Thank you!! Quote Link to comment Share on other sites More sharing options...
Question
Notorius
Hello Rathena, I have a question, how do I change the direction of the skill back stab? to work in all directions
Link to comment
Share on other sites
15 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.