Jump to content

exequens

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by exequens

  1. Oh my God, thank you very much for going to such length. Unfortunately, I cannot contribute as much as you do as I am a newbie in the coding department. That is why I'm posting it in a source request sub-forum... I did some digging though. I think we should be able to make use of something like this? std::shared_ptr<s_job_info> job = job_db.find(sd->status.class_); std::shared_ptr<s_skill_tree> tree = skill_tree_db.find(job_class); If we make the code find the class and find the skill instead using that, it should make the code smaller no? The only problem is, I don't know how to use it.
  2. Thanks for telling me to use code widget, edited first post. Also thanks for showing a clear working example. So if that works, then what we should do is make a function that can determine what skill_id is belong to what job tab? Something like this maybe? // Returns the job tier (Novice=0, 1st=1, 2nd=2, etc.) int pc_get_job_tier(uint64 class_) { if (class_ & JOBL_FOURTH) return 4; if (class_ & JOBL_THIRD) return 3; if (class_ & JOBL_2) return 2; if ((class_ & MAPID_BASEMASK) != MAPID_NOVICE) return 1; return 0; // Novice/Summoner } // Returns the skill's job tier int skill_get_job_tier(uint16 skill_id) { if (skill_id >= NV_BASIC && skill_id <= NV_TRICKDEAD) return 0; if (skill_id >= SM_SWORD && skill_id <= SM_BASH) return 1; return 0; // Default to Novice if unknown } I'm honestly not sure...
  3. I want to be able to show a warning if a player is trying to allocate a skill point on a higher job tab. For example, a player resets their skills, normally you won't be able to allocate your skill point to your 4th job tab if you havent spent enough skpoint in all your 1st, 2nd, and 3rd job tab. It would be very nice to be able to show a warning that basically says: "You need to spend %d skill point(s) before spending it on your xx job tab" I have tried doing it myself, but I just can't seem to get it right. Am I right to tinker with this specific block on src/map/pc.cpp /*========================================== * Update skill_lv for player sd * Skill point allocation *------------------------------------------*/ void pc_skillup(map_session_data *sd,uint16 skill_id) { uint16 idx = skill_get_index(skill_id); nullpo_retv(sd); if (!idx) { if (skill_id) ShowError("pc_skillup: Player attempts to level up invalid skill '%d'\n", skill_id); return; } // Level up guild skill if (SKILL_CHK_GUILD(skill_id)) { guild_skillup(sd, skill_id); return; } // Level up homunculus skill else if (sd->hd && SKILL_CHK_HOMUN(skill_id)) { hom_skillup(sd->hd, skill_id); return; } else { if( sd->status.skill_point > 0 && sd->status.skill[idx].id && sd->status.skill[idx].flag == SKILL_FLAG_PERMANENT && //Don't allow raising while you have granted skills. [Skotlex] sd->status.skill[idx].lv < skill_tree_get_max(skill_id, sd->status.class_) ) { sd->status.skill[idx].lv++; sd->status.skill_point--; if( !skill_get_inf(skill_id) || pc_checkskill_summoner(sd, SUMMONER_POWER_LAND) >= 20 || pc_checkskill_summoner(sd, SUMMONER_POWER_SEA) >= 20 ) status_calc_pc(sd,SCO_NONE); // Only recalculate for passive skills. else if( sd->status.skill_point == 0 && pc_is_taekwon_ranker(sd) ) pc_calc_skilltree(sd); // Required to grant all TK Ranker skills. else pc_check_skilltree(sd); // Check if a new skill can Lvlup uint16 lv = sd->status.skill[idx].lv; int32 range = skill_get_range2(&sd->bl, skill_id, lv, false); bool upgradable = ( lv < skill_tree_get_max( sd->status.skill[idx].id, sd->status.class_ ) ); clif_skillup( *sd, skill_id, lv, range, upgradable ); clif_updatestatus(*sd,SP_SKILLPOINT); if( skill_id == GN_REMODELING_CART ) /* cart weight info was updated by status_calc_pc */ clif_updatestatus(*sd,SP_CARTINFO); if (pc_checkskill(sd, SG_DEVIL) && ((sd->class_&MAPID_THIRDMASK) == MAPID_STAR_EMPEROR || pc_is_maxjoblv(sd))) clif_status_change(&sd->bl, EFST_DEVIL1, 1, 0, 0, 0, 1); //Permanent blind effect from SG_DEVIL. if (!pc_has_permission(sd, PC_PERM_ALL_SKILL)) // may skill everything at any time anyways, and this would cause a huge slowdown clif_skillinfoblock(sd); } //else // ShowDebug("Skill Level up failed. ID:%d idx:%d (CID=%d. AID=%d)\n", skill_id, idx, sd->status.char_id, sd->status.account_id); } I'm reading the function pc_calc_skilltree_normalize_job_sub as well, but I can't grasp it. Anyone willing to help me?
  4. Can you please share the `proxy.1337` and the `ExtendCashShopPreview.1337` file? I wasn't able to get it...
  5. Got this crash when using @killmonster command
  6. Thank you very much for the detailed tutorial. I have a question, can you help me with this error that appears every time I tried to make a new character? [ERROR]WFIFOSET: Maximum write buffer size for client connect 7 exceeded, most likely caused by packet 0x006e (len=3, ip=xxx). I've made sure my pakcetver is right, there should also be no mistake on my scripts since its a fresh install. Also, as you've suggested I did all and every port a "sudo ufw allow" including udp and tcp on each and every one of them ports listed on the first post. EDIT: Don't be like me, I overthink things so much that I overlook the simplest detail on "char_new" inside char.conf... Basically, stupid me forgot to set it to yes...
  7. Am I interpreting things wrong here? Can anyone help tell me what did I miss? #define MAX_CHARS 15 inside mmo.h is maximum an account can create character INCLUDING the amount of #define MAX_CHAR_VIP put inside core.h right? Which means if VIP is enabled, I can only create 10 characters on a normal account since MAX_CHAR_VIP is 5 and is proofed by the sql table on the second entry, 10 char slots on normal account, and 15 char slots on an account with VIP. I did just that, and char server sends me that error. I also tried changing MAX_CHARS to 10, recompile and create a new account and yeah, the new account only have 5 char slots. So.... What did I do wrong? Why does my char server sends me that error? Is it a normal behavior because 15+5 = 20? Did I miss something?
×
×
  • Create New...