Skip to content

Instantly share code, notes, and snippets.

@Rochet2
Rochet2 / LuaVal.h
Last active March 20, 2023 03:58
LuaVal is a C++ structure that is convertible from a lua table and to a lua table. Usage instructions at the bottom as a comment. Allows passing lua table between multiple lua states. Supports string, table, bool and number.
enum LuaTypeTag
{
TNIL,
TSTRING,
TTABLE,
TBOOL,
TNUMBER,
};
class LuaVal;
@Rochet2
Rochet2 / SRP6CryptoHasher.cs
Last active December 27, 2022 11:39
SRP6 for TC in C#/csharp
using System;
using System.Security.Cryptography;
using System.Text;
using System.Numerics;
using System.Collections.Generic;
using System.Linq;
using System.Globalization;
public static class SRP6CryptoHasher {
private static readonly RNGCryptoServiceProvider rngCsp = new RNGCryptoServiceProvider();
@Rochet2
Rochet2 / Test.cpp
Last active July 7, 2020 01:21 — forked from SymbolixDEV/Test.cpp
/*
Made by: SymboliXDEV
Edited by: Rochet2
Work %: Untested
Compile: Success
*/
#include "ScriptPCH.h"
static const uint32 buffIdstools[] = { 43223, 5862, 33377, 33779, 31305, 70692, 42995 };
local run = false
local tabid = 1
local talentid = 1
local learned = false
local GetFreeTalentPoints = GetUnspentTalentPoints or GetNumUnspentTalents
assert(GetFreeTalentPoints, "No function set for getting unspent talents!")
local function ONUPDATE(self, diff)
#ifndef STACK_INTERFACE_64
#define STACK_INTERFACE_64
#include "wrap64.h"
#include "sol.hpp"
namespace sol {
template <> struct lua_size<int64> : std::integral_constant<int, 1> {};
template <> struct lua_size<uint64> : std::integral_constant<int, 1> {};
template <> struct lua_type_of<int64> : std::integral_constant<sol::type, sol::type::userdata> {};
'worldserver.exe' (Win32): Loaded 'E:\Cores\Fork\BUILD\bin\Debug\worldserver.exe'. Symbols loaded.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\ntdll.dll'. Cannot find or open the PDB file.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\kernel32.dll'. Cannot find or open the PDB file.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\KernelBase.dll'. Cannot find or open the PDB file.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\user32.dll'. Cannot find or open the PDB file.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\gdi32.dll'. Cannot find or open the PDB file.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\advapi32.dll'. Cannot find or open the PDB file.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\msvcrt.dll'. Cannot find or open the PDB file.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\sechost.dll'. Cannot find or open the PDB file.
'worldserver.exe' (Win32): Loaded 'C:\Windows\SysWOW64\rpcrt4.dll'. Cannot find or open the PDB file.
@Rochet2
Rochet2 / test.cpp
Last active January 30, 2016 17:12
// Test solution2.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <algorithm>
#include <assert.h>
#include <chrono>
#include <iostream>
#include <math.h>
#include <map>
// Unknown creator
// Some errors fixed by CyBeR-PrO
// Edited by Rochet2
#include "ScriptPCH.h"
#include "Channel.h"
// only use lowercase letters
// The strings are trimmed of whitespace and compared lowercase
// To add more checks, just add a new line to the checks array
/************************************
* Custom Commands *
* *
* RealityNetGaming *
*************************************
*/
#include "ScriptPCH.h"
#include "Chat.h"
@Rochet2
Rochet2 / lo.cpp
Created February 4, 2014 20:58 — forked from SymbolixDEV/lo.cpp
//script made by SymbolixDEV
#include "ScriptPCH.h"
class login_script : public PlayerScript
{
public:
login_script() : PlayerScript("login_script") { }
void OnLogin(Player* player)
{
std::string msg;