Jump to content


  • Content count

  • Joined

  • Last visited

Everything posted by Syreldar

  1. python [Py] Root 02.02.2018

    The italian server is gameforge, their root is not cythonized, same for the english one.
  2. python [Py] Root 02.02.2018

    They stopped cythonizing it.
  3. open Help me, but i think that you cant.

    Such ignorance and presumption...
  4. Question about sash system

    #link deleted
  5. open Mobs in dungeons are aggresive

    You gotta edit this line on the serverside source. Right now, mobs spawned by the server are aggressive if inside a dungeon.
  6. open Mobs in dungeons are aggresive

    Then it's easy, show me how do you spawn them. The code part.
  7. Quest map

    Then you gave me the wrong map index.
  8. Quest map

    when login with pc.get_map_index() == taram_metin.GetSettings()["index"] and not pc.is_gm() begin If you're gm you can stay there as much as you want.
  9. open Mobs in dungeons are aggresive

    it means the file you use has a group of mobs with the "ma" / "ga" label, which makes the mobs/groups aggressive.
  10. Quest map

    quest taram_metin begin state start begin function GetSettings() local data = { ["index"] = 103, ["item"] = 30002, ["coords"] = {["x"] = 9728, ["y"] = 102400}, ["level"] = {["min"] = 30, ["max"] = 99}, ["timer"] = time_min_to_sec(20) }; return data; end -- function function RespectsRequirements() local pc_level = pc.get_level(); local data = taram_metin.GetSettings(); local level_requirement = data["level"]; return pc.count_item(data["item"]) > 0 and pc_level >= level_requirement["min"] and pc_level <= level_requirement["max"]; end -- function when 20093.chat."Valea Eroilor" begin local data = taram_metin.GetSettings(); local race = npc.get_race(); say_title(string.format("%s:[ENTER]", mob_name(race))) say("Ridicã-þi sabia laºule,doar de atât eºti în stare?") say("Devino puternic ºi aratã-mi cã eºti un adevãrat") say("rãzboinic. În curând vom merge la rãzboi ºi avem") say("nevoie de rãzboinici puternici,aºa cã devino ") say("mai puternic. Eu te pot lãsa sã intri în Valea") say("Eroilor, pentru a lupta cu") say("Pietrele Metin de acolo ºi pentru a deveni un") say("Erou adevãrat.") wait(); say_title(string.format("%s:[ENTER]", mob_name(race))) say("Pentru a te putea trece ai nevoie de Permis Valea") say("Eroilor, pe care doar Cãpitanul þi-l poate poate") say("da.[ENTER]") say_reward("Nivelul necesare pentru a intra este 30.") say_item_vnum(data["item"]); if (taram_metin.RespectsRequirements()) then say("Se pare cã totul este în regulã,pregãteºte-te") say("pentru o cãlãtorie periculoasã,te voi duce doar") say("unde cei mai curajoºi ºi mai bravi eroi au ajuns.[ENTER]") pc.remove_item(data["item"]); pc.warp(data["coords"]["x"], data["coords"]["y"]); else say_reward("Se pare cã ceva nu este în regulã, nu ai permisul") say_reward("de intrare sau nivelul minim sau ai depãºit nivelul") say_reward("maxim pânã la care poþi intra ca sã te pot duce") say_reward("în Valea Eroilor.[ENTER]") end -- if/else end -- when when login with pc.get_map_index() == taram_metin.GetSettings()["index"] and not pc.is_gm() begin local data = taram_metin.GetSettings(); notice(string.format("Ai %d minute la dispozitie sa farmezi.", data["timer"]/60)); timer("map_timer", data["timer"]); end -- when when logout with pc.get_map_index() == taram_metin.GetSettings()["index"] and not pc.is_gm() begin warp_to_village(); end -- when when map_timer.timer begin warp_to_village(); end -- when end -- state end -- quest warps you into the map if the requirements are met and then warps you back to the village after 15 minutes.
  11. Quest map

    What's the index of the map you enter via this npc?
  12. No it's not, unfortunately. function GetItemTables(index) local tables = { [1] = {1, 101, 29838, 134}, [2] = {94729, 4398292, 3928, 12}, [3] = {298, 4325, 34289, 438} }; return tables[index]; end -- function function DoesIndexContainItem(index, vnum) return table_is_in(QUESTNAME.GetItemTables(index), vnum); end -- function when NPCVNUM.take with QUESTNAME.DoesIndexContainItem(1|2|3, item.get_vnum()) begin --- end -- when
  13. open Reset skill group

    He is talking about good coding practices. No difference in the end.
  14. The hell are you doing? Just insert more values to the table, you don't need to make 2 tables..and that's not a range what the hell XD quest QUESTNAME begin state start begin function CanTakeItem(vnum) local accepted_items = {14500, 12000, 18000, 1000, 2000, 7500, 9000, 18329}; return table_is_in(accepted_items, vnum); end -- function when NPCVNUM.take with QUESTNAME.CanTakeItem(item.get_vnum()) begin -- end -- when end -- state end -- quest You can add as many as you want, just stop killing the code holy..
  15. open Reset skill group

    In reality, it is.
  16. open Quest count kill

    You still didn't learn to properly understand simple words yet you are still here asking for help. Ignorance should at least compensate with money those who compensate your ignorance with their knowledge. you are using my quest, if you want to delete the player kills use pc.delqf, since it works with QFs.
  17. It's good practice to use understandable variable names. quest QUESTNAME begin state start begin function CanTakeItem(vnum) local accepted_items = {14500, 12000, 18000}; return table_is_in(accepted_items, vnum); end -- function when NPCVNUM.take with QUESTNAME.CanTakeItem(item.get_vnum()) begin -- end -- when end -- state end -- quest table_is_in is a function which already exists in every questlib.lua. https://github.com/metin2dev/quest/blob/master/questlib.lua#L276 Yours does the same thing, but custom-made functions are meant to be readable.
  18. open Quest count kill

  19. Post your desktop.

    edit: repost
  20. Hello, pretty sure anyone of you knows about the Dispel and Heal Lag problem that has been around since always. This little modification will fix both these problems completely. (Thanks @Horinna for helping with the in-game tests) Problem: The RemoveAffect function calls ComputePoints() (Complete rearrange of all the player stats and equip parts, one of the heaviest checks). The correct function to use is RefreshAffect() which does its job pretty fine! But that's not the only problem: Based on the current code, that function would get called every single time an affect gets removed or added, while it should only get called once, at the end of the process. Solution: We could make new functions for those 2 special flags (REMOVE_BAD_AFFECT and REMOVE_GOOD_AFFECT), but in order to keep things simple for you guys, i'll simply "dynamicize" the RemoveAffect function. 1. go to char_affect.cpp: 2: go to char.h: This way, we applied a simple boolean value arg to the RemoveAffect function, which will get set to true by default. By setting it to false like this RemoveAffect(affectLUL, false); we are basically saying the game to not Rearrange the points when affectLUL gets removed. now we will use a cycle to do that for every affect like usual, and we will rearrange of the points just once, at the end of the process, like it should be. 3. In char_affect.cpp: Done! Comparison:
  21. open [SOURCE]Mob spawn

    I don't know you, but if someone who claims to know more than ME thinks he's going to improve the performance of almost HUNDREDS OF THOUSANDS of bad code lines and over 200 SOURCE-SIDED permanently active TIMERS by adding ONE SIMPLE THING to a function that's meant to manage generic things related mainly to the mob_proto which behaves similarly to what I did, which, remember, WAS A SIMPLE EXAMPLE.. then I can easily say that that person can throw everything he/she gained and learned into the trash can. Remember, there's a reason someone here is acknowledged as a developer and you aren't. I won't say anything else, nor will I answer your bullshit any further. Have a good day.
  22. open [SOURCE]Mob spawn

    At least don't comment at all.. if you want to make fun of yourself you can do it somewhere else. Talking of performance in Metin2? About an instanciated server timer? You have like no idea man, just..do us a favor and don't comment anymore.
  23. open [SOURCE]Mob spawn

    Only doable inside a dungeon tho, with the functions I can use. quest spawn_mob begin state start begin when --[[]] begin -- --** Spawns the first monster and memorizes its vid in a variable. local mob1_vid = d.spawn_mob(VNUM, LOCAL_X, LOCAL_Y); --** Sets the first monster as the 'mob1' unique. d.set_unique("mob1", mob1_vid); --** Starts the first monster''s HP check with a loop timer that will trigger once every 'check_interval_seconds' seconds. local check_interval_seconds = 5; server_loop_timer("mob1_hp_check", check_interval_seconds, d.get_map_index()); end -- when --[[ Server Loop Timer: Triggers infinitely once every X seconds, until cleared. Function: Checks the first spawned monster''s HP once every 'check_interval_seconds' seconds. If the check is met, it clears the HP check timer and executes the function inside the check. (Spawns the second monster). ]] when mob1_hp_check.server_timer begin if (d.unique_get_hp_perc("mob1") <= 90) then clear_server_timer("mob1_hp_check", get_server_timer_arg()); d.spawn_mob(VNUM2, LOCAL_X, LOCAL_Y); end -- if end -- when end -- state end -- quest
  24. open [SOURCE]Mob spawn

    Well, this code must be inside some OnUpdate()-like event in order to work, else it's never going to get called. You could easily do that in LUA, via timer.
  25. open RemoveFromCharacter Game Core

    We don't have the magical sphere, if you think we do, sorry for you. Share the code snippet you're talking about or don't ask for help.