@extends('template.layout')
@section('title', 'NPCs')
@section('submenuItem', 'npcs')
@section('content')
@php
include './npcs.php';
$creaturesAlign = ["Ursula", "Halloween Undead"];
$creaturesAlign1 = [];
$creaturesAlign2 = ["Ancient Scarab", "Crystal Spider", "Grorlam", "The Old Widow"];
$creaturesAlign3 = [];
$creaturesAlign4 = ["Rata'mari", "Noodles", "Lightfoot", "Puffels", "Basilisk", "Dustrunner", "Smiley", "Avar Tar", "Vladruc", "Sigurd"];
$creaturesAlign5 = ["Frost Dragon", "Frozemoth"];
$creaturesOutfit = [];
$monsterDeleted = ["Flamethrower", "Magicthrower", "Plaguethrower", "Shredderthrower", "Grinch", "Evil Grinch", "Gamemaster", "Dummy Target", "Fury", "Dummy Target Ravenor", "Pumpkinhead", "Novice Pumpkinhead", "Dummy Elite"];
@endphp
| Search by name: |
Vocation: |
City: |
Premium: |
|
|
|
|
|
|
|
Npcs Total found: {{ count($npcs) }}
@php
$columnCount = 0;
usort($npcs, function ($a, $b) {
return strcmp($a['name'], $b['name']);
});
@endphp
@foreach ($npcs as $index => $creature)
@php
if(in_array($creature["name"], $monsterDeleted)){
continue;
}
$formattedCreature = str_replace(' ', '', strtolower($creature["name"]));
$creatureName = $creature["name"];
$creatureId = $creature["look"]["type"];
$professions = [];
$hasProfessions = false;
foreach ($creature['buy'] as $item) {
if (isset($item['profession']) && !empty($item['profession'])) {
$professions = array_merge($professions, $item['profession']);
$hasProfessions = true;
}
}
if (!$hasProfessions) {
$professions[] = "all";
}
$professions = array_unique($professions);
if(in_array($creatureName, $creaturesAlign) || $creature["look"]["type"] == "130" || $creature["look"]["type"] == "57" || $creature["look"]["type"] == "129" || $creature["look"]["type"] == "138" || $creature["look"]["type"] == "136" || $creature["look"]["type"] == "54" || $creature["look"]["type"] == "137" || $creature["look"]["type"] == "128" || $creature["look"]["type"] == "133" || $creature["look"]["type"] == "132" || $creature["look"]["type"] == "146" || $creature["look"]["type"] == "142"){
$style = "position: absolute; left: 23px; top: 0px";
} elseif(in_array($creatureName, $creaturesAlign1) || $creature["look"]["type"] == "117"){
$style = "position: absolute; left: 28px; top: 2px";
} elseif(in_array($creatureName, $creaturesAlign2)){
$style = "position: absolute; left: 38px; top: 5px;";
} elseif(in_array($creatureName, $creaturesAlign3)){
$style = "position: absolute; left: 30px; top: -10px";
} elseif(in_array($creatureName, $creaturesAlign4) || $creature["look"]["type"] == "160" || $creature["look"]["type"] == "9" || $creature["look"]["type"] == "144" || $creature["look"]["type"] == "66" || $creature["look"]["type"] == "5" || $creature["look"]["type"] == "73" || $creature["look"]["type"] == "63" || $creature["look"]["type"] == "48" || $creature["look"]["type"] == "23" || $creature["look"]["type"] == "78" || $creature["look"]["type"] == "70" || $creature["look"]["type"] == "65" || $creature["look"]["type"] == "71" || $creature["look"]["type"] == "64" || $creature["look"]["type"] == "18" || $creature["look"]["type"] == "19" || $creature["look"]["type"] == "37"){
$style = "position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);";
} elseif(in_array($creatureName, $creaturesAlign5)){
$style = "position: absolute; left: 40%; top: 30%; transform: translate(-50%, -50%); width: 90px";
} else {
if (isset($creature["look"]["head"]) && $creature["look"]["head"] == "0") {
$style = "position: absolute; left: 50%; top: 35%; transform: translate(-50%, -50%)";
}else{
$style= "position: absolute; left: 23px; top: 0px";
}
// $style = "position: absolute; left: 50%; top: 35%; transform: translate(-50%, -50%)";
}
if($creatureName == "The Gatekeeper" || $creatureName == "The Oracle"){
$creatureSrc = "/items/2031.gif";
}elseif($creatureName == "Cobra"){
$style="transform: rotate(180deg); margin-left: 13px";
$creatureSrc = "/items/2051.gif";
}elseif($creatureName == "Frans"){
$style="margin-left: 13px";
$creatureSrc = "/items/3114.gif";
}else{
$creatureAddon = $creature["look"]["addons"];
$creatureHead = $creature["look"]["head"];
$creatureBody = $creature["look"]["body"];
$creatureLeg = $creature["look"]["legs"];
$creatureFeet = $creature["look"]["feet"];
$creatureSrc = "/outfits/animoutfit.php?id=$creatureId&addons=$creatureAddon&head=$creatureHead&body=$creatureBody&legs=$creatureLeg&feet=$creatureFeet";
}
@endphp
@if ($columnCount % 5 == 0)
@endif
@php
$npc = $creature;
$ponto1 = ['x' => 32073, 'y' => 31323, 'z' => 7];
$ponto2 = ['x' => 32201, 'y' => 31564, 'z' => 7];
$delta = [
'x' => $ponto2['x'] - $ponto1['x'], // 128
'y' => $ponto2['y'] - $ponto1['y'], // 241
'z' => $ponto2['z'] - $ponto1['z'], // 0
];
$npcPosition = "{$npc['position'][0]},{$npc['position'][1]},{$npc['position'][2]}";
$adjustedPosition = [
'x' => $npc['position'][0] - $delta['x'],
'y' => $npc['position'][1] - $delta['y'],
'z' => $npc['position'][2] - $delta['z'],
];
$adjustedPositionString = "{$adjustedPosition['x']},{$adjustedPosition['y']},{$adjustedPosition['z']}";
$zoom = 1;
@endphp
|
@php $columnCount++; @endphp
@if (($columnCount) % 5 == 0 || $loop->last)
@endif
@endforeach
|
|
@endsection