LearningRO Posted March 15, 2013 Posted March 15, 2013 sir help i got error when compile i use last Svn Rathena 17198 Quote
LearningRO Posted March 22, 2013 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
LearningRO Posted March 22, 2013 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
Drakkus Posted April 11, 2013 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
Mabuhay Posted June 3, 2013 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
Nanashi Posted June 4, 2013 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
goddameit Posted June 5, 2013 Author Posted June 5, 2013 mark this to first post, thx for report. Quote
LearningRO Posted June 18, 2013 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
Boy Posted September 27, 2013 Posted September 27, 2013 anyone can help me? Hi rAthena Same with me cant attack. Anyone can help me Quote
BuLaLaKaW Posted February 14, 2014 Posted February 14, 2014 any option to attack via spell like for wizards or skills like bash or bowling bash Quote
rakuzas Posted November 30, 2016 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
JuLiAnChz Posted May 22, 2017 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
skymia Posted August 23, 2017 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
JuLiAnChz Posted August 23, 2017 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
skymia Posted August 24, 2017 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
JuLiAnChz Posted August 24, 2017 Posted August 24, 2017 Yes, search in your code and modify corresponding. If you cant, write me in p2 Quote
skymia Posted August 24, 2017 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
rakuzas Posted August 30, 2017 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
Xiao Posted September 19, 2017 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
Keitenai Posted September 27, 2017 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
rakuzas Posted September 28, 2017 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
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.