ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 4321

[XBOX 360] How to do scriptevent protection properly

by Venom_Modz - 11-12-2018 - 12:15 AM
#1
Hi i was wondering if anybody knows how to do script Event protection with messages the correct way i have the code for it but it does not protect against every script event for some reason it protects against for example Off-Host kick and gives message and everything but if somebody tries fake leave me it does not protect against it fake leaves me so how do i fix this and i now i am calling it right

this is the code i am using

Code:
class CEventTable {
private:
    int g_EventTable;    // The pointer to the event table
    int g_EventId;         // The event id which is passed through the setup function
    int g_EventHandler;  // The address of where the handler function address is stored
public:
    CEventTable(int eventTable, int eventId) {
        this->g_EventTable = eventTable;
        this->g_EventId = eventId;
        this->g_EventHandler = *(int*)(*(int*)(this->g_EventTable) + (((this->g_EventId & 0xFFFF) + 0x4EB4) << 2));
    };
    ~CEventTable() {};
    inline CEventTable DetourEvent(int originalAddress, int destFunc) {
        if (this->g_EventHandler == originalAddress) {
            *(int*)(*(int*)(this->g_EventTable) + (((this->g_EventId & 0xFFFF) + 0x4EB4) << 2)) = destFunc;
            //WriteLog("Event 0x%X Detoured At 0x%X", this->g_EventId, destFunc);
        }
        return *this;
    }
};
void ScriptEventProtection(int r3, int r4, int r5, int r6, int r7, int r8) {
    int* iArgs = (int*)(r3 + 0x24);
    char* sName = (char*)(*(DWORD*)(r4 + 0x78) + 0x5C);
    if (iArgs[0] == 0x2 && iArgs[2] == 0x35) {
        ShowMessage_Name("Tried: Off-Host kick!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x36) {
        ShowMessage_Name("Tried: to send you to darts!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x37) {
        ShowMessage_Name("Tried: to send you to golf!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x14) {
        ShowMessage_Name("Tried: to send you to tut!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x35) {
        ShowMessage_Name("Tried: to send you to armwrestling!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x3A) {
        ShowMessage_Name("Tried: to send you to flight school!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x35) {
        ShowMessage_Name("Tried: to make you rejoin session!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x40) {
        ShowMessage_Name("Tried: to remove phone and hud!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x2D) {
        ShowMessage_Name("Tried: to remove interaction menu!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x2 && iArgs[1] == 0x34) {
        ShowMessage_Name("Tried: to make you fake leave!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x16C) {
        ShowMessage_Name("Tried: to force you into thier apt!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x2 && iArgs[1] == 0x2e) {
        ShowMessage_Name("Tried: to reset your view!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    ((DWORD(*)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD)) 0x830D9E90)(r3, r4, r5, r6, r7, r8);
    *(int*)0x835DB068 = 0x4E800421;
}
void ProtectionsLoop()
{
    CEventTable(0x83C8686C, 0x19).DetourEvent(0x830D9E90, (int)ScriptEventProtection);
}
Reply
#2
(11-12-2018 - 12:15 AM)PacMan Wrote: Hi i was wondering if anybody knows how to do script Event protection with messages the correct way i have the code for it but it does not protect against every script event for some reason it protects against for example Off-Host kick and gives message and everything but if somebody tries fake leave me it does not protect against it fake leaves me so how do i fix this and i now i am calling it right

this is the code i am using

Code:
class CEventTable {
private:
    int g_EventTable;    // The pointer to the event table
    int g_EventId;         // The event id which is passed through the setup function
    int g_EventHandler;  // The address of where the handler function address is stored
public:
    CEventTable(int eventTable, int eventId) {
        this->g_EventTable = eventTable;
        this->g_EventId = eventId;
        this->g_EventHandler = *(int*)(*(int*)(this->g_EventTable) + (((this->g_EventId & 0xFFFF) + 0x4EB4) << 2));
    };
    ~CEventTable() {};
    inline CEventTable DetourEvent(int originalAddress, int destFunc) {
        if (this->g_EventHandler == originalAddress) {
            *(int*)(*(int*)(this->g_EventTable) + (((this->g_EventId & 0xFFFF) + 0x4EB4) << 2)) = destFunc;
            //WriteLog("Event 0x%X Detoured At 0x%X", this->g_EventId, destFunc);
        }
        return *this;
    }
};
void ScriptEventProtection(int r3, int r4, int r5, int r6, int r7, int r8) {
    int* iArgs = (int*)(r3 + 0x24);
    char* sName = (char*)(*(DWORD*)(r4 + 0x78) + 0x5C);
    if (iArgs[0] == 0x2 && iArgs[2] == 0x35) {
        ShowMessage_Name("Tried: Off-Host kick!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x36) {
        ShowMessage_Name("Tried: to send you to darts!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x37) {
        ShowMessage_Name("Tried: to send you to golf!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x14) {
        ShowMessage_Name("Tried: to send you to tut!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x35) {
        ShowMessage_Name("Tried: to send you to armwrestling!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x3A) {
        ShowMessage_Name("Tried: to send you to flight school!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x35) {
        ShowMessage_Name("Tried: to make you rejoin session!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x40) {
        ShowMessage_Name("Tried: to remove phone and hud!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x2D) {
        ShowMessage_Name("Tried: to remove interaction menu!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x2 && iArgs[1] == 0x34) {
        ShowMessage_Name("Tried: to make you fake leave!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x16C) {
        ShowMessage_Name("Tried: to force you into thier apt!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x2 && iArgs[1] == 0x2e) {
        ShowMessage_Name("Tried: to reset your view!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    ((DWORD(*)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD)) 0x830D9E90)(r3, r4, r5, r6, r7, r8);
    *(int*)0x835DB068 = 0x4E800421;
}
void ProtectionsLoop()
{
    CEventTable(0x83C8686C, 0x19).DetourEvent(0x830D9E90, (int)ScriptEventProtection);
}
need print first args of fake leave you receive
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Reply
#3
(11-12-2018 - 01:08 AM)NoNameV2345 Wrote:
(11-12-2018 - 12:15 AM)PacMan Wrote: Hi i was wondering if anybody knows how to do script Event protection with messages the correct way i have the code for it but it does not protect against every script event for some reason it protects against for example Off-Host kick and gives message and everything but if somebody tries fake leave me it does not protect against it fake leaves me so how do i fix this and i now i am calling it right

this is the code i am using

Code:
class CEventTable {
private:
    int g_EventTable;    // The pointer to the event table
    int g_EventId;         // The event id which is passed through the setup function
    int g_EventHandler;  // The address of where the handler function address is stored
public:
    CEventTable(int eventTable, int eventId) {
        this->g_EventTable = eventTable;
        this->g_EventId = eventId;
        this->g_EventHandler = *(int*)(*(int*)(this->g_EventTable) + (((this->g_EventId & 0xFFFF) + 0x4EB4) << 2));
    };
    ~CEventTable() {};
    inline CEventTable DetourEvent(int originalAddress, int destFunc) {
        if (this->g_EventHandler == originalAddress) {
            *(int*)(*(int*)(this->g_EventTable) + (((this->g_EventId & 0xFFFF) + 0x4EB4) << 2)) = destFunc;
            //WriteLog("Event 0x%X Detoured At 0x%X", this->g_EventId, destFunc);
        }
        return *this;
    }
};
void ScriptEventProtection(int r3, int r4, int r5, int r6, int r7, int r8) {
    int* iArgs = (int*)(r3 + 0x24);
    char* sName = (char*)(*(DWORD*)(r4 + 0x78) + 0x5C);
    if (iArgs[0] == 0x2 && iArgs[2] == 0x35) {
        ShowMessage_Name("Tried: Off-Host kick!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x36) {
        ShowMessage_Name("Tried: to send you to darts!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x37) {
        ShowMessage_Name("Tried: to send you to golf!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x14) {
        ShowMessage_Name("Tried: to send you to tut!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x35) {
        ShowMessage_Name("Tried: to send you to armwrestling!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x3A) {
        ShowMessage_Name("Tried: to send you to flight school!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x35) {
        ShowMessage_Name("Tried: to make you rejoin session!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x40) {
        ShowMessage_Name("Tried: to remove phone and hud!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x2D) {
        ShowMessage_Name("Tried: to remove interaction menu!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x2 && iArgs[1] == 0x34) {
        ShowMessage_Name("Tried: to make you fake leave!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x16C) {
        ShowMessage_Name("Tried: to force you into thier apt!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x2 && iArgs[1] == 0x2e) {
        ShowMessage_Name("Tried: to reset your view!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    ((DWORD(*)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD)) 0x830D9E90)(r3, r4, r5, r6, r7, r8);
    *(int*)0x835DB068 = 0x4E800421;
}
void ProtectionsLoop()
{
    CEventTable(0x83C8686C, 0x19).DetourEvent(0x830D9E90, (int)ScriptEventProtection);
}
need print first args of fake leave you receive

how do i do this
Reply
#4
thanks bro for share
This account is currently banned
Ban reason: Multi
Reply
#5
(11-12-2018 - 01:24 PM)Oase Wrote: thanks bro for share

don't be dum this says Request i am looking for a better way to do this
Reply
#6
(11-12-2018 - 01:12 AM)Venom_Modz Wrote:
(11-12-2018 - 01:08 AM)NoNameV2345 Wrote:
(11-12-2018 - 12:15 AM)PacMan Wrote: Hi i was wondering if anybody knows how to do script Event protection with messages the correct way i have the code for it but it does not protect against every script event for some reason it protects against for example Off-Host kick and gives message and everything but if somebody tries fake leave me it does not protect against it fake leaves me so how do i fix this and i now i am calling it right

this is the code i am using

Code:
class CEventTable {
private:
    int g_EventTable;    // The pointer to the event table
    int g_EventId;         // The event id which is passed through the setup function
    int g_EventHandler;  // The address of where the handler function address is stored
public:
    CEventTable(int eventTable, int eventId) {
        this->g_EventTable = eventTable;
        this->g_EventId = eventId;
        this->g_EventHandler = *(int*)(*(int*)(this->g_EventTable) + (((this->g_EventId & 0xFFFF) + 0x4EB4) << 2));
    };
    ~CEventTable() {};
    inline CEventTable DetourEvent(int originalAddress, int destFunc) {
        if (this->g_EventHandler == originalAddress) {
            *(int*)(*(int*)(this->g_EventTable) + (((this->g_EventId & 0xFFFF) + 0x4EB4) << 2)) = destFunc;
            //WriteLog("Event 0x%X Detoured At 0x%X", this->g_EventId, destFunc);
        }
        return *this;
    }
};
void ScriptEventProtection(int r3, int r4, int r5, int r6, int r7, int r8) {
    int* iArgs = (int*)(r3 + 0x24);
    char* sName = (char*)(*(DWORD*)(r4 + 0x78) + 0x5C);
    if (iArgs[0] == 0x2 && iArgs[2] == 0x35) {
        ShowMessage_Name("Tried: Off-Host kick!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x36) {
        ShowMessage_Name("Tried: to send you to darts!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x37) {
        ShowMessage_Name("Tried: to send you to golf!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x14) {
        ShowMessage_Name("Tried: to send you to tut!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x35) {
        ShowMessage_Name("Tried: to send you to armwrestling!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x3A) {
        ShowMessage_Name("Tried: to send you to flight school!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x35) {
        ShowMessage_Name("Tried: to make you rejoin session!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x40) {
        ShowMessage_Name("Tried: to remove phone and hud!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x3 && iArgs[1] == 0x2D) {
        ShowMessage_Name("Tried: to remove interaction menu!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x2 && iArgs[1] == 0x34) {
        ShowMessage_Name("Tried: to make you fake leave!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x16C) {
        ShowMessage_Name("Tried: to force you into thier apt!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    if (iArgs[0] == 0x2 && iArgs[1] == 0x2e) {
        ShowMessage_Name("Tried: to reset your view!", sName);
        *(int*)0x835DB068 = 0x60000000;
    }
    ((DWORD(*)(DWORD, DWORD, DWORD, DWORD, DWORD, DWORD)) 0x830D9E90)(r3, r4, r5, r6, r7, r8);
    *(int*)0x835DB068 = 0x4E800421;
}
void ProtectionsLoop()
{
    CEventTable(0x83C8686C, 0x19).DetourEvent(0x830D9E90, (int)ScriptEventProtection);
}
need print first args of fake leave you receive

how do i do this
need print iArgs,
r3,
r4, 
r5, 
r6, 
r7, 
r8
This account is currently banned
Ban reason: Leeching and Spamming is not allowed, please read the forum Rules upon your return.
Reply
#7
(11-12-2018 - 01:46 PM)Venom_Modz Wrote:
(11-12-2018 - 01:24 PM)Oase Wrote: thanks bro for share

don't be dum this says Request i am looking for a better way to do this

"Don't be dumb"  lol.... you  just gave out offhost kick?  thanks for release lolll

(11-14-2018 - 01:17 AM)XBLxPhantom Wrote:
(11-12-2018 - 01:46 PM)Venom_Modz Wrote:
(11-12-2018 - 01:24 PM)Oase Wrote: thanks bro for share

don't be dum this says Request i am looking for a better way to do this

"Don't be dumb"  lol.... you  just gave out offhost kick?  thanks for release lolll

Also, C&P Decrash, can't even fix protections :/
Reply
#8
(11-14-2018 - 01:17 AM)XBLxPhantom Wrote:
(11-12-2018 - 01:46 PM)Venom_Modz Wrote:
(11-12-2018 - 01:24 PM)Oase Wrote: thanks bro for share

don't be dum this says Request i am looking for a better way to do this

"Don't be dumb"  lol.... you  just gave out offhost kick?  thanks for release lolll

(11-14-2018 - 01:17 AM)XBLxPhantom Wrote:
(11-12-2018 - 01:46 PM)Venom_Modz Wrote:
(11-12-2018 - 01:24 PM)Oase Wrote: thanks bro for share

don't be dum this says Request i am looking for a better way to do this

"Don't be dumb"  lol.... you  just gave out offhost kick?  thanks for release lolll

Also, C&P Decrash, can't even fix protections :/

thank what you want i have had this code before decrash was even a menu lol
Reply
#9
(11-14-2018 - 04:12 AM)Venom_Modz Wrote:
(11-14-2018 - 01:17 AM)XBLxPhantom Wrote:
(11-12-2018 - 01:46 PM)Venom_Modz Wrote:
(11-12-2018 - 01:24 PM)Oase Wrote: thanks bro for share

don't be dum this says Request i am looking for a better way to do this

"Don't be dumb"  lol.... you  just gave out offhost kick?  thanks for release lolll

(11-14-2018 - 01:17 AM)XBLxPhantom Wrote:
(11-12-2018 - 01:46 PM)Venom_Modz Wrote:
(11-12-2018 - 01:24 PM)Oase Wrote: thanks bro for share

don't be dum this says Request i am looking for a better way to do this

"Don't be dumb"  lol.... you  just gave out offhost kick?  thanks for release lolll

Also, C&P Decrash, can't even fix protections :/

thank what you want i have had this code before decrash was even a menu lol
yet all this time you couldn't fix the one's that don't work? lel
Reply
#10
(11-14-2018 - 05:17 AM)XBLxPhantom Wrote:
(11-14-2018 - 04:12 AM)Venom_Modz Wrote:
(11-14-2018 - 01:17 AM)XBLxPhantom Wrote:
(11-12-2018 - 01:46 PM)Venom_Modz Wrote:
(11-12-2018 - 01:24 PM)Oase Wrote: thanks bro for share

don't be dum this says Request i am looking for a better way to do this

"Don't be dumb"  lol.... you  just gave out offhost kick?  thanks for release lolll

(11-14-2018 - 01:17 AM)XBLxPhantom Wrote:
(11-12-2018 - 01:46 PM)Venom_Modz Wrote: don't be dum this says Request i am looking for a better way to do this

"Don't be dumb"  lol.... you  just gave out offhost kick?  thanks for release lolll

Also, C&P Decrash, can't even fix protections :/

thank what you want i have had this code before decrash was even a menu lol
yet all this time you couldn't fix the one's that don't work? lel

i bet you don't even have these working so stfu
Reply

Users browsing: 7 Guest(s)