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
  [Server] ORM Quarchodron 3 3,439 08.07.2020, 10:19
Last Post: Quarchodron
  [0.1.3] [server] ItemGroundSpawner HammelGammel 1 4,038 05.02.2020, 18:40
Last Post: demor140202
  [Client] Version check Quarchodron 2 4,010 25.08.2019, 14:06
Last Post: Quarchodron
  [Client] GUI Creator Quarchodron 6 7,516 12.08.2019, 23:05
Last Post: Arkhan
  [New G2O][Client-Side] bindKey Patrix 6 8,961 14.11.2018, 02:32
Last Post: Patrix
  [0.1.3] [client/server] BotCreator HammelGammel 22 26,548 08.02.2018, 22:02
Last Post: HammelGammel
  [0.1.3] [client/server] Utility Scripts HammelGammel 1 5,251 27.01.2018, 14:03
Last Post: HammelGammel
  [G2O v.0.1.2][Server-Side] NPC Manager Quarchodron 16 17,471 21.01.2018, 19:59
Last Post: Quarchodron
  [New G2O][Client-Side] Key Combination Patrix 1 3,779 23.12.2017, 13:16
Last Post: Patrix
  [CLIENT]Draw(Line/Color) Tommy 0 3,114 19.12.2017, 04:23
Last Post: Tommy

Forum Jump:


Users browsing this thread: