XrichiX Posted February 6, 2019 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 01/30/14 Last Seen: January 14, 2023 Share Posted February 6, 2019 como puedo crear una skill que tire un clon how can I create a skill that pulls a clone Quote Link to comment Share on other sites More sharing options...
0 luizragna Posted February 6, 2019 Group: Members Topic Count: 35 Topics Per Day: 0.01 Content Count: 107 Reputation: 28 Joined: 02/12/14 Last Seen: January 9, 2023 Share Posted February 6, 2019 Have you tried to view this topic? https://github.com/rathena/rathena/wiki/Adding_new_skills Quote Link to comment Share on other sites More sharing options...
0 utofaery Posted February 7, 2019 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 228 Reputation: 19 Joined: 10/27/12 Last Seen: March 17, 2019 Share Posted February 7, 2019 1. what about the source part? Does he clone the whole part of @clone into skill.c?? for that new custom skill?? Spoiler contain parts from atcommand.cpp ACMD_FUNC(clone) don't need to open! Spoiler // @clone/@slaveclone/@evilclone <playername> [Valaris] ACMD_FUNC(clone) { int x=0,y=0,flag=0,master=0,i=0; struct map_session_data *pl_sd=NULL; memset(atcmd_player_name, '\0', sizeof(atcmd_player_name)); if (!message || !*message || sscanf(message, "%23[^\n]", atcmd_player_name) < 1) { clif_displaymessage(sd->fd,msg_txt(sd,1323)); // You must enter a player name or ID. return 0; } if((pl_sd=map_nick2sd(atcmd_player_name,true)) == NULL && (pl_sd=map_charid2sd(atoi(atcmd_player_name))) == NULL) { clif_displaymessage(fd, msg_txt(sd,3)); // Character not found. return 0; } if(pc_get_group_level(pl_sd) > pc_get_group_level(sd)) { clif_displaymessage(fd, msg_txt(sd,126)); // Cannot clone a player of higher GM level than yourself. return 0; } parent_cmd = atcommand_checkalias(command+1); if (strcmpi(parent_cmd, "clone") == 0) flag = 1; else if (strcmpi(parent_cmd, "slaveclone") == 0) { flag = 2; if(pc_isdead(sd)){ clif_displaymessage(fd, msg_txt(sd,129+flag*2)); return 0; } master = sd->bl.id; if (battle_config.atc_slave_clone_limit && mob_countslave(&sd->bl) >= battle_config.atc_slave_clone_limit) { clif_displaymessage(fd, msg_txt(sd,127)); // You've reached your slave clones limit. return 0; } } do { x = sd->bl.x + (rnd() % 10 - 5); y = sd->bl.y + (rnd() % 10 - 5); } while (map_getcell(sd->bl.m,x,y,CELL_CHKNOPASS) && i++ < 10); if (i >= 10) { x = sd->bl.x; y = sd->bl.y; } if((x = mob_clone_spawn(pl_sd, sd->bl.m, x, y, "", master, MD_NONE, flag?1:0, 0)) > 0) { clif_displaymessage(fd, msg_txt(sd,128+flag*2)); // Evil Clone spawned. Clone spawned. Slave clone spawned. return 0; } clif_displaymessage(fd, msg_txt(sd,129+flag*2)); // Unable to spawn evil clone. Unable to spawn clone. Unable to spawn slave clone. return 0; } OFFtopic:: I have a question though, why rathena or the eathena so long time and yet have not the file "Skill_avail.txt", just like the item_avail.txt or mob_avail.txt?? so we can definitely clone skill and test eg. Asura (original) Asura (nerfed) Asura (Buffed) then test which one is the more like'd and then decide what to change in source. Quote Link to comment Share on other sites More sharing options...
0 AnnieRuru Posted February 7, 2019 Group: Members Topic Count: 18 Topics Per Day: 0.00 Content Count: 2044 Reputation: 682 Joined: 10/09/12 Last Seen: December 20, 2020 Share Posted February 7, 2019 the answer to this topic is OnPCUseSkillEvent yes, many are broken, even mine in hercules plugin release also broken LOL skill_avail ... that's an interesting suggestion but due to the complexity of the skill database, I wonder how many field needed clone a skill ID item_avail only needs 2, mob_avail can have up to 12, skill_avail .... hmmm ... lazy to count Quote Link to comment Share on other sites More sharing options...
0 XrichiX Posted February 7, 2019 Group: Members Topic Count: 11 Topics Per Day: 0.00 Content Count: 17 Reputation: 0 Joined: 01/30/14 Last Seen: January 14, 2023 Author Share Posted February 7, 2019 for example how do I put that pull a clone instead of a mob case KO_ZANZOU: if(sd){ struct mob_data *md2; md2 = mob_once_spawn_sub(src, src->m, src->x, src->y, status_get_name(src), MOBID_ZANZOU, "", SZ_SMALL, AI_NONE); if( md2 ) { md2->master_id = src->id; md2->special_state.ai = AI_ZANZOU; if( md2->deletetimer != INVALID_TIMER ) delete_timer(md2->deletetimer, mob_timer_delete); md2->deletetimer = add_timer (gettick() + skill_get_time(skill_id, skill_lv), mob_timer_delete, md2->bl.id, 0); mob_spawn( md2 ); map_foreachinallrange(unit_changetarget, src, AREA_SIZE, BL_MOB, src, &md2->bl); clif_skill_nodamage(src,bl,skill_id,skill_lv,1); skill_blown(src,bl,skill_get_blewcount(skill_id,skill_lv),unit_getdir(bl),BLOWN_NONE); } } Quote Link to comment Share on other sites More sharing options...
Question
XrichiX
como puedo crear una skill que tire un clon
how can I create a skill that pulls a clone
Link to comment
Share on other sites
4 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.