Hello there !
I've been trying to add a new passive skill following this tutorial : https://github.com/rathena/rathena/wiki/Adding_new_skills
As you can expect, I won't create a new post here if everything goes as planed !
New skill : Sharp_Eye ID 8501
Expected effect : +1DEX per level
Here what I've done so far:
src/map/status.hpp
EM_EL_DEADLY_POISON,
LNK_SHARP_EYE = 8501,
ABR_BATTLE_BUSTER = 8601,
src/map/status.cpp
if((skill=pc_checkskill(sd,AC_OWL))>0)
base_status->dex += skill;
if((skill = pc_checkskill(sd,RA_RESEARCHTRAP))>0)
base_status->int_ += skill;
if (pc_checkskill(sd, SU_POWEROFLAND) > 0)
base_status->int_ += 20;
if((skill=pc_checkskill(sd,LNK_SHARP_EYE))>0)
base_status->dex += skill;
db/pre-re/skilll_db.yml
- Id: 8501
Name: LNK_SHARP_EYE
Description: Sharp Eye
MaxLevel: 10
db/pre-re/skill_tree.yml
May not be necessary as the skill will be obtain through a quest or item.
- Job: Novice
Tree:
- Name: NV_BASIC
MaxLevel: 9
- Name: NV_FIRSTAID
MaxLevel: 1
- Name: NV_TRICKDEAD
MaxLevel: 1
Exclude: true
- Name: WE_CALLBABY
MaxLevel: 1
- Name: LNK_SHARP_EYE
MaxLevel: 10
grf - luafiles514/lua file/skillinfoz/skillid.lub
ELEMENTAL_LAST = 8443,
LNK_SHARP_EYE = 8501,
ABR_BATTLE_BUSTER = 8601,
grf - luafiles514/lua file/skillinfoz/skillinfolist.lub
[SKID.LNK_SHARP_EYE] = {
"LNK_SHARP_EYE",
SkillName = "Sharp Eye",
MaxLv = 10,
}
grf - luafiles514/lua file/skillinfoz/skilldescript.lub
[SKID.LNK_SHARP_EYE] = { "Test" },
grf - adding sprit and bmp file
At this point the server compile without any crashes or Warning/Error messages concerning 'LNK_SHARP_EYE'.
No error pop out when I launch the client (no GRF error).
I created a new NPC to give the skill to give a try on LNK_SHARP_EYE:
prontera,207,259,4 script getLinkSkill 4_F_ALCHE_A,{
mes "Add new skill 8501";
next;
if (getskilllv(8501) == 0) {
mes "New skill added";
skill 8501, 10, 0;
} else {
mes "You've already got this skill";
}
close;
}
But when I click to the NPC, nothing append. The new skill does not appear in the ETC tab of IG skills. No error appears on screen (as a GRF ressources error for instance).
I tryed with another skill ID to make sure the problem wasn't coming from the npc. And I got the new skill to ETC skill tab. So the problem may come from another step.
Any help is welcome
Regards,