Skip to content

Instantly share code, notes, and snippets.

@FALL1N1
FALL1N1 / gist:9874372
Created Mar 30, 2014
Load all CPP / H scripts from the Custom folder for CMake.
View gist:9874372
diff --git a/src/server/game/CMakeLists.txt b/src/server/game/CMakeLists.txt
index f455610..13f594a 100644
--- a/src/server/game/CMakeLists.txt
+++ b/src/server/game/CMakeLists.txt
@@ -48,6 +48,7 @@ file(GLOB_RECURSE sources_Tickets Tickets/*.cpp Tickets/*.h)
file(GLOB_RECURSE sources_Warden Warden/*.cpp Warden/*.h)
file(GLOB_RECURSE sources_Weather Weather/*.cpp Weather/*.h)
file(GLOB_RECURSE sources_World World/*.cpp World/*.h)
+file(GLOB_RECURSE sources_Custom Custom/*.cpp Custom/*.h)
View gist:852747a5b94073e4d03e
---- Minecraft Crash Report ----
// I let you down. Sorry :(
Time: 7/23/14 5:08 PM
Description: Ticking entity
java.lang.IllegalArgumentException: n must be positive
at java.util.Random.nextInt(Random.java:300)
at net.minecraft.server.v1_7_R3.EnchantmentManager.a(SourceFile:147)
at net.minecraft.server.v1_7_R3.EntityLiving.c(EntityLiving.java:951)
View gist:de7080dd0b4769a17c95
[17:08:23] [Server thread/ERROR]: Encountered an unexpected exception
net.minecraft.server.v1_7_R3.ReportedException: Ticking entity
at net.minecraft.server.v1_7_R3.MinecraftServer.v(MinecraftServer.java:714) ~[hysteria.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.DedicatedServer.v(DedicatedServer.java:284) ~[hysteria.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.u(MinecraftServer.java:584) ~[hysteria.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.MinecraftServer.run(MinecraftServer.java:490) [hysteria.jar:git-Spigot-1543]
at net.minecraft.server.v1_7_R3.ThreadServerApplication.run(SourceFile:628) [hysteria.jar:git-Spigot-1543]
Caused by: java.lang.IllegalArgumentException: n must be positive
at java.util.Random.nextInt(Random.java:300) ~[?:1.7.0_55]
at net.minecraft.server.v1_7_R3.EnchantmentManager.a(SourceFile:147) ~[hysteria.jar:git-Spigot-1543]
View gist:92d437cf42a57a9a949e
-- --------------------------------------------------------
-- Host: stewie.novahost.bg
-- Server version: 5.5.34-MariaDB-cll-lve - MariaDB Server
-- Server OS: Linux
-- HeidiSQL Version: 8.3.0.4694
-- --------------------------------------------------------
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
@FALL1N1
FALL1N1 / gist:29c64c1330a9154cb598
Last active Aug 29, 2015
Arena Spectator (all revisions) \\ // All you need to do is to put the both files in the CMakeLists.txt and ScriptLoader.cpp
View gist:29c64c1330a9154cb598
From 8f0b67ad3fda93e0cb7c2d29a3b4eaa405146aca Mon Sep 17 00:00:00 2001
From: Emiliyan Kurtseliyanski <emiliyan9604bg@gmail.com>
Date: Fri, 13 Mar 2015 17:50:38 +0200
Subject: [PATCH] Properly implement the Arena Spectator
---
sql/custom/spectator.sql | 13 +
src/server/game/Accounts/RBAC.h | 6 +
src/server/game/Battlegrounds/Battleground.cpp | 24 +-
src/server/game/Battlegrounds/Battleground.h | 10 +
View gist:81ad8f74d0c29bd4bb32
GmTicket::GmTicket(Player* player, WorldPacket& recvData) : _createTime(time(NULL)), _lastModifiedTime(time(NULL)), _closedBy(0), _assignedTo(0), _completed(false), _escalatedStatus(TICKET_UNASSIGNED), _haveTicket(false)
{
_id = sTicketMgr->GenerateTicketId();
_playerName = player->GetName();
_playerGuid = player->GetGUID();
uint32 mapId, unk2;
uint8 unk1, t1, t2;
recvData >> mapId;
_mapId = mapId;
View gist:5edb995150ba8f096011
package blokirai;
import org.bukkit.Server;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerJoinEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import org.bukkit.plugin.PluginManager;
import org.bukkit.plugin.java.JavaPlugin;
View Lab Work - Quest Fix
-- Lab Work Quest Replace Gobjects with Items
UPDATE `quest_template` SET `RequiredNpcOrGo1`=0, `RequiredNpcOrGo2`=0, `RequiredNpcOrGo3`=0, `RequiredNpcOrGo4`=0, `RequiredNpcOrGoCount1`=0, `RequiredNpcOrGoCount2`=0, `RequiredNpcOrGoCount3`=0, `RequiredNpcOrGoCount4`=0, `RequiredItemId1`=38386, `RequiredItemId2`=38339, `RequiredItemId3`=38340, `RequiredItemId4`=38346, `RequiredItemCount1`=1, `RequiredItemCount2`=1, `RequiredItemCount3`=1, `RequiredItemCount4`=1 WHERE `Id`=12557 LIMIT 1;
-- Missing gameobject
UPDATE `gameobject` SET `id`=190459 WHERE `guid`=55202 LIMIT 1;
@FALL1N1
FALL1N1 / gist:3691301
Created Sep 10, 2012
13383 quest fix
View gist:3691301
-- NPC SPAWN FOR QUEST FINISH /missing npc fix/
INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`, `dynamicflags`) VALUES (1108886, 32444, 571, 1, 1, 0, 0, 7622.77, 2029.56, 502.238, 0.951118, 300, 0, 0, 12600, 3994, 0, 0, 0, 0);
View gist:3691432
-- Prev quest set to 0 since this is the first quest from chain.
UPDATE `quest_template` SET `PrevQuestId`=0 WHERE `Id`=11888;