RcDragon Posted February 1, 2018 at 02:04 PM Share Posted February 1, 2018 at 02:04 PM Boas malta, Quero que no meu metin seja preciso apenas um livro para upar o nivel da skill independentemente do nivel que ela esta (M1 - M2 = 1 Livro, ... , M10 - G1 = 1 Livro...) Estive a procura no forum e não encontrei nada referente a isso, caso alguém saiba como o fazer agradecia. Cumps. Link to comment Share on other sites More sharing options...
Marco Posted February 1, 2018 at 02:38 PM Share Posted February 1, 2018 at 02:38 PM 33 minutos atrás, RcDragon disse: Boas malta, Quero que no meu metin seja preciso apenas um livro para upar o nivel da skill independentemente do nivel que ela esta (M1 - M2 = 1 Livro, ... , M10 - G1 = 1 Livro...) Estive a procura no forum e não encontrei nada referente a isso, caso alguém saiba como o fazer agradecia. Cumps. Podes pegar na quest da pedra da alma e podes partir dai penso Link to comment Share on other sites More sharing options...
RcDragon Posted February 1, 2018 at 02:40 PM Author Share Posted February 1, 2018 at 02:40 PM (edited) 2 minutos atrás, L2P disse: Podes pegar na quest da pedra da alma e podes partir dai penso O problema é que para isso teria de desativar o "script" dos livros na source, se nao o fizesse, um player ao ler o livro iria executar a quest e ao mesmo tempo o código da source, e isso daria barraco... Para isso mais vale a pena edita-lo na source. Edited February 1, 2018 at 02:41 PM by RcDragon Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted February 1, 2018 at 02:51 PM Share Posted February 1, 2018 at 02:51 PM char_skill.cpp Mete aqui a tua função CHARACTER::LearnGrandMasterSkill sff Link to comment Share on other sites More sharing options...
RcDragon Posted February 1, 2018 at 02:55 PM Author Share Posted February 1, 2018 at 02:55 PM Spoiler // ADD_GRANDMASTER_SKILL bool CHARACTER::LearnGrandMasterSkill(DWORD dwSkillVnum) { CSkillProto * pkSk = CSkillManager::instance().Get(dwSkillVnum); if (!pkSk) return false; if (!IsLearnableSkill(dwSkillVnum)) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("수련할 수 없는 스킬입니다.")); return false; } sys_log(0, "learn grand master skill[%d] cur %d, next %d", dwSkillVnum, get_global_time(), GetSkillNextReadTime(dwSkillVnum)); /* if (get_global_time() < GetSkillNextReadTime(dwSkillVnum)) { if (!(test_server && quest::CQuestManager::instance().GetEventFlag("no_read_delay"))) { if (FindAffect(AFFECT_SKILL_NO_BOOK_DELAY)) { // 주안술서 사용중에는 시간 제한 무시 RemoveAffect(AFFECT_SKILL_NO_BOOK_DELAY); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("주안술서를 통해 주화입마에서 빠져나왔습니다.")); } else { SkillLearnWaitMoreTimeMessage(GetSkillNextReadTime(dwSkillVnum) - get_global_time()); return false; } } } */ // bType이 0이면 처음부터 책으로 수련 가능 if (pkSk->dwType == 0) { ChatPacket(CHAT_TYPE_INFO, LC_TEXT("그랜드 마스터 수련을 할 수 없는 스킬입니다.")); return false; } if (GetSkillMasterType(dwSkillVnum) != SKILL_GRAND_MASTER) { if (GetSkillMasterType(dwSkillVnum) > SKILL_GRAND_MASTER) ChatPacket(CHAT_TYPE_INFO, LC_TEXT("퍼펙트 마스터된 스킬입니다. 더 이상 수련 할 수 없습니다.")); else ChatPacket(CHAT_TYPE_INFO, LC_TEXT("이 스킬은 아직 그랜드 마스터 수련을 할 경지에 이르지 않았습니다.")); return false; } std::string strTrainSkill; { std::ostringstream os; os << "training_grandmaster_skill.skill" << dwSkillVnum; strTrainSkill = os.str(); } // 여기서 확률을 계산합니다. BYTE bLastLevel = GetSkillLevel(dwSkillVnum); int idx = MIN(9, GetSkillLevel(dwSkillVnum) - 30); sys_log(0, "LearnGrandMasterSkill %s table idx %d value %d", GetName(), idx, aiGrandMasterSkillBookCountForLevelUp[idx]); int iTotalReadCount = GetQuestFlag(strTrainSkill) + 1; SetQuestFlag(strTrainSkill, iTotalReadCount); int iMinReadCount = aiGrandMasterSkillBookMinCount[idx]; int iMaxReadCount = aiGrandMasterSkillBookMaxCount[idx]; int iBookCount = aiGrandMasterSkillBookCountForLevelUp[idx]; if ( LC_IsYMIR() == true || LC_IsKorea() == true ) { const int aiGrandMasterSkillBookCountForLevelUp_euckr[10] = { 3, 3, 4, 5, 6, 7, 8, 9, 10, 15, }; const int aiGrandMasterSkillBookMinCount_euckr[10] = { 1, 1, 1, 2, 2, 2, 3, 3, 4, 5 }; const int aiGrandMasterSkillBookMaxCount_euckr[10] = { 5, 7, 9, 11, 13, 15, 18, 23, 25, 30 }; iMinReadCount = aiGrandMasterSkillBookMinCount_euckr[idx]; iMaxReadCount = aiGrandMasterSkillBookMaxCount_euckr[idx]; iBookCount = aiGrandMasterSkillBookCountForLevelUp_euckr[idx]; } if (FindAffect(AFFECT_SKILL_BOOK_BONUS)) { if (iBookCount&1) iBookCount = iBookCount / 2 + 1; else iBookCount = iBookCount / 2; RemoveAffect(AFFECT_SKILL_BOOK_BONUS); } int n = number(1, iBookCount); sys_log(0, "Number(%d)", n); DWORD nextTime = get_global_time() + number(28800, 43200); sys_log(0, "GrandMaster SkillBookCount min %d cur %d max %d (next_time=%d)", iMinReadCount, iTotalReadCount, iMaxReadCount, nextTime); bool bSuccess = n == 2; if (iTotalReadCount < iMinReadCount) bSuccess = false; if (iTotalReadCount > iMaxReadCount) bSuccess = true; if (bSuccess) { SkillLevelUp(dwSkillVnum, SKILL_UP_BY_QUEST); } SetSkillNextReadTime(dwSkillVnum, nextTime); if (bLastLevel == GetSkillLevel(dwSkillVnum)) { ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("크윽, 기가 역류하고 있어! 이거 설마 주화입마인가!? 젠장!")); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("수련이 실패로 끝났습니다. 다시 도전해주시기 바랍니다.")); LogManager::instance().CharLog(this, dwSkillVnum, "GM_READ_FAIL", ""); return false; } ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("몸에서 뭔가 힘이 터져 나오는 기분이야!")); ChatPacket(CHAT_TYPE_TALKING, LC_TEXT("뜨거운 무엇이 계속 용솟음치고 있어! 이건, 이것은!")); ChatPacket(CHAT_TYPE_INFO, LC_TEXT("더 높은 경지의 수련을 성공적으로 끝내셨습니다.")); LogManager::instance().CharLog(this, dwSkillVnum, "GM_READ_SUCCESS", ""); return true; } // END_OF_ADD_GRANDMASTER_SKILL Link to comment Share on other sites More sharing options...
[Admin] tierrilopes Posted February 1, 2018 at 03:01 PM Share Posted February 1, 2018 at 03:01 PM Já agora, queres definir % de chance de evoluir skill ao utilizar o livro, ou que a skill evolua sempre ao usar o livro? Link to comment Share on other sites More sharing options...
WLN Posted February 1, 2018 at 03:18 PM Share Posted February 1, 2018 at 03:18 PM creio que alterando isto iMinReadCount = aiGrandMasterSkillBookMinCount_euckr[idx]; iMaxReadCount = aiGrandMasterSkillBookMaxCount_euckr[idx]; iBookCount = aiGrandMasterSkillBookCountForLevelUp_euckr[idx]; já se resolva, em iBookCount = coloque quantos livros serão necessários para upar até g1 iMinReadCount = são quantos livros no minimo precisam ser lidos para upar o nivel iMaxReadCount = quantos livros no maximo pode ser lidos para upar o nivel, ao que parece podem falhar até 5 livros para m2, não podendo ultrapassar este limite Link to comment Share on other sites More sharing options...
RcDragon Posted February 1, 2018 at 04:24 PM Author Share Posted February 1, 2018 at 04:24 PM 1 hora atrás, Tierri Lopes disse: Já agora, queres definir % de chance de evoluir skill ao utilizar o livro, ou que a skill evolua sempre ao usar o livro? A % prefiro deixar como está. 1 hora atrás, wery disse: creio que alterando isto iMinReadCount = aiGrandMasterSkillBookMinCount_euckr[idx]; iMaxReadCount = aiGrandMasterSkillBookMaxCount_euckr[idx]; iBookCount = aiGrandMasterSkillBookCountForLevelUp_euckr[idx]; já se resolva, em iBookCount = coloque quantos livros serão necessários para upar até g1 iMinReadCount = são quantos livros no minimo precisam ser lidos para upar o nivel iMaxReadCount = quantos livros no maximo pode ser lidos para upar o nivel, ao que parece podem falhar até 5 livros para m2, não podendo ultrapassar este limite Vou experimentar. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now