Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[0.1.4.*] [client/server] Simple anty-cheat
#1
Description:
This is simple anty-cheat, that protects the server from unexpected change strength, dexterity, health, maxhealth, mana and maxmana.

WIKI: CLICK ME

If you have any suggestion, report it here: Issues

Current Version: 0.7

Readme: README
Download: CLICK ME

Requirements:
packets.nut client/server side from default G2O scripts (you must include it before AC)

Installation:
1. Extract G2O_Simple_AC.zip
2. Move all resulting files to main server-files folder.
3. Add the following to your config.xml (BEFORE YOUR GAMEMODE SCRIPTS!):
Code:
<import src="ac.xml" />

5. Add to onInit() (server-side):
Code:
initAntyCheat(true);

6. Add to onPlayerDisconnect(pid, reason) SERVER-SIDE:
Code:
clearACStructure(pid);


New callbacks (example usage in ac-server/callbacks.nut):
Code:
onPlayerUseCheats(int pid, string category, int newvalue, int oldvalue)



New functions(SERVER-SIDE):
Code:
array getEquipment(int pid)

getEquipment is a function which returns only synchronized items (protection from Daedalus CreateInvItems and other method to unexpected giveItem or clone items).


Repository
Reply
#2
gut gut
[Image: CPCFNwD.png]
Reply
#3
Release 0.4:

New Functions(SERVER-SIDE):
Code:
array getEquipment(pid)

getEquipment is a function which returns only synchronized items (protection from Daedalus CreateInvItems and other method to unexpected giveItem or clone items).

Example usage:
Code:
addEventHandler("onPlayerCommand", function(pid, cmd, params)
{
    switch(cmd)
    {
        case "geteq":
        {
            local items = getEquipment(pid);
            
            foreach(k, v in items)
                sendMessageToPlayer(pid, 255, 255, 255, Items.name(v[0]) + " " + v[1]);
        };
        
        break;
    };
});


Enjoy it ! ;-)
Reply
#4
Release 0.5:

Changelog:
  • From now getEquipment(pid) include ItemsGround objects.

Reply
#5
Release 0.6:

Changelog:
  • From now array with items react to clientside function "clearInventory()"
  • Array with items also react to consumption food and plants
  • Added protection from unexpected change mana and maxmana

Reply
#6
good boy
[Image: CPCFNwD.png]
Reply
#7
You can add checking hashes of GOTHIC.DAT
[Image: CPCFNwD.png]
Reply
#8
Release 0.7:

Changelog:
  • Fixed duplicate items in arrray

Reply
#9
Maybe instead of creating numerical array for every player, you should create a associative table?
A string index (instance of item) allows you to get value from table immediately.

It will require less looping, but table will take more memory.
It's only a suggestion Smile.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [New G2O][Client] Free Camera Patrix 2 1,325 06.05.2020, 17:53
Last Post: Patrix
  [0.1.3] [server] ItemGroundSpawner HammelGammel 1 1,655 05.02.2020, 17:40
Last Post: demor140202
  [Client] Version check Quarchodron 2 1,346 25.08.2019, 13:06
Last Post: Quarchodron
  [Client] GUI Creator Quarchodron 6 2,436 12.08.2019, 22:05
Last Post: Arkhan
  [New G2O][Client-Side] bindKey Patrix 6 3,979 14.11.2018, 01:32
Last Post: Patrix
  [New G2O][Client-Side] OOP Camera Movement Patrix 1 1,797 20.10.2018, 13:22
Last Post: Patrix
  [0.1.3] [client/server] BotCreator HammelGammel 22 11,383 08.02.2018, 21:02
Last Post: HammelGammel
  [0.1.3] [client/server] Utility Scripts HammelGammel 1 2,268 27.01.2018, 13:03
Last Post: HammelGammel
  [G2O v.0.1.2][Server-Side] NPC Manager Quarchodron 16 7,779 21.01.2018, 18:59
Last Post: Quarchodron
  [New G2O][Client-Side] Key Combination Patrix 1 1,608 23.12.2017, 12:16
Last Post: Patrix

Forum Jump:


Users browsing this thread: 1 Guest(s)