Skip to content

Instantly share code, notes, and snippets.

@tgwaste
Last active May 27, 2020 19:04
Show Gist options
  • Save tgwaste/40ca9236ccc0d2c67f5a5560977ace86 to your computer and use it in GitHub Desktop.
Save tgwaste/40ca9236ccc0d2c67f5a5560977ace86 to your computer and use it in GitHub Desktop.
// cyphr3x mod
//
if ($args[1] === 'noone' and count($args) >= 7) {
$isBaby = false;
if (count($args) == 3) {
$isBaby = strcmp(strtolower($args[2]), "true") == 0;
}
$mobName = strtolower($args[0]);
foreach (self::$registeredClasses as $registeredClass) {
if (strcmp($mobName, strtolower($this->getShortClassName($registeredClass))) == 0) {
$x = (float)$args[3];
$y = (float)$args[4];
$z = (float)$args[5];
$w = $args[6];
$level = $this->getServer()->getLevelByName($w);
$position = new Position($x, $y, $z, $level);
self::scheduleCreatureSpawn($position, $registeredClass::NETWORK_ID, $level, "Monster", $isBaby);
return true;
}
}
return true;
}
//
// end of cyphr3x mod
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment