Jump to content

Syreldar

Premium
  • Posts

    1291
  • Joined

  • Last visited

  • Days Won

    38
  • Feedback

    100%

Syreldar last won the day on March 17 2023

Syreldar had the most liked content!

About Syreldar

  • Birthday 12/22/1997

Informations

  • Gender
    Male
  • Country
    Italy
  • Nationality
    Italian

Social Networks

  • Discord
    syreldar
  • Skype
    aresyournightmare

Recent Profile Visitors

12902 profile views

Syreldar's Achievements

Veteran

Veteran (13/16)

  • Well Followed Rare
  • Reacting Well
  • Dedicated
  • Very Popular Rare
  • One Year In

Recent Badges

1.8k

Reputation

  1. special_item_group.txt Group 스폐셜 { Vnum 10050 -- type special -- 1 71148 100000 1 --Ring of Will Power 2 71149 100001 1 --Ring of Deadly Power 3 71158 100002 1 --Hero's Medal 4 71135 100003 1 --Crescent Moon Ring 5 71136 100004 1 --Mighty Lolly 6 71143 100005 1 --Ring of Joy 7 71145 100006 1 --Amulet of Eternal Love 8 71188 100007 1 --Magic Lolly 9 71199 100008 1 --Chocolate Amulet 10 71202 100009 1 --Nazar Amulet 11 72054 100010 1 --Amulet of the Guardians 12 76030 100011 1 --Power Lolly 13 76047 100011 1 --Power Lolly (3D) 14 72062 100012 1 --Experience Ring +200 15 72062 100012 1 --Experience Ring +200 16 72703 100015 1 --Tiger Bone Earring 17 72709 100015 1 --Tiger Bone Earring 18 72704 100016 1 --Dragon Bone Earring 19 72710 100016 1 --Dragon Bone Earring 20 72705 100017 1 --Tiger Bone Bracelet 21 72711 100017 1 --Tiger Bone Bracelet 22 72706 100018 1 --Dragon Bone Bracelet 23 72712 100018 1 --Dragon Bone Bracelet } -> 3 71158 100002 1 --Hero's Medal Group 속성3 { Vnum 100002 -- type ATTR -- 1 66 50 -- 2 64 30 -- 3 7 20 -- 4 9 20 -- 5 69 10 -- 6 70 10 -- effect d:\ymirwork\effect\etc\buff\buff_symbol1.mse -- }
  2. I stumbled upon a customer that had this issue today. I was not aware that you posted a solution for it almost a year ago. This is the full Lua workaround I used for the guy, posting it here just for the sake of doing it. From my functions.lua: New functions: Usage example: You could also do this upon d.new_jump* call instead of onLogin.
  3. You either aren't compiling your stuff properly or forgot to reset the flag on your character.
  4. pc.setqf("duration", ..) Remove this line.
  5. Never bought a plane ticket faster.
  6. when kill with not npc.is_pc() and math.random(100) < X begin game.drop_item_with_ownership(vnum, quantity); end -- when
  7. send_letter_ex("Wow, this quest blinks!", "blink,ex", "scroll_open.tga");
  8. "Lua is nice and good, but if you have bugs, you might need C++ to resolve the problem" It's true that certain complex bugs might require C++ work (They're so rare that the only example that comes to my mind over 10 years of development is this:) But you just cannot use that as a matter of fact when such an occurrence is that rare. I literally cannot think of any other issue that can't be solved directly without C++ work. "You can cause important errors in Lua and memory problems just like in C++" No. Unless you override entire classes like pc.* by assigning them to global variables and giving them arbitrary values, that's simply not possible. And such a gigantic mistake that can STILL be fixed in the blink of an eye, you can't say the same about C++ core crashes/memory issues. We both know that solving a generic Lua error (which still lets the game run with no issues) is much simpler than solving a core crash caused by shit C++ code made by people like you who force themselves to use it when they can't just cause "C++ is cooler / harder to use". "C++ is faster than Lua" Yes, but that doesn't matter on Metin2, due to the game's limitations, speed is not a factor: Two dungeons written in these two languages with identical code functionality will run exactly the same way and at exactly the same pace. Thus, you're wrong, you can't apply generic logic in this case. Also, while C++ is known for its speed, which again, is not a factor to take into account on Metin2, Lua offers remarkable flexibility, and C++ should be used to that end: To help assemble functions useable in Lua in order to write more complex stuff while maintaining Lua's ease to update/use; that's the whole point of scripting languages and it's the reason why YMIR adopted this design, why do you think they don't make dungeon in C++? The entire quest system has been made exactly to handle such things, and it's very much stable and safe to use, not to mention easy to use, as you said, but apparently for you "easy to use = bad" (?). Lua's straightforward syntax and semantics allow developers to implement features quickly and with fewer lines of code -> faster development cycles -> more productivity. Writing something in a harder way doesn't make it better at all. I don't know you but given the message I quoted, this doesn't seem a design choice/preference on your end to me, not as much as it seems a sorry attempt to flex and feel superior.. which you failed at miserably from what I see. I've coded much more complex stuff than this in Lua for Metin2 during my lifetime, stuff that I'm sure you can't even fathom, (For example, do you even know what a coroutine is and how to apply it on a Metin2 quest?) While this.. stuff that you made, once I remove the python UIs I get one of the most basic, boring and plain dungeons ever conceived. Be humble, and try to learn rather than trying to put other people down when you can't even defend your own competences properly. "Only Lua is easier to learn and anyone can be a Lua developer." True, it's easier to learn. You might want to start learning it, given your show of C++ knowledge today.
  9. define WEAPON_SHOP_DEALER 9001 define ARMOUR_SHOP_DEALER 9002 define TINCTURE_VNUM 71047 define SOCKETS_MAX_NUM 3 quest tincture_stone_add begin state start begin function GetItemSlotsNum() -- end -- function function BuildStoneListForItemType(item_type) -- end -- function function GetStoneFamily(stone_vnum) -- end -- function function IsStoneFamilySocketed(stone_vnum) -- end -- function function BuildAvailableStoneListForItemType(item_type) -- end -- function when WEAPON_SHOP_DEALER.take or ARMOUR_SHOP_DEALER.take begin local npc_vnum = npc.get_race(); say_title(string.format("%s:[ENTER]", mob_name(npc_vnum))) local item_type = item.get_type(); if (npc_vnum == WEAPON_SHOP_DEALER and item_type ~= ITEM_TYPES.WEAPON) then say_reward("I only accept weapons.[ENTER]") return; elseif (npc_vnum == ARMOUR_SHOP_DEALER and item_type ~= ITEM_TYPES.ARMOR) then say_reward("I only accept armors.[ENTER]") return; end -- if/elseif local item_sub_type = item.get_sub_type(); local invalid_weapon_subtypes = { ITEM_SUB_TYPES.WEAPONS.ARROW, ITEM_SUB_TYPES.WEAPONS.MOUNT_SPEAR, ITEM_SUB_TYPES.WEAPONS.QUIVER }; if (npc_vnum == WEAPON_SHOP_DEALER and table_is_in(invalid_weapon_subtypes, item_sub_type)) then say_reward("I only accept valid weapons.[ENTER]") return; elseif (npc_vnum == ARMOUR_SHOP_DEALER and item_sub_type ~= ITEM_SUB_TYPES.ARMORS.BODY) then say_reward("I only accept valid armors.[ENTER]") return; end -- if/elseif if (pc.count_item(TINCTURE_VNUM) == 0) then say_reward("You require:") say_item_vnum(TINCTURE_VNUM); return; end -- if local slots_num = tincture_stone_add.GetItemSlotsNum(); if (slots_num == 0) then say_reward("This item can't be socketed.[ENTER]") return; end -- if say(string.format("This item has %d possible slot%s.[ENTER]", slots_num, (slots_num > 1 and "s" or ""))) local available_socket_ids, socket_vnum = {}, -1; for socket_id = 0, slots_num-1 do socket_vnum = item.get_socket(socket_id); if (socket_vnum > 1) then color_say("lightgreen", string.format("Slot n.%d: %s;", socket_id + 1, item_name(socket_vnum))) else say_reward(string.format("Slot n.%d: No stone;", socket_id + 1)) table.insert(available_socket_ids, socket_id); end -- if/else end -- for if (table.getn(available_socket_ids) == 0) then say_reward("[ENTER]There's already a stone in every available socket.[ENTER]") return; end -- if local available_stones_vnums = tincture_stone_add.BuildAvailableStoneListForItemType(item_type); if (table.getn(available_stones_vnums) == 0) then say_reward("[ENTER]You don't have any stone I can socket in.[ENTER]") return; end -- if say("[ENTER]Which stone do you want to add?") local available_stones_names = {}; table.foreach(available_stones_vnums, function(_, stone_vnum) table.insert(available_stones_names, item_name(stone_vnum)); end -- function ); table.insert(available_stones_names, "Abort"); -- Window length management local available_stones_num = table.getn(available_stones_names); if (available_stones_num > 3) then say_size(350, 300 + 27 * math.min(5, available_stones_num - SOCKETS_MAX_NUM)) else say("") end -- if/else local selected_stone = select_table(available_stones_names); if (selected_stone == table.getn(available_stones_names)) then return; end -- if pc.remove_item(TINCTURE_VNUM, 1); local selected_stone_vnum = available_stones_vnums[selected_stone]; pc.remove_item(selected_stone_vnum, 1); item.set_socket(available_socket_ids[1], selected_stone_vnum); end -- when end -- state end -- quest This is an old quest I wrote. In order for the logic to work, the socket of index 0 must work.. and it does even on traditional kraizy files. Are you sure this error is a thing? I'm pretty sure (although I didn't check) that some official quests also use that very same instruction.
  10. Because.. you are only executing this code on login. .get doesn't exist as a trigger.
  11. 24/01/2024 (last update): The func 'is_valid_number' now has an "allow_zero" arg. and default values. Added 'count_digits(num)'. Added 'get_nth_digit(num, index)'. Added 'generate_num_array(limit)'. Added 'get_time_after_seconds(sec)'. Added 'mirror_shuffle(original_table, shuffled_table, target_table)' Renamed BuildSkillList to BuildSkillList2 in order to avoid conflicts with the default func from ymir. it's been fun.
  12. (pc/d).set_warp_location(index, warp_x, warp_y)
  13. Bro. You don't need a C++ function for such a thing. InDungeon = function(map_index) local pc_index = pc.get_map_index(); return pc.in_dungeon() and pc_index >= ToDungeonIndex(map_index) and pc_index < ToDungeonIndex(map_index+1); end -- function when MOB_VNUM.kill with InDungeon(DUNGEON_MAP_INDEX) begin
×
×
  • 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.