Jump to content

Random

Members
  • Posts

    4
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

867 profile views

Random's Achievements

Poring

Poring (1/15)

0

Reputation

  1. Just add it manually, I changed nothing on Lilith's code in my post. If you want to add the patch manually, just open the patch file with a note pad, look through the code and see what I explained on my previous post and you'll see what codes to add where and you're done. you need to create a .txt file on your /db/ folder as stated on the patch file. sv_readdb(db_path, "skill_damage_db.txt" , ',', 5, 6, MAX_SKILL_DB, skill_parse_row_skilldamage); "skill_damage_db.txt" there is where you'll add your skill's information about the damage output.
  2. Great Idea you had! I was coding something really similar using a db.txt file too. You should add some general options as battleconfigs, like general damage cap, general damage reduction or increase, etc as I did on mine. Also.. I was looking through your code and noticed this. md.damage = md.damage += md.damage*battle_SAD(sd, target, skill_num)/100; Isn't the '= md.damage' redundant? Also this. int flag = map[sd->bl.m].flag.restricted?8*map[sd->bl.m].zone:0; map[sd->bl.m].flag.restricted && skill_db[skill_num].flag&flag if map[sd->bl.m].flag.restricted exists you asign 8*map[sd->bl.m].zone at flag otherwise 0, then on the other condition if map[sd->bl.m].flag.restricted exists and the bit value you asigned to flag is in skill_db[skill_num].flag it triggers the condition. that logic is redundant too, because in the case if map[sd->bl.m].flag.restricted doesn't exists, as you stated an && on the second condition would be redundant if the second condition don't triggers because of the 0. I think would be better just like this. map[sd->bl.m].flag.restricted && skill_db[skill_num].flag&(8*map[sd->bl.m].zone) Great contribution! Have a nice day! Thanks, it still doesn't work for me Open your battle.c src file. Find this line struct Damage battle_calc_magic_attack(struct block_list *src,struct block_list *target,int skill_num,int skill_lv,int mflag); add before static int battle_SAD(struct map_session_data *sd, struct block_list *target, int skill_num) { int dmg = 0; int flag = map[sd->bl.m].flag.restricted?8*map[sd->bl.m].zone:0; if((skill_db[skill_num].flag&1 && !map_flag_vs(sd->bl.m)) || (skill_db[skill_num].flag&2 && map[sd->bl.m].flag.pvp) || (skill_db[skill_num].flag&4 && map_flag_gvg(sd->bl.m)) || (skill_db[skill_num].flag&8 && map[sd->bl.m].flag.battleground) || (map[sd->bl.m].flag.restricted && skill_db[skill_num].flag&flag)) { switch(target->type) { case BL_PC: dmg = skill_db[skill_num].pc_damage; break; case BL_MOB: if(((TBL_MOB*)target)->status.mode&MD_BOSS) dmg = skill_db[skill_num].boss_damage; else dmg = skill_db[skill_num].mob_damage; break; default: dmg = skill_db[skill_num].other_damage; break; } } return dmg; } Look for this line. if( sd ) { if (skill_num && (i = pc_skillatk_bonus(sd, skill_num))) ATK_ADDRATE(i); add like this if( sd ) if( sd ) { ATK_ADDRATE(battle_SAD(sd, target, skill_num)); if (skill_num && (i = pc_skillatk_bonus(sd, skill_num))) ATK_ADDRATE(i); Look for this line if(sd) { //Damage bonuses Add this if(sd) { MATK_ADDRATE(battle_SAD(sd, target, skill_num)); //Damage bonuses Look for this line if (sd && (i = pc_skillatk_bonus(sd, skill_num))) md.damage += md.damage*i/100; Replace like this if (sd) { if(i = pc_skillatk_bonus(sd, skill_num)) md.damage += md.damage*i/100; md.damage = md.damage += md.damage*battle_SAD(sd, target, skill_num)/100; } On skill.c src file Find this line /*========================================== * DB reading. * skill_db.txt Add before static bool skill_parse_row_skilldamage(char* split[], int columns, int current) { int i = atoi(split[0]); i = skill_get_index(i); if( !i ) // invalid skill id return false; skill_db[i].flag = atoi(split[1]); skill_db[i].pc_damage = atoi(split[2]); skill_db[i].mob_damage = atoi(split[3]); skill_db[i].boss_damage = atoi(split[4]); skill_db[i].other_damage = atoi(split[5]); return true; } Find this line sv_readdb(db_path, "skill_changematerial_db.txt" Add after sv_readdb(db_path, "skill_damage_db.txt" , ',', 5, 6, MAX_SKILL_DB, skill_parse_row_skilldamage); On skill.h src file Find this line int unit_interval; int unit_target; int unit_flag; Add after int flag; int pc_damage,mob_damage,other_damage,boss_damage; Compile and you're done. Don't forget to create your db file. It should work perfectly on the latest revision.
  3. Hi Ryuuzaki, I did all what I wrote before, by lua files you mean data\lua files\skillinfoz\skillid.lua, data\lua files\skillinfoz\skilldescript.lua, data\lua files\skillinfoz\skillinfolist.lua files? if yes, then I did. But I still can't see 'em. Thanks for the reply! Edit: I'm not using Xray, does it matter? Hi fellow members, I've changed the skill id to 1100 and now I see the custom skill on the window, but it shows a red icon, not the one I merged into my grf and it doesn't show the description I wrote on the lua files, nor the name. The skill works fine.
  4. Hi fellow members, I've an issue as the title says, trying to get a custom skill working. right now this are my client and server specs. Exe: 2012-04-10aRagexeRE Svn: Betewen 16937 and 16966 (I don't remember exactly) Data: The one provided by rathena svn I've done exactly what the wiki says http://rathena.org/wiki/Adding_new_skills and I can't get to see the skills on my skills misc window. I've added them by using a card with 'skill "CUSTOM_SKILL",1;' script command. First of all, I've edited the mmo.h file on common folder and changed the MAX_SKILL from 3100 to 4100. Then I've edited the skill.h file, and added just after ECLAGE_RECALL, this line CUSTOM_SKILL = 4000,. I've edited the skill.c file too, adding case CUSTOM_SKILL: right after case KO_MEIKYOUSISUI:. Also I've edited the status.c file, adding the set_sc( CUSTOM_SKILL etc. Actualy this skill is a copy of heal, so I'm using its SC_ , SI_ and all others SCB_ on the status.c file. I've compiled and everything went fine. I've edited also the skill_db.txt, skill_cast_db.txt, skill_requiere_db.txt files adding them the 4000 id and on skill_db.txt the CUSTOM_SKILL,Heal at the end of the line. I've edited the data\lua files\skillinfoz\skillid.lua, data\lua files\skillinfoz\skilldescript.lua, data\lua files\skillinfoz\skillinfolist.lua files as it explains on the wiki guide and also merged the same bmp as heal but renamed to custom_skill on data\texture\À¯ÀúÀÎÅÍÆäÀ̽º\item location to my grf. And I still can't see the custom skill on my server, does anyone knows what I'm doing wrong? Help is much appreciated! Thanks!
×
×
  • Create New...