Jump to content

Home

Community
  • Content Count

    115
  • Joined

  • Last visited

  • Days Won

    6

Posts posted by Home


  1. Hi friends,

    I'll open my own server very soon...

    It will be an original pko server files.

    im not experienced with private servers, so if possible, i want some tips.

    for example: what should i know before opening an server?

    Thank.


  2.  

     

    Explanation

    It just consists of checking if there's a cloned character around the game servers, and them automatically remove's it, without the necessity of punishing the player...

     

    HOW TO USE

      1 - Make folder called players resource/script/

         resource/script/players

      2 - Add the fellowing functions in anywhere of your functions.lua

    
    function GetCurrentGameServer()
      local ret, npc = GetEudemon()
    
      return GetChaDefaultName(npc)
    end
    
    
    function SaveFile (path, name, extension, content)
      local file = io.open (path .. name .. extension, "w")
    
      file:write (content)
      file:close ()
    end
    
    function ReadFile (path, name, extension)
      local file = io.open (path .. name .. extension, "r")
      local content = file:read ()
    
      file:close ()
    
      return content
    end
    
    function SaveGameServer (role)
      SaveFile(PLAYERS_DIR, GetRoleID(role), '.txt', GetCurrentGameServer())
    end
    
    
    function AfterEnter(role)
      SaveGameServer(role)
    end
    
    
    function RemoveClonedCha(role)
      local RoleID = GetRoleID(role)
      local SavedGameServer = ReadFile(PLAYERS_DIR, RoleID, '.txt')
      local CurrentGameServer = GetCurrentGameServer()
    
      if SavedGameServer ~= CurrentGameServer then
        MoveCity(role, 'Prison Island')
      end
    end

     

    3 - Add the fellowing inside of cha_timer()

    if Cha_Num >= 1 and Cha_Num <= 4 then
        RemoveClonedCha(role)
      end

     

    4 - Add the fellowing inside of every map ctrl.lua, after_enter_mapname function.. ( if there's not ctrl.lua for the map of even the after_enter_* function so create it one

    AfterEnter(role)

    5 - Add the fellowing CONSTANT to variables.lua

    PLAYERS_DIR = "resource/script/players/"

     

     

    And its done... thanks for PKODEV members tips.

     

    ATTENTION DONT USE &updateall COMMAND, cuz it'll bug the anti dupe system...

    • Like 2

  3.  

     

    HOW IT WORKS

     

    STEPS

      1 - Everytime a player enters a map, it saves they CURRENT GAMESERVER in a file resource/script/players/playername.txt

      2 - When player leaves the map it saves the text "out" in the resource/script/players/playername.txt

      3 - When the player teleports to another map the destiny will check if the playername.txt contains "out" or its gameserver name"...

       ... if not ... shows a message ... "GOD IS WATCHING YOU"

     

    gameserver.cfg

    equment = System00

    gameserver1.cfg

    equment = System01

    gameserver2.cfg

    equment = System02

    gameserver3.cfg

    equment = System03

    gameserver4.cfg

    equment = System04

     

    Functions.lua code --> place it anywhere

    function GetCurrentGameServer()
      local ret, npc = GetEudemon()
      local GSName = GetChaDefaultName(npc)
    
      return GSName
    end
    
    function GetSavedGameServer (role)
      f = io.open ("resource/script/players/" .. GetChaDefaultName (role) .. ".txt", "r")
      SavedGameServer = f:read ()
      f:close ()
    
      return SavedGameServer
    end
    
    function SaveGameServer (role)
      local gameserver = GetCurrentGameServer()
    
      f = io.open ("resource/script/players/" .. GetChaDefaultName (role) .. ".txt", "w")
      f:write (gameserver)
      f:close ()
    end
    
    function CleanGameServer (role)
      f = io.open ("resource/script/players/" .. GetChaDefaultName (role) .. ".txt", "w")
      f:write ("out")
      f:close()
    end

     

    all maps ctrl.lua code

     

    after enter  ( Here is where you can do whatever you want if caught the trying to dupe... ) I just show a message ('God is watching you')

    	savedGS = GetSavedGameServer(role)
      currentGS = GetCurrentGameServer()
    
    	if (savedGS ~= "out" and savedGS ~= currentGS) then
        Notice("God is watching you...")
      end
    
      SaveGameServer(role)

     

    before leaves

      CleanGameServer(role)

     

     

    • Like 9

  4. Hi Friends...

        I made this Anti Dupe method, for teleporting ways, let me explain how it works...

     

    EXPLANATION

     

    PLAYER teleports from Argent City(GS0) to Shaitan City ( GS1) ...

    TELEPORTER gives him a GS1 "token"...

     

    IF Player arrives to destination GS1 Token is deleted by destination map

    ELSE if PLAYER tries to DUPE closing the game before teleporting,then when the player enter the map again the source map will check for the GS1 Token if it's there PLAYER will be automaticaly teleported to DESTINATION MAP, no having time to trade the itens or even droping

     

    It worked here on my tests...

     

    DEMO Resource with this method - ( ONLY BETWEEN Argent Teleporter and Shaitan Teleporter ) --

    http://www.mediafire.com/download/p1u26j4a7vtdvo7/resource(2).rar

     

    The modifications are in

    GoToWhere function

    garner.ctrl

    magicsea.ctrl

    variables

     

     

    ... I'll finish it after i take a bath

     

    • Like 1

  5. Is that the regular process of teleportation?

     

    PLAYER clicks to teleport...
    SERVER creates a character instance in the Destination Game Server
    SERVER updates the character data in database with Source GameServer character instance data
    SERVER deletes current Source Game Server character instance...
     


  6. What i know about duping...

     

     

     

    Little Explanation

     

    Inventory, Temp Bag, Bank are stored in resource table

     

    Inventory, Temp Bag, Bank data are stored in memory by the current GameServer while the play dont leaves GameServer

     

    Even if the player trade, drops, store in bank or receive itens for another player it is only updated in memory, and not in resource table, until the player leaves GameServer

     

    When a player teleports from Argent City to Shaitan City, Shaitan Ciy Game Server gets the data from resource table, and not from Argent City Game Server

     

    • Like 1
×
×
  • Create New...