Jump to content


  • Content count

  • Joined

  • Last visited

  • Days Won


Everything posted by Syreldar

  1. Syreldar

    open Sura Manashield Bug

    What do you mean?
  2. Syreldar

    open Sura Manashield Bug

    if (IsAffectFlag(AFF_MANASHIELD)) { // POINT_MANASHIELD ´Â ÀÛ¾ÆÁú¼ö·Ï ÁÁ´Ù int iDamageSPPart = dam / 3; int iDamageToSP = iDamageSPPart * GetPoint(POINT_MANASHIELD) / 100; int iSP = GetSP(); // SP°¡ ÀÖÀ¸¸é ¹«Á¶°Ç µ¥¹ÌÁö Àý¹Ý °¨¼Ò if (iDamageToSP <= iSP) { PointChange(POINT_SP, -iDamageToSP); dam -= iDamageSPPart; } else { // Á¤½Å·ÂÀÌ ¸ðÀÚ¶ó¼­ ÇÇ°¡ ´õ ±ï¿©¾ßÇÒ‹š PointChange(POINT_SP, -GetSP()); dam -= iSP * 100 / MAX(GetPoint(POINT_MANASHIELD), 1); } } This is the real formula.
  3. Syreldar

    open Sura Manashield Bug

    You changed the formula didn't you? It's different from usual. What were you trying to do? I can write it for you.
  4. 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:
  5. Syreldar

    open reading the MySQL column in lua

    quest ok begin state start begin when info or button begin say("blablabla") if (select("bla si", "bla no") == 1) then local _, query = mysql_direct_query(string.format("SELECT ok FROM account.account WHERE id = %d LIMIT 1;", pc.get_account_id())); say(string.format("value: %d;", query[1].ok)) end -- if end -- when end -- state end -- quest make sure your 'ok' column only accepts "int" as value types.
  6. Syreldar

    open server can't start beacause lag !!

    I'll repeat myself once again.. this is not a memory/host/machine problem. SYSERR: Jul 29 16:44:16.763476 :: Process: FDWATCH: peer null in event: ident 21 This is why your server can't start. The issue is related to the serverfiles.
  7. Syreldar

    open server can't start beacause lag !!

    SYSERR: Jul 29 16:44:16.763476 :: Process: FDWATCH: peer null in event: ident 21 This is why your server can't start.
  8. Syreldar

    [RELEASE] Some new Item-Questfunctions in Lua

    Rewritten, slottypes = { ["armor"] = 90, ["helmet"] = 91, ["shoes"] = 92, ["bracelet"] = 93, ["weapon"] = 94, ["necklace"] = 95, ["earrings"] = 96, ["slot1"] = 97, ["slot2"] = 98, ["shield"] = 100, ["costume_armor"] = 109, ["costume_hair"] = 110, ["costume_weapon"] = 111 }; function string_in_table(s, t) return t[s] ~= nil; end -- function function item.is_worn(itype) if (not string_in_table(itype, slottypes)) then return false; end -- if local itemcell = slottypes[itype]; item.select_cell(itemcell); return item.get_cell() == itemcell; end -- function function item.select_cell_check(itype) if (not string_in_table(itype, slottypes) or not item.is_worn(itype)) then return; end -- if local itemcell = slottypes[itype]; item.select_cell(itemcell); end -- function function item.get_worn_vnum(itype) item.select_cell_check(itype); return item.get_vnum(); end -- function function item.get_worn_wearflag(itype) item.select_cell_check(itype); return item.get_wearflag(); end -- function function item.get_worn_flag(itype) item.select_cell_check(itype); return item.get_flag(); end -- function function item.get_wearflag() return mysql_query(string.format("SELECT wearflag FROM player.item_proto WHERE vnum = %d;", item.get_vnum()))[1]; end -- function function item.get_flag() return mysql_query(string.format("SELECT flag FROM player.item_proto WHERE vnum = %d;", item.get_vnum()))[1]; end -- function
  9. Syreldar

    [RELEASE-LUA] Function for Time Calculation

    --[[ Returns: The time format in years, months, days, hours, minutes and seconds of a 'sec' amount of time (in seconds) to format. Example: get_time_format(52165786) => returns "1 year, 7 months, 25 days, 11 hours, 17 minutes and 34 seconds". ]] get_time_format = function(sec) local sec = tonumber(sec); local final_str = ""; local string_type = ""; local epoch = {["hour"] = 1, ["day"] = 1, ["month"] = 1, ["year"] = 1970}; local time_formats = { {["date"] = tonumber(os.date('%S', sec)), ["plural"] = "seconds", ["singular"] = "second"}, {["date"] = tonumber(os.date('%M', sec)), ["plural"] = "minutes", ["singular"] = "minute"}, {["date"] = tonumber(os.date('%H', sec))-epoch["hour"], ["plural"] = "hours", ["singular"] = "hour"}, {["date"] = tonumber(os.date('%d', sec))-epoch["day"], ["plural"] = "days", ["singular"] = "day"}, {["date"] = tonumber(os.date('%m', sec))-epoch["month"], ["plural"] = "months", ["singular"] = "month"}, {["date"] = tonumber(os.date('%Y', sec))-epoch["year"], ["plural"] = "years", ["singular"] = "year"} }; for strings, data in time_formats do if (data["date"] > 0) then if (strings > 1) then final_str = string.format(" %s", final_str); end -- if if (data["date"] > 1) then string_type = data["plural"]; else string_type = data["singular"]; end -- if/else final_str = string.format("%d %s%s", data["date"], string_type, final_str); end -- if end -- for return final_str; end -- function
  10. 24/08/2017: Polished up other functions. Added party_get_member_count, Added party.get_member_pids Added clear_dungeon, Added table.get_keyword_index Added table_is_any_subarray_containing_keyword, Added table_get_subarray_keyword_index,
  11. Title says all, this is my IntroLogo interested part. def __init__(self, stream): print "NEW LOGO WINDOW ----------------------------------------------------------------------------" ui.ScriptWindow.__init__(self) net.SetPhaseWindow(net.PHASE_WINDOW_LOGO, self) self.stream = stream self.playingVideo = 0 self.bNeedUpdate = TRUE self.nextLogoIndex = 0 self.videoList = ["gf.wmv", "ymir.wmv"] def __del__(self): ui.ScriptWindow.__del__(self) net.SetPhaseWindow(net.PHASE_WINDOW_LOGO, 0) print "---------------------------------------------------------------------------- DELETE LOGO WINDOW" Prototype.py #mainStream.SetLoadingPhase() mainStream.SetLogoPhase() #mainStream.SetLoginPhase() #mainStream.SetSelectCharacterPhase() #mainStream.SetCreateCharacterPhase() #mainStream.SetSelectEmpirePhase() #mainStream.SetGamePhase() app.Loop()
  12. Syreldar

    open Quest count problem

    when kill begin local sel = pc.getqf("select") if sel == 0 then sel = 1 end local lev = pc.getqf("current") if lev != 0 and npc.race == (special.levelup_quest[lev][sel*2-1]) and pc.getqf("buttonstate") == -1 then local remain = pc.getqf("remain") - 1 if remain <= 0 then pc.setqf("remain", 0) q.set_counter_value(0) setskin(NOWINDOW) makequestbutton(locale.level..lev..' '..locale.quest_word..' - '..locale.complete) pc.setqf("buttonstate", 3) else pc.setqf("remain", remain) q.set_counter_value(remain) end end end This is the kill, but i see no problem here, probably you've touched the kill trigger inside your sources causing it to bug out.
  13. Syreldar

    Attack speed with shaman BUG

    When a shaman has 140+ attack speed one attack on his combo doesn't hit the target. That's what he was talking about.
  14. Syreldar

    open [BUG] Core

    show us the Item::RemoveFromCharacter function
  15. Syreldar

    open I need new function

    Contact me on skype.
  16. Syreldar

    solved News bonus switch

    make a new column, and connect it to the ring's item type, done.
  17. Syreldar

    open BUG bonus 6/7 costume and ring

    What? it's not a simple number, it's (avail.size() - 1), if 0 is bigger it means the avail array contains 0 elements for some reason. You must find out why.
  18. 01/06/2018: Added factorial. (factorial(5) returns 120);
  19. Syreldar

    open Need Quest Function get_text from account

    If you don't edit source in 2018, what do you expect to accomplish? Ofc it's needed.
  20. Syreldar

    open Costume/Hair not remove 0 timer

    It means the client timer is 0 or less than the server time of the costume.
  21. Syreldar

    open Need Quest Function get_text from account

    use mysql_direct_query. Works like a charm.
  22. Syreldar

    open How to reduce Dragon Stone Shard

    Stone shards have a time, you can't stack shards with different remaining time. To reduce the drop of the stone shards, go into the quest.