Adding Hook on_startcraft ? (jsPlugin)

DreTaX

Probably knows the answer...
Administrator
Jun 29, 2014
4,095
4,815
113
At your house.
github.com
Adding Hook on_startcraft ? (jsPlugin)
All hooks exist, we just lack documentation sadly.

JavaScript:
function On_Crafting(CraftingEvent)
{
    CraftingEvent.Player.Message("Time: " + CraftingEvent.LastWorkBenchTime);
    if (!CraftingEvent.IsLegit)
    {
        Server.Broadcast(CraftingEvent.Player.Name + " is crafting something that he doesn't have!");
        Server.Broadcast("What a n00b hacker!");
        //CraftingEvent.Cancel(); - Fougerite cancels the hook by default If It's not legit.
        //CraftingEvent.Player.Disconnect(); - Fougerite bans the player automatically
    }
}
Python:
def On_Crafting(self, CraftingEvent):
        CraftingEvent.Player.Message("Time: " + str(CraftingEvent.LastWorkBenchTime))
        if not CraftingEvent.IsLegit:
            Server.Broadcast(CraftingEvent.Player.Name + " is crafting something that he doesn't have!")
            Server.Broadcast("What a n00b hacker!")
            #CraftingEvent.Cancel() - Fougerite cancels the hook by default If It's not legit.
            #CraftingEvent.Player.Disconnect() - Fougerite bans the player automatically
Here are the hook names:
https://github.com/Notulp/Fougerite/blob/master/MagmaPlugin/MagmaPlugin.cs#L93

Parameters are mostly showed here.
https://github.com/Notulp/Fougerite/blob/master/MagmaPlugin/MagmaPlugin.cs#L395

If you need a hook example tell me.
 

remove.tk

Member
Trusted Member
Member
Jan 27, 2015
43
10
8
26
Parts Unknown
All hooks exist, we just lack documentation sadly.

JavaScript:
function On_Crafting(CraftingEvent)
{
    CraftingEvent.Player.Message("Time: " + CraftingEvent.LastWorkBenchTime);
    if (!CraftingEvent.IsLegit)
    {
        Server.Broadcast(CraftingEvent.Player.Name + " is crafting something that he doesn't have!");
        Server.Broadcast("What a n00b hacker!");
        //CraftingEvent.Cancel(); - Fougerite cancels the hook by default If It's not legit.
        //CraftingEvent.Player.Disconnect(); - Fougerite bans the player automatically
    }
}
Python:
def On_Crafting(self, CraftingEvent):
        CraftingEvent.Player.Message("Time: " + str(CraftingEvent.LastWorkBenchTime))
        if not CraftingEvent.IsLegit:
            Server.Broadcast(CraftingEvent.Player.Name + " is crafting something that he doesn't have!")
            Server.Broadcast("What a n00b hacker!")
            #CraftingEvent.Cancel() - Fougerite cancels the hook by default If It's not legit.
            #CraftingEvent.Player.Disconnect() - Fougerite bans the player automatically
Here are the hook names:
https://github.com/Notulp/Fougerite/blob/master/MagmaPlugin/MagmaPlugin.cs#L93

Parameters are mostly showed here.
https://github.com/Notulp/Fougerite/blob/master/MagmaPlugin/MagmaPlugin.cs#L395

If you need a hook example tell me.
Thanks