LearningRO Posted March 15, 2013 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 72 Joined: 02/10/12 Last Seen: Yesterday at 08:29 AM Share Posted March 15, 2013 sir help i got error when compile i use last Svn Rathena 17198 Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted March 16, 2013 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted March 16, 2013 Manual update it Quote Link to comment Share on other sites More sharing options...
LearningRO Posted March 22, 2013 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 72 Joined: 02/10/12 Last Seen: Yesterday at 08:29 AM Share Posted March 22, 2013 Manual update it sir, i was try manual diff.. but still got error can you help me to diff my scr files??? im newbie about source code Quote Link to comment Share on other sites More sharing options...
LearningRO Posted March 22, 2013 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 72 Joined: 02/10/12 Last Seen: Yesterday at 08:29 AM Share Posted March 22, 2013 Manual update it sir, i was try manual diff.. but still got error can you help me to diff my scr files??? im newbie about source code update i fix it thx sir hahaha Quote Link to comment Share on other sites More sharing options...
Drakkus Posted April 11, 2013 Group: Members Topic Count: 39 Topics Per Day: 0.01 Content Count: 386 Reputation: 15 Joined: 11/17/11 Last Seen: September 13, 2024 Share Posted April 11, 2013 idea =) @autoattack <attack skill name>,<heal item id> Suggestion. Place a timer in this command. example: You can only use this command for a certain amount of time and it automatically turns off after that.. and you can only use it after 1 hour or so.. It would be also nice if item that consume within 1 hour, and also suggestion if the player click a certain area the 'AutoAttack' command will be stop e.g AutoAttack has been stopped. @autoattack <skillname atleast 1-3 skills be use><lvl> , <healing item> <required item in order to autoattack> i'd be happy if this suggestion would possible to implement. Thank you. Quote Link to comment Share on other sites More sharing options...
Mabuhay Posted June 3, 2013 Group: Members Topic Count: 105 Topics Per Day: 0.02 Content Count: 446 Reputation: 232 Joined: 03/20/12 Last Seen: October 22, 2020 Share Posted June 3, 2013 (edited) err, successfully diffed but when monster is around 9x9, the character stops moving instead of attacking. Sorry, fixed already. Packet was the problem. I used OPTION_AUTOATTACK = 0x40000000, instead PS: Will it be possible that when PM-ed by player, it will automatically reply: Person is currently using @autoattack command. This is to determine @autoattack from botters. In-addition, I hope when the player logs out, the @autoattack command also stop Edited June 3, 2013 by MrVandalBus Quote Link to comment Share on other sites More sharing options...
Nanashi Posted June 4, 2013 Group: Members Topic Count: 15 Topics Per Day: 0.00 Content Count: 59 Reputation: 19 Joined: 01/03/13 Last Seen: August 27, 2024 Share Posted June 4, 2013 (edited) I've got an error: When i use @autoattack my char start to move but when he find a mob he stop and dont try to attack it. Does anyone know how to solve this problem? Thanks. Update: I solved the problem by changing the ~/src/map/status.h line 1517: OPTION_MOUNTING = 0x10000000, OPTION_AUTOATTACK = 0x10000000, As you can see the problem was that they had the same number. So I changed it to 0x40000000: OPTION_MOUNTING = 0x10000000, OPTION_AUTOATTACK = 0x40000000, Edited June 4, 2013 by Nanashi Quote Link to comment Share on other sites More sharing options...
goddameit Posted June 5, 2013 Group: Members Topic Count: 60 Topics Per Day: 0.01 Content Count: 562 Reputation: 219 Joined: 11/22/11 Last Seen: August 3, 2024 Author Share Posted June 5, 2013 mark this to first post, thx for report. Quote Link to comment Share on other sites More sharing options...
LearningRO Posted June 18, 2013 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 72 Joined: 02/10/12 Last Seen: Yesterday at 08:29 AM Share Posted June 18, 2013 I've got an error: When i use @autoattack my char start to move but when he find a mob he stop and dont try to attack it. Does anyone know how to solve this problem? Thanks. Update: I solved the problem by changing the ~/src/map/status.h line 1517: OPTION_MOUNTING = 0x10000000, OPTION_AUTOATTACK = 0x10000000, As you can see the problem was that they had the same number. So I changed it to 0x40000000: OPTION_MOUNTING = 0x10000000, OPTION_AUTOATTACK = 0x40000000, hi i was change like that but still get error when use autoattack can't attack any monster any help me?? Quote Link to comment Share on other sites More sharing options...
LearningRO Posted July 12, 2013 Group: Members Topic Count: 107 Topics Per Day: 0.02 Content Count: 778 Reputation: 72 Joined: 02/10/12 Last Seen: Yesterday at 08:29 AM Share Posted July 12, 2013 bump Quote Link to comment Share on other sites More sharing options...
Boy Posted September 25, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 09/28/12 Last Seen: October 30, 2024 Share Posted September 25, 2013 Hi rAthena Same with me cant attack. Quote Link to comment Share on other sites More sharing options...
Boy Posted September 27, 2013 Group: Members Topic Count: 28 Topics Per Day: 0.01 Content Count: 135 Reputation: 4 Joined: 09/28/12 Last Seen: October 30, 2024 Share Posted September 27, 2013 anyone can help me? Hi rAthena Same with me cant attack. Anyone can help me Quote Link to comment Share on other sites More sharing options...
BuLaLaKaW Posted February 14, 2014 Group: Members Topic Count: 19 Topics Per Day: 0.00 Content Count: 125 Reputation: 7 Joined: 11/19/11 Last Seen: August 20, 2021 Share Posted February 14, 2014 any option to attack via spell like for wizards or skills like bash or bowling bash Quote Link to comment Share on other sites More sharing options...
rakuzas Posted November 30, 2016 Group: Members Topic Count: 152 Topics Per Day: 0.03 Content Count: 459 Reputation: 7 Joined: 06/29/12 Last Seen: April 25, 2019 Share Posted November 30, 2016 For those who cant apply patch, you need to do it manually.. I just tested and its working with clean rAthena and 2015 client.. But it would be nice if the script auto disable when player died and respawn.. And also be nice if we manage to display cutin when player activate the @autoattack command.. Nice release.. Love it!! Quote Link to comment Share on other sites More sharing options...
JuLiAnChz Posted May 22, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 05/06/17 Last Seen: January 3, 2024 Share Posted May 22, 2017 (edited) if you want to specify the MOB_ID, here is my MOD 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; } EDIT: @autoattack - All @autoattack poring - Only poring @autoattack 1002 - Only poring Edited May 22, 2017 by JuLiAnChz Specified command Quote Link to comment Share on other sites More sharing options...
skymia Posted August 23, 2017 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 02/19/17 Last Seen: May 26, 2024 Share Posted August 23, 2017 On 5/22/2017 at 9:24 PM, JuLiAnChz said: if you want to specify the MOB_ID, here is my MOD 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; } EDIT: @autoattack - All @autoattack poring - Only poring @autoattack 1002 - Only poring how to add this commands? @autoattack - All @autoattack poring - Only poring @autoattack 1002 - Only poring Quote Link to comment Share on other sites More sharing options...
JuLiAnChz Posted August 23, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 05/06/17 Last Seen: January 3, 2024 Share Posted August 23, 2017 9 hours ago, skymia said: how to add this commands? @autoattack - All @autoattack poring - Only poring @autoattack 1002 - Only poring Follow the patch, and set my changes. In the first page is the downloadable Quote Link to comment Share on other sites More sharing options...
skymia Posted August 24, 2017 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 02/19/17 Last Seen: May 26, 2024 Share Posted August 24, 2017 1 hour ago, JuLiAnChz said: Follow the patch, and set my changes. In the first page is the downloadable im using now God patch so i need to add your mod? 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; } Quote Link to comment Share on other sites More sharing options...
JuLiAnChz Posted August 24, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 05/06/17 Last Seen: January 3, 2024 Share Posted August 24, 2017 Yes, search in your code and modify corresponding. If you cant, write me in p2 Quote Link to comment Share on other sites More sharing options...
skymia Posted August 24, 2017 Group: Members Topic Count: 63 Topics Per Day: 0.02 Content Count: 298 Reputation: 4 Joined: 02/19/17 Last Seen: May 26, 2024 Share Posted August 24, 2017 9 hours ago, JuLiAnChz said: Yes, search in your code and modify corresponding. If you cant, write me in p2 What do you mean write me in p2? Quote Link to comment Share on other sites More sharing options...
JuLiAnChz Posted August 28, 2017 Group: Members Topic Count: 2 Topics Per Day: 0.00 Content Count: 7 Reputation: 0 Joined: 05/06/17 Last Seen: January 3, 2024 Share Posted August 28, 2017 a private message Quote Link to comment Share on other sites More sharing options...
rakuzas Posted August 30, 2017 Group: Members Topic Count: 152 Topics Per Day: 0.03 Content Count: 459 Reputation: 7 Joined: 06/29/12 Last Seen: April 25, 2019 Share Posted August 30, 2017 I no longer use @autoattack since it make my player crash.. Tried to fix it but no luck.. Also it have issue when in autoattack but when kicked-out from map, the player client crash.. Quote Link to comment Share on other sites More sharing options...
Xiao Posted September 19, 2017 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 65 Reputation: 0 Joined: 12/10/14 Last Seen: Yesterday at 09:54 AM Share Posted September 19, 2017 (edited) Thanks but send error when traveling or teleport or when you go through a warp. Edited September 19, 2017 by Xiao Quote Link to comment Share on other sites More sharing options...
Keitenai Posted September 27, 2017 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 98 Reputation: 75 Joined: 12/04/14 Last Seen: December 10, 2024 Share Posted September 27, 2017 (edited) On 8/30/2017 at 1:44 PM, rakuzas said: I no longer use @autoattack since it make my player crash.. Tried to fix it but no luck.. Also it have issue when in autoattack but when kicked-out from map, the player client crash.. try this: autoattack.diff Edited September 29, 2017 by Keitenai Quote Link to comment Share on other sites More sharing options...
rakuzas Posted September 28, 2017 Group: Members Topic Count: 152 Topics Per Day: 0.03 Content Count: 459 Reputation: 7 Joined: 06/29/12 Last Seen: April 25, 2019 Share Posted September 28, 2017 23 hours ago, Keitenai said: try this: autoattack.diff Hmmm.. is this fixed player crashed when change map or teleport or force-kick from map (timed out)? Quote Link to comment Share on other sites More sharing options...
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.