Jump to content

Angelix

Community
  • Content Count

    518
  • Joined

  • Days Won

    68

Posts posted by Angelix


  1. Capture.PNG.ecd623d3c7fe8891be39050587308faf.PNG

     

    Can anyone help with this? Thanks.

    I managed to compile the libraries and exes, then I have 2 issues:

    • Creating a new character and trying to enter throws the error shown in screen.
      • Item ID does not even exist on server ItemInfo, can't find it given on lua files as well.
    • All characters within an account do not show up if I exit and re-enter account.

  2. 3 hours ago, willewallo said:

    thank you so much this is exactly what i was needing, this should be aviable for everyone to see if they wanna start their own server and don't know anything about coding, thank you so much.

    The issue is that people want to open a public server right away. When a problem arises they come here looking for people to fix it for them. They want a fix and want it fast, instead of trying to learn by looking at the piece of code they installed not knowing how it works. 

     

    Theres plenty of guides here about a lot of stuff. Want to host a local server? Create an account? Create a quest? New items? There’s a guide for all of that and more. You just need to have the initiative and look for the stuff you want to learn. 


  3. FapFap has a modified GameServer and somehow it doesn't register the functions, that's why it throws "nil value". He also sent me a GameServer from Lucky's file I think and it's the same thing. When I tried adding LuaSQL to the GameServer provided on files shared by Vector (138 files), it does work. 


  4. It seems you got different issues.

     

    1. Do you have a modified "garner" map? If so, did you add/remove the PvP area in the bar?
    2. Does your dream map have PK enabled via lua and also map configuration? You can check via Yammi.

    3. Your ticket functions are probably bugged, maps are not opened or wrong birth points.

    4. Modify the fairy possession function and remove the check for marriage.


  5. Just now, mkhzaleh said:

    image.png.9fca6c16469f077295380e5f1238b8d0.png
    why do u have this o.O?

    @Angelix  there
    image.png.bcd310bcdfa6f62463810e7c095365d8.png

    try change this password maybe ?
    image.png.c63de40d3d1e6c645dcaadaceaa6b333.png
    as vector said 
     

     

    I mean his scripts are going to throw errors when trying to use the item function. He also uses a variable called “amount” and doesn’t declare it anywhere. He also declares the variable “Name” and a table for “Points”, and yet he doesn’t use it, although that’s not a big problem. 

    I think the issue is that LuaSQL is not a registered function by seeing the whole “LuaSQL a nil value” thing? Don’t know much to be honest. 

     

    Anyway @FapFap, LuaSQL uses the user and password you use for each database at MSSQL, not the encrypted passwords or other users. Also, I don’t know if you have a separate database for the IMPs, if you use IGS, then it should be TradeServer. 


  6. On 3/6/2019 at 12:36 PM, mkhzaleh said:
    
    		--this table for illegal symbol 
    		local illegal = {"!","?",":","'","''","/","*","؟","@","#","$","+","-","--","%",".","..","(",")","^","=","=="
    		,"__","_","**"
    		}
    		--check if symbol exist in the name or not ----------
    		for i = 1, table.getn(illegal), 1 do
    		if (string.find(name1, ""..illegal[i].."") ~= nil) then
    		PopupNotice(role, "Please input legal alphabet or numbers!")
    			return 0
    		end
    		end

    for illegal  symbols 

    image.png.d003e9c66fe128dfc12b3fec680ee681.png
     

    I don't know if you kept all of that, but maybe give this a try.

    Function:

    CheckString = function(Name)
    	if string.len(Name) < 5 or string.len(Name) > 16 then
        return print("Name ["..Name.."] is too short or too long.")
    	end
      if string.find(Name, "[^%w%s]") ~= nil then
        return print("Name ["..Name.."] must only contain alphanumeric values.")
      end
      return print("Name ["..Name.."] is correct.")
    end

    Input Values:

    CheckString("ABCD") -- 4
    CheckString("ABCDE") -- 5
    CheckString("ABCDEFGHIJKLMNOP") -- 16
    CheckString("ABCDEFGHIJKLMNOPQ") -- 17
    CheckString("ABCDEFG IJKLMNOP") -- 16
    CheckString("ABCDEFG_IJKLMNOP") -- 16
    CheckString("A!C E@G I#K M$OP") -- 16

    Results:

    Name [ABCD] is too short or too long.
    Name [ABCDE] is correct.
    Name [ABCDEFGHIJKLMNOP] is correct.
    Name [ABCDEFGHIJKLMNOPQ] is too short or too long.
    Name [ABCDEFG IJKLMNOP] is correct.
    Name [ABCDEFG_IJKLMNOP] must only contain alphanumeric values.
    Name [A!C E@G I#K M$OP] must only contain alphanumeric values.

    You just need this simple code to check if it contains any weird symbol.

    	if string.find(<STRING>, "[^%w%s]") ~= nil then
    		...
    	end

     

    If you want to test Lua stuff without really opening a server, use the Lua manual and this site to run code:

    • Like 1

  7. Replace:

        if ItemType2 == 49 and ItemType3 == 49 then
            if Item2_Lv >= 9 or Item3_Lv >= 9 then
                SystemNotice ( role , "Gem Lv max")
                return 0
            end
        end
    
        if Item2_Lv ~= Item3_Lv then 
            
            SystemNotice(role ,"Level of 2 gems does not match")
            return 0
        end

    For this:

    	local MAX_LEVEL_GEM = 4
    	if ItemType2 == 49 and ItemType3 == 49 then
    		if Item2_Lv ~= Item3_Lv or Item2_Lv >= math.min(MAX_LEVEL_GEM, 9) then
    			SystemNotice(role, "The level of both gems do not match or have reached maximum level.")
    			return 0
    		end
    	end

     

    This will prohibit players from combining gems above the maximum level (that will be the one you place or at most level 9). This will prevent players from having gems above the said max level and therefor from forging higher gems onto equipment.

    • Thanks 1

  8. There you go since I saw you added 'tostring'.

    ChaosArgentMac = ChaosArgentMac or {}
    ChaosArgentMacLimit = 1
    function check_can_enter_garner2(Player, CopyMGR)
    	...
    	local PlayerMac = tostring(GetAccountMAC(Player))
    	ChaosArgentMac[PlayerMac] = ChaosArgentMac[PlayerMac] or 0
    	if ChaosArgentMac[PlayerMac] >= ChaosArgentMacLimit then
    		SystemNotice(Player, "You cannot enter since you already have "..ChaosArgentMacLimit.." accounts inside.")
    		return 0
    	end
    end
    function after_enter_garner2(Player, MapCopy)
    	...
    	local PlayerMac = tostring(GetAccountMAC(Player))
    	ChaosArgentMac[PlayerMac] = ChaosArgentMac[PlayerMac] + 1
    end
    function before_leave_garner2(Player)
    	...
    	local PlayerMac = tostring(GetAccountMAC(Player))
    	ChaosArgentMac[PlayerMac] = ChaosArgentMac[PlayerMac] - 1
    end
    function map_copy_close_garner2(MapCopy)
    	...
    	ChaosArgentMac = {}
    end

     


  9. Well of course it can work. The issue still persist and you amplified it though. On a server, opening and closing too many files at once will hang the server, and that’s what serialization does. It should work with the code I provided, maybe adjust a bit to allow more than one address per map so no use of aerialization. 

     

    No no issues should arise on a low population server, the problem starts when a high population server uses a heavily triggered function that uses serialization (don’t know if it gets caused on LuaSQL). The GameServer will constantly open and close text files (generated by serialization) when called by the function and it will cause lag (hang by causing functions long execution times). 

     

    Also, too much code and mine is less lines. Hahah

    • Like 1

  10. Using this function:

    function GetAccountMAC(Player)
    	local AccountName = GetActName(Player)
    	local String = "SELECT last_login_mac FROM AccountServer.dbo.account_login WHERE name = '"..AccountName.."'"
    	local Connect, CID = LuaSQL("connect", SQL.AccountServer.Host, SQL.AccountServer.User, SQL.AccountServer.Password)
    	if Connect == SQL_SUCCESS_WITH_INFO then
    		local Success, Query = LuaSQL("query", CID, String)
    		if Success == SQL_SUCCESS_WITH_INFO then
    			local Data = LuaSQL("fetch", CID, Query)
    			LuaSQL("freehandle", CID, Query)
    			LuaSQL("close", CID)
    			return Data["last_login_mac"]
    		end
    	end
    end

    Do this (using Chaos Argent as an example):

    ChaosArgentMAC = ChaosArgentMAC or {}
    
    function check_can_enter_garner2(Player, CopyMGR)
    	...
    	local PlayerMac = GetAccountMAC(Player)
    	ChaosArgentMAC[PlayerMac] = ChaosArgentMAC[PlayerMac] or false
    	if ChaosArgentMAC[PlayerMac] then
    		return 0
    	end
    end
    function after_enter_garner2(Player, MapCopy)
    	...
    	local PlayerMac = GetAccountMAC(Player)
    	ChaosArgentMAC[PlayerMac] = true
    end
    function before_leave_garner2(Player)
    	...
    	local PlayerMac = GetAccountMAC(Player)
    	ChaosArgentMAC[PlayerMac] = false
    end
    function map_copy_close_garner2(MapCopy)
    	...
    	ChaosArgentMAC = {}
    end

    Give that a try and let me know. Although it relies heavily on loading LuaSQL constantly when trying to enter, entering and leaving so I don't know what effects it may have on server stability when having a high player base. Also just in case, reset the variable after map closing so it's persistent.

    Also, I don't know if the variable will be stored correctly, maybe you can convert it to a string so it stores without a problem? Don't know. Try the above, if any issues then convert the MAC address using "tostring" function on each "GetAccountMAC" call.

    • Like 1

  11. On 12/30/2018 at 10:34 AM, DangThao said:

    Any ideas why in some server file without editing that you can go above that base attackspeed? I check some files and tested and it will go above that base attackspeed of 300 when equipped set with over 1k AGI stats(custom set with high agi).

    Base attack speed is 300, but it can reach above with passive/active skills and equipment that grant "Attack Speed", either by fixed amount or percentage.

     

×
×
  • Create New...