Jump to content

eatsangels

Advanced members
  • Content Count

    37
  • Joined

  • Last visited

Posts posted by eatsangels


  1. On 6/10/2022 at 7:32 AM, V3ct0r said:

    @Mario, you can create a separate .lua file, put the script there and include it in the SkillEffect.lua file.

    hi Broth I have an error with the NPC that shows me the information of the bosses. I added 3 new bosses and they give me the following error. Add start.lua and bossinfo.lua. but they don't work for mespacer.pngspacer.png spacer.png


  2. 1 minute ago, V3ct0r said:

    Do not forget that the script that implements the functionality of checking the MAC address can be quite resource-intensive. You need to make SQL queries to another database (AccountServer), this takes a relatively long time. I'm not talking about the complexity of implementing such a script.

     

    Why not just think through the map entry logic like @Maximilian suggested?

    To take away valuable items?


  3. 4 minutes ago, V3ct0r said:

    I can easily make a client modification and my MAC address will change every time the client starts. The server does not know anything about the client's MAC address, it is not transmitted over the TCP/IP protocol. The game client sends MAC address in the application layer protocol and this information cannot be trusted.

    Alright. But I think not everyone has the same ability as you-


  4. 6 minutes ago, champ said:

    Do not confuse IP address and MAC address, as that’s not the same thing. Saying IP (MAC) is invalid. You can share the same IP address by using the same network but your MAC addresses will normally be uniquely assigned to a device, hence even though this solution is not the most appropriate, it might be valid in the given context if we’re talking about MAC validation.

    I try to do it with those methods and none of them worked for me.


  5. 3 minutes ago, champ said:

    Do not confuse IP address and MAC address, as that’s not the same thing. Saying IP (MAC) is invalid. You can share the same IP address by using the same network but your MAC addresses will normally be uniquely assigned to a device, hence even though this solution is not the most appropriate, it might be valid in the given context if we’re talking about MAC validation.

    Do you know how I can limit my players from entering my server by blocking the mac


  6. On 8/21/2022 at 7:04 AM, V3ct0r said:

    Sample Algorithm:

    1) You need create a function which will accept role and return its IP address (GetChaIpAddress);

    2) Create an empty list of IP addresses of characters in a map;

    3) In check_can_enter_<mapname>() function get role's IP address. Check if IP is not on the list;

    4a) IP address is in the list. Deny entry;

    4b) IP address is not in the list. Allow entry. Add the IP address to the list;

    5) In before_leave_<mapname>() function get role's IP address. Remove it from the list.

     

    Ways to create GetChaIpAddress() function:

    1) Using LuaSQL library;

    2) Make a modification for GameServer.exe.

     

    Don't forget that player can change their IP address using various proxies and etc.

    How much do you charge me for doing that function for my server?


  7. On 2/25/2019 at 11:06 PM, Angelix said:

    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

     

    Could you help me please?. I want to implement this script on some of my maps and I haven't been able to get it to work. Some help please.


  8. Just now, V3ct0r said:

    Instead of "UPOGC" use a map on which you want apply the script. Do not forget rename functions accordingly with your map name.

    put the function at the end of all and change the function name from function UPOGCin(Player)--player enter to garner2in(Player)--player enter and the map does not open. Could you tell me in which part is that the function goes. At the end, at the beginning, or should I remove one of the ones on the map.


  9. On 2/25/2019 at 4:19 AM, mkhzaleh said:

    he can use this way too , but its may be heavily loading idk 
     

    
    
    function UPOGCin(Player)--player enter
    	local pKey = "pKey"
    	local File = GetResPath("../PlayerData/GoddessCollisio/"..pKey..".db")
    	
    	local macplayer = GetAccountMAC(Player)
    	
    	if UPOGCmap == nil then
    		if file_exists(File) == false then
    			UPOGCmap = {}
    			table.save(UPOGCmap, File)
    		else
    			UPOGCmap = table.load(File)
    		end
    	end
    		if UPOGCmap[macplayer] == nil then
    		UPOGCmap[macplayer] = {Limit = 0}
    		table.save(UPOGCmap, File)
    	end
    	if UPOGCmap[macplayer].Limit > 2 then
    	UPOGCmap[macplayer].Limit = 2
    	end
    	UPOGCmap[macplayer].Limit = UPOGCmap[macplayer].Limit + 1
    	table.save(UPOGCmap, File)
    end
    function UPOGCout(Player)--player leave
    	local pKey = "pKey"
    	local File = GetResPath("../PlayerData/GoddessCollisio/"..pKey..".db")
    	
    	local macplayer = GetAccountMAC(Player)
    	
    	if UPOGCmap == nil then
    		if file_exists(File) == false then
    			UPOGCmap = {}
    			table.save(UPOGCmap, File)
    		else
    			UPOGCmap = table.load(File)
    		end
    	end
    		if UPOGCmap[macplayer] == nil then
    		UPOGCmap[macplayer] = {Limit = 0}
    		table.save(UPOGCmap, File)
    	end
    	if UPOGCmap[macplayer].Limit < 0 then
    	UPOGCmap[macplayer].Limit = 0
    	end
    	UPOGCmap[macplayer].Limit = UPOGCmap[macplayer].Limit - 1
    	table.save(UPOGCmap, File)
    end
    function after_enter_UPOGC(role, map_copy)
    UPOGCin(role)
    end
    
    before_leave_UPOGC(role)
    UPOGCout(role)
    	
    end
    
    function check_can_enter_UPOGC(role, copy_mgr)
    
    	local UPOGC_charlimits = 2	--  mean player can join with 2 characters only --
    	local pKey = "pKey"
    	local File = GetResPath("../PlayerData/GoddessCollisio/"..pKey..".db")
    	local macplayer = GetAccountMAC(role)
    	if UPOGCmap == nil then
    		if file_exists(File) == false then
    			UPOGCmap = {}
    			table.save(UPOGCmap, File)
    		else
    			UPOGCmap = table.load(File)
    		end
    	end
    		if UPOGCmap[macplayer] == nil then
    		UPOGCmap[macplayer] = {Limit = 0}
    		table.save(UPOGCmap, File)
    		end
    	if UPOGCmap[macplayer].Limit >= UPOGC_charlimits then
    	BickerNotice(role,"You have  2 characters Inside")
    	return 0
    	end
    end

    this one works fine , 

    Could you tell me where you placed this function, to also put it on my server

×
×
  • Create New...