Jump to content

Syreldar

Premium
  • Posts

    1297
  • Joined

  • Last visited

  • Days Won

    38
  • Feedback

    100%

Everything posted by Syreldar

  1. I'm not sure why you made this post, given you know exactly what the problem is and why it occurs. The monster doesn't spawn because your boss.txt file for that map is empty.. so fill it?
  2. Added Colors. [Hidden Content]
  3. Why? You check with the flag still no reason to use a query to check it.
  4. quest test begin state start begin when 10581.chat."Block Player" with pc.is_gm() begin say_event_title(string.format("%s:[ENTER]", mob_name(10581))) say("Type the name of the player whom you want to") say("lock out of accessing this map.[ENTER]") local player_name = input(); -- yield say_event_title(string.format("%s:[ENTER]", mob_name(10581))) local player_vid = find_pc_by_name(player_name); if (player_vid == 0) then return say_reward(string.format("The player `%s` is offline or in another core.", player_name)); end -- if local old_vid = pc.select(player_vid, player_vid); pc.setf("map_control", "cannot_enter", 1); pc.select(old_vid, old_vid); say("Operation complete.[ENTER]") end -- when end -- state end -- quest The quest is limited due to the fact that if the player is offline or in a separate core you won't be able to reach out to him to assign the flag. This can be solved via query, i'll give you a rough example of the code using @ martysama0134's mysql_direct_query function, you can find it here paired with other useful functions: [Hidden Content] Keep in mind that this code works but you'll still have to properly escape the string on the input in order to avoid possible sqli. local results, ret = mysql_direct_query(string.format("SELECT `id` FROM `player`.`player` WHERE `name` = '%s' LIMIT 1;", player_name)); if (results > 0) then mysql_direct_query(string.format("INSERT INTO `player`.`quest`(`dwPID`, `szName`, `szState`, `lValue`) VALUES (%d, 'map_control', 'cannot_enter', 1) ON DUPLICATE KEY UPDATE `lValue` = 1;", ret[1].id)) else say_reward(string.format("The player `%s` was not found.[ENTER]", player_name)) end -- if/else
  5. Why are you here asking for a "bug free world editor" when martysama's is literally the only version that gets actively maintained and updated? and why are you asking here for it instead of reporting the bug directly in his topic so he can acknowledge it and fix it? :smh:
  6. The mentioned table for reference: # ¿ëÈ¥¼® ¼Ó¼ºº¯°æ AddÈ®·ü Å×À̺í (¿¬°ü Å×À̺í : ApplyNumSettings) Group ChangeAttrStepTables { Group GRADE_MYTH { #--# STEP 0 1 2 3 STEP_LOWEST 500 400 8 1 STEP_LOW 500 400 16 5 STEP_MID 500 400 40 10 STEP_HIGH 500 400 100 30 STEP_HIGHEST 500 400 300 150 } } So the way it works is it renders that specific probability, x% more likely to happen. As Owsap mentioned, it is not supported by the system by default.
  7. Trash that makes 0 sense. That's what I think about it. They meant for when the player attacks other players while on a mount, so not if both the player and the victim are on a mount.
  8. ActorInstanceSync.cpp: Search for: if (IsResistFallen()) return; Move this check just above this line: if (!IsUsingSkill()) ActorInstanceBattle.cpp: (Fix by @ martysama0134) Search for: // VICTIM_COLLISION_TEST const D3DXVECTOR3& kVictimPos = rVictim.GetPosition(); rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce); //*nForceRatio/100.0f); // VICTIM_COLLISION_TEST_END Substitute with: // VICTIM_COLLISION_TEST const D3DXVECTOR3& kVictimPos = rVictim.GetPosition(); float fExternalForceRatio = 1.0f; if (rVictim.IsResistFallen()) fExternalForceRatio *= 0.75f; rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce * fExternalForceRatio); //*nForceRatio/100.0f); // VICTIM_COLLISION_TEST_END
  9. 1. Open ActorInstanceSync.cpp: Search for: if (IsResistFallen()) return; Take that snippet and move it just above this check: if (!IsUsingSkill()) 2. Open ActorInstanceBattle.cpp: (Fix by @ martysama0134) Search for: rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce); //*nForceRatio/100.0f); Substitute it with: float fExternalForceRatio = 1.0f; if (rVictim.IsResistFallen()) fExternalForceRatio *= 0.75f; rVictim.m_PhysicsObject.IncreaseExternalForce(kVictimPos, c_rAttackData.fExternalForce * fExternalForceRatio); //*nForceRatio/100.0f); This allows the Push distance to still be reduced on Mental Warriors, while allowing the __Push function's SetBlendingPosition() to be executed, fixing this little desync issue.
  10. Okay? How do you plan on blocking the player from actually hitting another player with those? Even assuming you wanted to apply a solution as dirty as "If they hit a player while on mount, they dismount", no such trigger exists by default in Metin2's sources. If you had it, you could write: quest mount_dismount_pvp begin state start begin when damage with npc.is_pc() begin if (pc.is_mount()) then pc.unmount(); end -- if pc.setqf("last_pc_damage_time", get_time()); end -- when end -- state end -- quest And then, in your mount quest: -- -- when MOUNTSEAL_VNUM.use begin local last_pc_damage_time = pc.getf("mount_dismount_pvp", "last_pc_damage_time"); local cur_time, time_to_wait = get_time(), 3; if (cur_time - last_pc_damage_time < time_to_wait) then return syschat(string.format("You gotta wait %d more seconds to mount after damaging another character.", last_pc_damage_time + time_to_wait - cur_time)); end -- if pc.mount(vnum, mount_duration); pc.mount_bonus(apply_id, apply_vnum, apply_duration) end -- when -- -- But this solution is so bad I don't even want to look at it.. and I wrote it, lol. Also, this doesn't prevent damage at all, it just prevents players being on a mount while hitting other players after the first hit.
  11. Hello. Here's a list of useful globals you can use in your quests. You can add them to your questlib.lua or make a separate *.lua file and load it via dofile(). [Hidden Content] 25/04/2023: Added SELECT_YES, SELECT_ENTER, SELECT_NO; Added EMPIRES; Added ARMED_HORSE_LEVEL, MILITARY_HORSE_LEVEL; Added STATUS_VIT, STATUS_INT, STATUS_STR, STATUS_DEX; Added ITEM_TYPES, ITEM_SUB_TYPES; Added AFFECT; Updated APPLY; Added JOB_TO_RACE, RACE_TO_JOB, RACE_TO_SEX; Changed RACE_NAME_LIST; Added PC_RACE_LIST, PC2_RACE_LIST, PC3_RACE_LIST; Added MALE_RACE_LIST, FEMALE_RACE_LIST; Added SEX_NAME_LIST Added STATUS_NAME_LIST; Added EMPIRE_NAME_LIST; 11/05/2023: Improvements to the overall structure of the globals. Added POINTS 31/08/2023: Structural update for ITEMS and DUNGEON_DATA.
  12. 25/6/2022: Added get_gold_format Added BuildSkillListOfLevel Minor fixes.
  13. Flags are always always initialized with value 0. So if you enter a state and you never modified that specific flag for that specific quest up until that moment, it'll have 0 as value.
  14. ..No matter how useless it is. It's still a shared free fix, why comment like that?
  15. Select the run/walk animation of your mount. Open it in granny Click "view in detail" Profit. granny_real32 Duration = MotionDuration granny_real32 LoopTranslation = Accumulation Update the relative .msa file if they don't match with the .gr2's data: MotionDuration 0.666667 Accumulation 0.00 -300.00 0.00 Make sure it's also correct in the share/data folder in your server. Make sure the value in the mob_proto column `folder` is also correct (or in the .txt if you're using .txt protos).
  16. I can assure you that if they can bug it you made a mistake in the quest. There's no reason to use C++ whatsoever.
  17. Care to expand on that? What do you mean it's not safe?
  18. local pc_data = {}; for _, pid in ipairs({party.get_member_pids()}) do q.begin_other_pc_block(pid); -- table.insert(pc_data, {["name"] = pc.get_name(), ["level"] = pc.get_level()}); -- q.end_other_pc_block(); end -- for for index, data in ipairs(pc_data) do say(string.format("%d. %s's level is %d.", index, data["name"], data["level"])) end -- for
  19. Starting now, I'll permanently offer a 5% Discount on my services to Metin2Dev VIPs.
  20. You can't take random launchers and use them, packets have to match. You have to compile your own launcher to match your server packets.
  21. Two things @ Owsap. 1. For sure an overlook, this should be self.newTooltip.AddItemData(itemIndex, metinSlot) 2. You forgot to tell them to add this line: self.newToolTip.SetPosition(15 + self.oldToolTip.GetWidth() + 45, 38) Before if localeInfo.IsARABIC():
  22. It's literally telling you what's wrong. You are trying to compile a questfile that doesn't exist.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.