enteedee Posted June 27, 2018 Posted June 27, 2018 Hi! I'm new to this kind of stuff. How do i install this? I have no programming background, sorry. can you give me a step-by-step instruction? Quote
jim00x Posted July 5, 2018 Posted July 5, 2018 (edited) I make it. 2018-06-05bRagexeRE_patched2 2018-07-05 20-54-24-20.bmp 2018-06-05bRagexeRE_patched2 2018-07-05 20-54-28-82.bmp VID_20180705_205659.rar Edited July 5, 2018 by jim00x Quote
daniellim77 Posted September 8, 2018 Posted September 8, 2018 I use Git to install but pop up error message with "The patch does not apply cleanly to D:/.......... and no version information is given. patching is not possible" any one can help me on this? Thanks Quote
FelipeMartins Posted August 25, 2019 Posted August 25, 2019 It can kill the bots, why not let it kill monster in entire map? using @autoloot it will be very good! is it possible? Quote
OscarScorp Posted October 1, 2019 Posted October 1, 2019 How to apply this into newest rAthena? I got this issue when trying to manually implement it: atcommand.cpp: In function 'int autoattack_timer(int, unsigned int, int, intptr_t)': atcommand.cpp:9270:28: error: invalid conversion from 'int (*)(int, unsigned int, int, intptr_t)' {aka int (*)(int, unsigned int, int, long int)'} to 'TimerFunc' {aka 'int (*)(int, long int, int, long int)'} [-fpermissive] add_timer(gettick()+2000,autoattack_timer,sd->bl.id,0); ^~~~~~~~~~~~~~~~ In file included from ../common/mmo.hpp:13, from atcommand.hpp:8, from atcommand.cpp:4: ../common/timer.hpp:54:38: note: initializing argument 2 of 'int add_timer(t_tick, TimerFunc, int, intptr_t)' int add_timer(t_tick tick, TimerFunc func, int id, intptr_t data); Any idea how can it be implemented in latest rAthena? Quote
pukapukay Posted November 1, 2019 Posted November 1, 2019 On 10/28/2019 at 4:55 AM, OscarScorp said: I got this issue when trying to manually implement it: atcommand.cpp: In function 'int autoattack_timer(int, unsigned int, int, intptr_t)': atcommand.cpp:9270:28: error: invalid conversion from 'int (*)(int, unsigned int, int, intptr_t)' {aka int (*)(int, unsigned int, int, long int)'} to 'TimerFunc' {aka 'int (*)(int, long int, int, long int)'} [-fpermissive] add_timer(gettick()+2000,autoattack_timer,sd->bl.id,0); ^~~~~~~~~~~~~~~~ In file included from ../common/mmo.hpp:13, from atcommand.hpp:8, from atcommand.cpp:4: ../common/timer.hpp:54:38: note: initializing argument 2 of 'int add_timer(t_tick, TimerFunc, int, intptr_t)' int add_timer(t_tick tick, TimerFunc func, int id, intptr_t data); Any idea how can it be implemented in latest rAthena? I think it is not possible to latest revision nomore update to this post since 2013 Quote
LearningRO Posted November 2, 2019 Posted November 2, 2019 On 10/28/2019 at 3:55 AM, OscarScorp said: I got this issue when trying to manually implement it: atcommand.cpp: In function 'int autoattack_timer(int, unsigned int, int, intptr_t)': atcommand.cpp:9270:28: error: invalid conversion from 'int (*)(int, unsigned int, int, intptr_t)' {aka int (*)(int, unsigned int, int, long int)'} to 'TimerFunc' {aka 'int (*)(int, long int, int, long int)'} [-fpermissive] add_timer(gettick()+2000,autoattack_timer,sd->bl.id,0); ^~~~~~~~~~~~~~~~ In file included from ../common/mmo.hpp:13, from atcommand.hpp:8, from atcommand.cpp:4: ../common/timer.hpp:54:38: note: initializing argument 2 of 'int add_timer(t_tick, TimerFunc, int, intptr_t)' int add_timer(t_tick tick, TimerFunc func, int id, intptr_t data); Any idea how can it be implemented in latest rAthena? Quote // Auto Attack --- put before all command static int buildin_autoattack_sub(struct block_list *bl,va_list ap) { int *target_id=va_arg(ap,int *); *target_id = bl->id; return 1; } void autoattack_motion(struct map_session_data* sd) { int i, target_id; if( pc_isdead(sd) || !sd->state.autoattack ) return; for(i=0;i<=9;i++) { target_id=0; map_foreachinarea(buildin_autoattack_sub, sd->bl.m, sd->bl.x-i, sd->bl.y-i, sd->bl.x+i, sd->bl.y+i, BL_MOB, &target_id); if(target_id){ unit_attack(&sd->bl,target_id,1); break; } target_id=0; } if(!target_id && !pc_isdead(sd) && sd->state.autoattack){ unit_walktoxy(&sd->bl,sd->bl.x+(rand()%2==0?-1:1)*(rand()%25),sd->bl.y+(rand()%2==0?-1:1)*(rand()%25),0); } return; } static TIMER_FUNC(autoattack_timer) { struct map_session_data *sd=NULL; sd=map_id2sd(id); if(sd==NULL || pc_isdead(sd) || !sd->state.autoattack ) return 0; if(sd->state.autoattack) { unit_stop_attack(&sd->bl); autoattack_motion(sd); if(DIFF_TICK(sd->autoattack_delay,gettick())> 0){ clif_authfail_fd(sd->fd, 15); return 0; } else{ add_timer(gettick()+1000,autoattack_timer,sd->bl.id,0); // 1000 is delay sd->autoattack_delay = gettick() + 1000; // 1000 is delay } } return 0; } ACMD_FUNC(autoattack) { nullpo_retr(-1, sd); if (sd->state.autoattack) { sd->state.autoattack = 0; unit_stop_attack(&sd->bl); clif_displaymessage(fd, "Auto Attack has been deactivated."); } else { sd->state.autoattack = 1; add_timer(gettick()+1000,autoattack_timer,sd->bl.id,0); clif_displaymessage(fd, "Auto Attack activated."); } return 0; } try this 1 Quote
OscarScorp Posted November 5, 2019 Posted November 5, 2019 On 11/1/2019 at 6:14 PM, LearningRO said: try this Thank you @LearningRO ! It works!! Quote
wouter2004 Posted November 5, 2019 Posted November 5, 2019 nice dont forget to put in the variables in the pc.hpp -> struct map_session_data struct map_session_data { struct block_list bl; struct unit_data ud; struct view_data vd; struct status_data base_status, battle_status; struct status_change sc; struct regen_data regen; struct regen_data_sub sregen, ssregen; unsigned int autoattack_delay; // autoattack timer unsigned int killable : 1; unsigned int doridori : 1; unsigned int ignoreAll : 1; unsigned int autoattack : 1; // autoattack unsigned int debug_remove_map : 1; // temporary state to track double remove_map's [FlavioJS] unsigned int buyingstore : 1; unsigned int lesseffect : 1; unsigned int vending : 1; Quote
Muramasa Posted March 13, 2020 Posted March 13, 2020 Compile Error rAthena update new Request a solution urgently Quote
OscarScorp Posted April 25, 2020 Posted April 25, 2020 Hello, back to this old post again. Now I seek to make it so users are able to autoattack a specific monster ID, as JulianChz suggested: On 5/22/2017 at 8:24 AM, JuLiAnChz said: static int buildin_autoattack_sub(struct block_list *bl, va_list ap) { int *target_id = va_arg(ap, int *); *target_id = bl->id; struct mob_data* *md2 = va_arg(ap, struct mob_data* *); *md2 = BL_CAST(BL_MOB, bl); return 1; } void autoattack_motion(struct map_session_data* sd, int mob_id){ int i, target_id; struct mob_data* md2; for (i = 0;i <= 9;i++) { target_id = 0; map_foreachinarea(buildin_autoattack_sub, sd->bl.m, sd->bl.x - i, sd->bl.y - i, sd->bl.x + i, sd->bl.y + i, BL_MOB, &target_id, &md2); if (target_id) { if (mob_id != 0 && mob_id == md2->mob_id) { unit_attack(&sd->bl, target_id, 1); } else if (mob_id == 0) { unit_attack(&sd->bl, target_id, 1); } else { target_id = 0; } break; } target_id = 0; } if (!target_id) { unit_walktoxy(&sd->bl, sd->bl.x + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), sd->bl.y + (rand() % 2 == 0 ? -1 : 1)*(rand() % 10), 0); } return; } int autoattack_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd = NULL; int mob_id = (int *)data; sd = map_id2sd(id); if (sd == NULL) return 0; if (sd->sc.option & OPTION_AUTOATTACK) { autoattack_motion(sd, mob_id); add_timer(gettick() + 1000, autoattack_timer, sd->bl.id, (intptr_t)mob_id); } return 0; } ACMD_FUNC(autoattack) { nullpo_retr(-1, sd); int mob_id = 0; char monster[NAME_LENGTH]; memset(monster, '\0', sizeof(monster)); if (message || *message) { if (sscanf(message, "%23s", monster) > 0) { if ((mob_id = mobdb_searchname(monster)) == 0) mob_id = mobdb_checkid(atoi(monster)); if (mob_id == 0) { clif_displaymessage(fd, msg_txt(sd, 40)); // Invalid monster ID or name. return -1; } } } if (sd->sc.option & OPTION_AUTOATTACK) { sd->sc.option &= ~OPTION_AUTOATTACK; unit_stop_attack(&sd->bl); clif_displaymessage(fd, "Has desactivado AutoAtaque"); } else { sd->sc.option |= OPTION_AUTOATTACK; add_timer(gettick() + 200, autoattack_timer, sd->bl.id, (intptr_t)mob_id); clif_displaymessage(fd, "Has Activado AutoAtaque"); } clif_changeoption(&sd->bl); return 0; } @autoattack - All @autoattack poring - Only poring @autoattack 1002 - Only poring Problem is I can't make it work due to two different lines. My basic autoattack command (without specific mob ID) works like: static TIMER_FUNC(autoattack_timer) { struct map_session_data *sd=NULL; int mob_id = data; sd=map_id2sd(id); ... while Julian's is: int autoattack_timer(int tid, unsigned int tick, int id, intptr_t data) { struct map_session_data *sd = NULL; int mob_id = (int *)data; sd = map_id2sd(id); ... If I change my code to int autoattack_timer(int tid, unsigned int tick, int id, intptr_t data), the code won't run in my rAthena, forcing me to use TIMER_FUNC as LearningRO suggested (works). Is there any way to obtain the intptr_t data variable through a static TIMER_FUNC ? Thanks in advance! Quote
Psyche Posted April 28, 2020 Posted April 28, 2020 Hello, Is there any possibilities for using @autoattack like @autotrade? Players will be logged out but character still on game and doing autoattack. I've tried to put state.autotrade = 1; but the result was the character didn't walking for monsters. So, is there a code/variable to make the client only logged out but character still on the game? Quote
PapaZola Posted June 4, 2020 Posted June 4, 2020 anyone still have diff autoattack for support latest git? need it please share Quote
LearningRO Posted June 4, 2020 Posted June 4, 2020 2 hours ago, PapaZola said: anyone still have diff autoattack for support latest git? need it please share see my pervious postheree Quote
moonlight2011 Posted July 3, 2020 Posted July 3, 2020 On 6/4/2020 at 3:20 PM, LearningRO said: see my pervious postheree Hi ! is there a step by step guide for this. PL Quote
Louis T Steinhil Posted July 4, 2020 Posted July 4, 2020 On 11/2/2019 at 8:14 AM, LearningRO said: try this can this become a script like autopots? Quote
LearningRO Posted July 4, 2020 Posted July 4, 2020 11 hours ago, zeek said: can this become a script like autopots? maybe you can combine it with script autopots search on forum Quote
moonlight2011 Posted July 4, 2020 Posted July 4, 2020 2 hours ago, LearningRO said: maybe you can combine it with script autopots search on forum Can't you help my. Pl Quote
Louis T Steinhil Posted July 17, 2020 Posted July 17, 2020 Is it just me or I get kicked out of the server whenever I hit a wall. No errors on map server. Quote
IusReservoir Posted July 18, 2020 Posted July 18, 2020 any update for 2020 client? iff can anyone still make it know? really help for lowrate server Quote
PapaZola Posted September 18, 2020 Posted September 18, 2020 On 4/28/2020 at 10:10 PM, Psyche said: Hello, Is there any possibilities for using @autoattack like @autotrade? Players will be logged out but character still on game and doing autoattack. I've tried to put state.autotrade = 1; but the result was the character didn't walking for monsters. So, is there a code/variable to make the client only logged out but character still on the game? same im looking this 1 also after using @autoattack and then @afk also not working the character stop attacking and walking anyone can help? to make char keep attacking and walking Quote
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.