rodney2210 0 Posted June 27, 2014 (edited) Hello, I would like to ask help from you guys this command to convert the SRC to reconcile with the current hercules emulator: +/* ====================================================== *+ * @cloneskill [Hold]+ * <> Permite ao jogador plagiar qualquer habilidade+ * Uso:+ * <> @cloneskill <id/nome da habilidade> <nível> <tipo>+ * tipo:+ * <> 0 = Copiada através da habilidade Plágio+ * <> 1 = Copiada através da habilidade Mimetismo+ * ------------------------------------------------------ */+ACMD_FUNC(cloneskill)+{+ char name[255];+ int id, lvl, type = 0, oldskreg;+ nullpo_retr(-1, sd);++ if (!message || !*message || (+ sscanf(message, ""%99[^"]" %d %d", name, &lvl, &type) < 2 &&+ sscanf(message, "%99s %d %d", name, &lvl, &type) < 2 ))+ {+ clif_displaymessage(fd, "Você precisa inserir ID e Nível da habilidade.");+ return -1;+ }++ if(!(id = skill_name2id(name)) && !(id = skill_get_index(atoi(name))))+ {+ clif_displaymessage(fd, "Nome ou ID da habilidade são inválidos.");+ return -1;+ }++ if(oldskreg = pc_readglobalreg(sd, ((type) ? "REPRODUCE_SKILL" : "CLONE_SKILL")))+ {+ sd->status.skill[oldskreg].id = 0;+ sd->status.skill[oldskreg].lv = 0;+ sd->status.skill[oldskreg].flag = 0;+ clif_deleteskill(sd, oldskreg);+ }++ sd->status.skill[id].id = id;+ sd->status.skill[id].lv = lvl;+ sd->status.skill[id].flag = SKILL_FLAG_PLAGIARIZED;+ if(type)+ sd->reproduceskill_id = id;+ else+ sd->cloneskill_id = id;++ pc_setglobalreg(sd, ((type) ? "REPRODUCE_SKILL" : "CLONE_SKILL"), id);+ pc_setglobalreg(sd, ((type) ? "REPRODUCE_SKILL_LV" : "CLONE_SKILL_LV"), lvl);++ clif_addskill(sd, id);++ sprintf(atcmd_output,"Habilidade: '%s' | Nível: '%d' | Utilizando: '%s'", skill_get_name(id), lvl, ((type) ? "Mimetismo" : "Plágio"));+ clif_displaymessage(fd, atcmd_output);++ return 0;+}+ /** * Fills the reference of available commands in atcommand DBMap **/@@ -8796,6 +8852,7 @@ ACMD_DEF(skillid), ACMD_DEF(useskill), ACMD_DEF(displayskill),+ ACMD_DEF(cloneskill), ACMD_DEF(snow), ACMD_DEF(sakura), ACMD_DEF(clouds), Thanks from now! Edited June 27, 2014 by rodney2210 Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted June 27, 2014 (edited) /* ====================================================== * * @cloneskill [Hold] * <> Permite ao jogador plagiar qualquer habilidade * Uso: * <> @cloneskill <id/nome da habilidade> <nível> <tipo> * tipo: * <> 0 = Copiada através da habilidade Plágio * <> 1 = Copiada através da habilidade Mimetismo * ------------------------------------------------------ */ACMD(cloneskill){ char name[255]; int id, lvl, type = 0, oldskreg; if (!message || !*message || ( sscanf(message, ""%99[^"]" %d %d", name, &lvl, &type) < 2 && sscanf(message, "%99s %d %d", name, &lvl, &type) < 2 ) ) { clif->message(fd, "Voce precisa inserir ID e Nivel da habilidade."); return false; } if(!(id = skill->name2id(name)) && !(id = skill->get_index(atoi(name)))) { clif->message(fd, "Nome ou ID da habilidade sao invalidos."); return false; } if(oldskreg = pc_readglobalreg(sd,script->add_str( ((type) ? "REPRODUCE_SKILL" : "CLONE_SKILL")))) { sd->status.skill[oldskreg].id = 0; sd->status.skill[oldskreg].lv = 0; sd->status.skill[oldskreg].flag = 0; clif->deleteskill(sd, oldskreg); } sd->status.skill[id].id = id; sd->status.skill[id].lv = lvl; sd->status.skill[id].flag = SKILL_FLAG_PLAGIARIZED; if(type) sd->reproduceskill_id = id; else sd->cloneskill_id = id; pc_setglobalreg(sd, script->add_str( ((type) ? "REPRODUCE_SKILL" : "CLONE_SKILL")), id); pc_setglobalreg(sd, script->add_str( ((type) ? "REPRODUCE_SKILL_LV" : "CLONE_SKILL_LV")), lvl); clif->addskill(sd, id); sprintf(atcmd_output,"Habilidade: '%s' | Nivel: '%d' | Utilizando: '%s'", skill->get_name(id), lvl, ((type) ? "Mimetismo" : "Plagio")); clif->message(fd, atcmd_output); return true;} ACMD_DEF(cloneskill), Edited June 27, 2014 by Angelmelody 1 rodney2210 reacted to this Quote Share this post Link to post Share on other sites
0 rodney2210 0 Posted June 27, 2014 /* ====================================================== * * @cloneskill [Hold] * <> Permite ao jogador plagiar qualquer habilidade * Uso: * <> @cloneskill <id/nome da habilidade> <nível> <tipo> * tipo: * <> 0 = Copiada através da habilidade Plágio * <> 1 = Copiada através da habilidade Mimetismo * ------------------------------------------------------ */ACMD(cloneskill){ char name[255]; int id, lvl, type = 0, oldskreg; if (!message || !*message || ( sscanf(message, ""[^"]" %d %d", name, &lvl, &type) < 2 && sscanf(message, "s %d %d", name, &lvl, &type) < 2 )) { clif->message(fd, "Voce precisa inserir ID e Nivel da habilidade."); return false; } if(!(id = skill->name2id(name)) && !(id = skill->get_index(atoi(name)))) { clif->message(fd, "Nome ou ID da habilidade sao invalidos."); return false; } if(oldskreg = pc_readglobalreg(sd,script->add_str( ((type) ? "REPRODUCE_SKILL" : "CLONE_SKILL")))) { sd->status.skill[oldskreg].id = 0; sd->status.skill[oldskreg].lv = 0; sd->status.skill[oldskreg].flag = 0; clif->deleteskill(sd, oldskreg); } sd->status.skill[id].id = id; sd->status.skill[id].lv = lvl; sd->status.skill[id].flag = SKILL_FLAG_PLAGIARIZED; if(type) sd->reproduceskill_id = id; else sd->cloneskill_id = id; pc_setglobalreg(sd, script->add_str( ((type) ? "REPRODUCE_SKILL" : "CLONE_SKILL")), id); pc_setglobalreg(sd, script->add_str( ((type) ? "REPRODUCE_SKILL_LV" : "CLONE_SKILL_LV")), lvl); clif->addskill(sd, id); sprintf(atcmd_output,"Habilidade: '%s' | Nivel: '%d' | Utilizando: '%s'", skill->get_name(id), lvl, ((type) ? "Mimetismo" : "Plagio")); clif->message(fd, atcmd_output); return true;} ACMD_DEF(cloneskill), I write @cloneskill put the id and the level of skill, but even so the skill that failed. example: @cloneskill 89 10 skill has failed Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted June 27, 2014 (edited) I write @cloneskill put the id and the level of skill, but even so the skill that failed. example: @cloneskill 89 10 skill has failed Sorry, fixed typo try again Edited June 27, 2014 by Angelmelody 1 rodney2210 reacted to this Quote Share this post Link to post Share on other sites
0 rodney2210 0 Posted June 27, 2014 (edited) I write @cloneskill put the id and the level of skill, but even so the skill that failed. example: @cloneskill 89 10 skill has failed Sorry, fixed typo try again Rs worked nicely. thank you * - * Edited June 27, 2014 by rodney2210 Quote Share this post Link to post Share on other sites
Hello, I would like to ask help from you guys this command to convert the SRC to reconcile with the current hercules emulator:
Edited by rodney2210Thanks from now!
Share this post
Link to post
Share on other sites