Jump to content

Syreldar

Premium
  • Posts

    1295
  • Joined

  • Last visited

  • Days Won

    38
  • Feedback

    100%

Everything posted by Syreldar

  1. 26/09/2023: Added num_to_char(num). Added char_to_num(string). Added string_to_ascii_array(string). Added ascii_array_to_string(table). Added skill_level_to_id(num). Added skill_id_to_level(string). Added time_to_sec(num, string). (Kept the old functions as wrapper funcs for backwards compatibility)
  2. No. You're effectively changing how the skill works instead of fixing the issue (which I still don't get what it even is)
  3. When will you guys stop resorting to randoms to make services for you just to pay less? This is what happens. This forums has warnings as big as a house saying to ONLY BUY THINGS FROM TRUSTED MARKETPLACE-REGISTERED USERS. The moment you go to other ppl, that's on you man.
  4. Just one piece of advice: Nobody works on promises. By writing You're basically saying they're gonna work for free until the server opens. Nobody will ever do that, servers take months to build up properly. You gotta pay ppl to work for you, or nobody ever will.
  5. Are you the server's admin and trying to implement this feature, or..?
  6. 31/08/2023: Structural update for ITEMS and DUNGEON_DATA.
  7. Didn't test, don't care, wrote in notepad in 5 min spare. This 'system' shouldn't be done in Lua btw. But if you really want make such an abomination, please, do things properly at the very least: define STUN_AFFECT_ID 210 define FALSE_ITEMS_NUM 3 -- How many false items should be in the selection. define FAILED_COUNT_LIMIT 3 -- Warp to village when failing the captcha this amount of times. define METIN_KILL_LIMIT 50 -- Show captcha upon destroying this amount of metinstones. quest anti_bot_captcha begin state start begin function setting() return { ["true_vnums"] = {101129, 9600, 12829, 2169, 11839, 12789, 71107, 79, 2099, 199, 2159, 3169, 2139, 5349, 1139, 101006, 12809, 7009, 13109, 7029, 189, 39, 7019, 29, 101005}, ["fake_vnums"] = { 11299, 17229, 7379, 2079, 101119, 20509, 2129, 18089, 11819, 129, 13089, 89, 69, 11849, 101141, 469, 12849, 101004, 16579, 2069, 101140, 14579, 169, 2039, 15459, 11899, 2019, 101144, 11499, 20259, 3199, 139, 101109, 7059, 2109, 13169, 17709, 14229, 2059, 7039, 99, 49, 101143, 13069, 18099, 11699, 479, 15449, 179, 2049, 5129, 20009, 59, 2089, 2379, 9830, 11829, 20759, 101142, 119, 2179, 2009, 2119, 16229, 11809, 101139, 19, 2029, 1349, 11859, 2179, 13149, 7049, 13129, 2149 } }; end -- function function block_player() pc.setqf("status", 1); -- Unused, but can be useful. pc.affect_stun(); end -- function function unblock_player() pc.setqf("status", 0); -- Unused, but can be useful. pc.setqf("kill_count", 0); pc.setqf("failed_count", 0); affect.remove(STUN_AFFECT_ID); end -- function function captcha_response(is_correct) if (is_correct) then anti_bot_captcha.unblock_player(); return; end -- if pc.setqf("failed_count", pc.getqf("failed_count") + 1); if (pc.getqf("failed_count") >= FAILED_COUNT_LIMIT) then pc.setqf("failed_count", 0); notice("[Captcha] Fail limit reached. Warping you back to your village..") warp_to_village(); return; end -- if say_reward(string.format("Wrong captcha! (Attempts remaining: %d)", FAILED_COUNT_LIMIT - pc.getqf("failed_count"))) anti_bot_captcha.show_captcha(); end -- function function show_captcha() local setting = anti_bot_captcha.setting(); local true_item = table_get_random_item(setting["true_vnums"]); say("What is the name of this item?") say_item_vnum(true_item); say("[ENTER][ENTER]") local random_item, chosen_items = 0, {}; table.insert(chosen_items, item_name(true_item)); for _ = 1, FALSE_ITEMS_NUM do -- table_get_random_item_except ([Hidden Content]) random_item = table_get_random_item_except(setting["fake_vnums"], chosen_items); table.insert(chosen_items, item_name(random_item)); end -- for -- table_shuffle ([Hidden Content]) local options = table_shuffle(chosen_items); local selection = select(unpack(options)); anti_bot_captcha.captcha_response(options[selection] == item_name(true_item)) end -- function when kill with not npc.is_pc() and npc.is_metin() begin pc.setqf("kill_count", pc.getqf("kill_count")+1); if (pc.getqf("kill_count") >= METIN_KILL_LIMIT) then anti_bot_captcha.block_player(); anti_bot_captcha.show_captcha(); end -- if end -- when end -- state end -- quest Thanks for the contribution, I guess.
  8. Metin2 is metin2, the code is the same for every person on the planet. You were simply doing it wrong.
  9. Place the correct files in the data folder serverside of the monster to fix, take them from the client. Then assign the monster to that folder in the mob_proto, and the problem is gone. There is no need to use c++ or weird workarounds for this.
  10. Service stopped until August the 17th, vacation time!
  11. Substitute: quest lvl_110 begin state start begin with: quest lvl_110 begin state start begin when login or levelup with pc.get_level() >= 110 begin set_state(in_mission); end -- when end -- state state in_mission begin Some more unrelated advice: 1. Substitute: when login or enter or levelup begin local data = playerMission.returnData(); send_letter(data["missionData"]["missionName"]); end 1. With: when letter begin local data = playerMission.returnData(); send_letter(data["missionData"]["missionName"]); end 2. Substitute: state run begin when login or enter begin 2. With: state run begin when letter begin 3. Substitute: state reward begin when login or enter begin 3. With: state reward begin when letter begin 4. Substitute: set_state("done"); end end state done begin when login or enter begin clear_letter(); q.done(); end end 4. With: clear_letter(); set_state("done"); end end state done begin end end
  12. Your quest is called "lvl_110", therefore function calls refer to that "class". You have 2 solutions: 1. Substitute all "playerMission." occurrences with "lvl_110." 2. Call the quest "playerMission" instead of "lvl_110" But I assume there's a reason why you called the quest "lvl_110", so the first option is the go-to.
  13. Hi, can you explain the problem you get more thoroughly?
  14. Test drop: Drop debug: In conclusion: Go back to J4M
  15. What are you even talking about, drop%s are not adding up to 100. 100% is 400. Group Metin_of_Combat { Mob 8002 Type drop 1 5000 1 20 --Copper Bell+0 -- 5% 2 11210 1 20 --Iron Plate Armour+0 -- 5% 3 11410 1 20 --Ivory Suit+0 -- 5% 4 11610 1 20 --Storm Plate Armour+0 -- 5% 5 11810 1 20 --Turquoise Clothing+0 -- 5% 6 27002 50 100 --Red Potion (M) -- 25% 7 27003 30 50 --Red Potion (L) -- 12.5% 8 27005 30 50 --Blue Potion (M) -- 12.5% 9 27006 20 50 --Blue Potion (L) -- 12.5% 10 50300 1 400 --Skill Book --100% } Ignore the comments, they're not fully accurate, but this is a perfectly valid drop from a metinstone.
  16. ..? Group Metin_of_Combat { Mob 8001 Type drop 1 50300 1 100 -- Skill Book } Book drops are made via mob_drop_item.txt, the book vnum is 50300, it automatically gets its skill vnum upon creation.
  17. ..? when kill with npc.is_pc() and pc.is_gm() and pc.get_map_index() == 182 begin local my_vid = pc.get_vid(); pc.select(npc.get_vid()); -- notice("You've been killed by a GM. You'll be warped to your village.") warp_to_village(); -- pc.select(my_vid); end -- when
  18. Depending on where you inserted it, bonuses like penetrating hits could be at fault. Be sure to place the check after bonuses such as critical and penetrating get evaluated, or simply return after setting damage to 1.
  19. I solved the issue he had and updated my topic to match the change.
  20. If you have issues, contact me on discord instead of writing here. It's simpler.
  21. wdym? As you can read, the change I made adds an arg to the RemoveAffect function. The purpose of this arg is to make the func call behave differently based on an arbitrary condition, in this case we need it to not execute the ComputePoints() call inside the function, cause we need to only call it once AFTER all the good/bad affects have been cleared, so we do that at the end of their respecting funcs. I have already stated why we need to do that in the topic, it's cause ComputePoints() is a "heavy" function, and it will lag a bit by itself already, so calling it once per affect to clear is not only useless but is also what causes the lag we're talking about.
  22. Read my message again, if possible.
×
×
  • 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.