This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UPDATE npc_types nt | |
SET nt.aggroradius=100 | |
WHERE nt.aggroradius=120 | |
AND nt.id IN (SELECT DISTINCT s2.npcID FROM spawn2 sp | |
INNER JOIN spawngroup s ON sp.spawngroupID = s.id | |
INNER JOIN spawnentry s2 ON s2.spawngroupID = s.id | |
INNER JOIN npc_types n ON n.id = s2.npcID | |
WHERE sp.zone = 'sebilis') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT DISTINCT s2.npcID, n.id, n.name, n.MR from spawn2 sp | |
INNER JOIN spawngroup s ON sp.spawngroupID = s.id | |
INNER JOIN spawnentry s2 ON s2.spawngroupID = s.id | |
INNER JOIN npc_types n ON n.id = s2.npcID | |
WHERE sp.zone = 'sebilis'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# place this script in quests/global/global_player.pl | |
sub EVENT_DEATH_COMPLETE { | |
@keyIds = (20883); | |
my $corpse = $entity_list->GetCorpseByOwner($client); | |
foreach(@keyIds) { | |
if ($corpse->HasItem($_)) { | |
$corpse->RemoveItemByID($_); | |
quest::summonitem($_); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// From http://llvm.org/docs/ProgrammersManual.html | |
#include "llvm/Pass.h" | |
#include "llvm/IR/Function.h" | |
#include "llvm/Support/raw_ostream.h" | |
using namespace llvm; | |
namespace { | |
struct Hello : public FunctionPass { | |
static char ID; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Invoke-Webserver { | |
Param( | |
[Parameter(Mandatory=$True)] | |
[string]$port, | |
[Parameter(Mandatory=$True)] | |
[string]$ip | |
) | |
$httpd = New-Object Net.HttpListener | |
$httpd.Prefixes.Add("http://"+$ip+":"+$port+"/") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Load-Packages | |
{ | |
param ([string] $directory = 'Packages') | |
$assemblies = Get-ChildItem $directory -Recurse -Filter '*.dll' | Select -Expand FullName | |
foreach ($assembly in $assemblies) { [System.Reflection.Assembly]::LoadFrom($assembly) } | |
} | |
Load-Packages | |
$routes = @{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[xml]$books = Get-Content .\books.xml | |
$books.library.book | % {$_.title} | |
$books.library.book | % {$_.title} | ? { $_ -match 'starfish' } | |
$books.library.book | Export-Csv "books.csv" -NoTypeInformation -Delimiter:"," -Encoding:UTF8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[void] [System.Reflection.Assembly]::LoadWithPartialName("System.Windows.Forms") | |
$objNotifyIcon = New-Object System.Windows.Forms.NotifyIcon | |
$objNotifyIcon.Icon = "C:\Users\Nathan\registry.ico" | |
$objNotifyIcon.BalloonTipIcon = "Error" | |
$objNotifyIcon.BalloonTipText = "A change has been detected in your registry autostart keys." | |
$objNotifyIcon.BalloonTipTitle = "Autostart Registry Key Added" | |
$objNotifyIcon.Visible = $True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$computerSystem = Get-CimInstance CIM_ComputerSystem | |
$computerBIOS = Get-CimInstance CIM_BIOSElement | |
$computerOS = Get-CimInstance CIM_OperatingSystem | |
$computerCPU = Get-CimInstance CIM_Processor | |
$computerHDD = Get-CimInstance Win32_LogicalDisk -Filter "DeviceID = 'C:'" | |
Clear-Host | |
Write-Host "System Information for: " $computerSystem.Name -BackgroundColor DarkCyan | |
"Manufacturer: " + $computerSystem.Manufacturer | |
"Model: " + $computerSystem.Model |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class color: | |
PURPLE = '\033[95m' | |
CYAN = '\033[96m' | |
DARKCYAN = '\033[36m' | |
BLUE = '\033[94m' | |
GREEN = '\033[92m' | |
YELLOW = '\033[93m' | |
RED = '\033[91m' | |
BOLD = '\033[1m' | |
UNDERLINE = '\033[4m' |