751 Soul Crystal 752 Throwing Weapon 753 Undershirt 754 Undergarment */ $LAN = array("JP", "EN", "DE", "FR"); $HUMAN_DropDown = array(); $DropDown = array(); $ALL_DropDown = array(); #Get models by name i.e gear $SelectLists = $DB->SQL("SELECT ID, Icon, Model, Material, Slot, Name_" . $LAN[$Language] . " AS NAME, Type AS TYPE FROM models ORDER BY Name_" . $LAN[$Language] . " ASC"); //print_r($SelectLists); foreach ($SelectLists as $Select) { $Hash = array(); if ($Select["Model"]) { $Hash[] = array("id" => $Select["ID"], "model" => $Select["Model"], "icon" => Iconize($Select["Icon"]), "type" => $Select["TYPE"], "material" => $Select["Material"], "name" => $Select["NAME"], "slot" => $Select["Slot"]); switch ($Select["TYPE"]) { case "NPC": $DropDown["NPC"] .= "<option value='" . base64_encode(json_encode($Hash)) . "'>" . ucwords($Select["NAME"]) . "</option>"; break; case "ITEM": if ($Select["Slot"]) { $DropDown[$Select["Slot"]] .= "<option value='" . base64_encode(json_encode($Hash)) . "'>" . ucwords($Select["NAME"]) . "</option>"; } else { $DropDown["ITEM"] .= "<option value='" . base64_encode(json_encode($Hash)) . "'>" . ucwords($Select["NAME"]) . "</option>"; } break; } } } #Get models for those we only show unique models (like mobs)
} $Hash = array(); //Show($UnHash); for ($i = 0; $i <= count($UnHash); $i += 2) { $TYPE = strtolower($UnHash[$i + 1]); $ID = $UnHash[$i]; if (!$TYPE || !$ID) { continue; } //Show($TYPE); switch ($TYPE) { case 'item': $RES = $DB->SQL("SELECT ID, Icon, Model, Material, Slot, Name_" . $LAN[$Language] . " AS NAME, Type AS TYPE FROM models WHERE ID = '" . $ID . "' AND Type='" . strtoupper($TYPE) . "'")[0]; //Show($RES); if ($RES) { $Hash[] = array("id" => $RES["ID"], "model" => $RES["Model"], "icon" => Iconize($RES["Icon"]), "type" => $RES["TYPE"], "material" => $RES["Material"], "menu" => 'player', "type" => 'item', "name" => $RES["NAME"], "slot" => $RES["Slot"]); } break; case 'monster': case 'pet': case 'primal': case 'summon': $RES = $DB->SQL("SELECT ID, Icon, Model, Material, Slot, Name_" . $LAN[$Language] . " AS NAME, Type AS TYPE FROM models_all WHERE ID = '" . $ID . "' AND Type='" . strtoupper($TYPE) . "'")[0]; if ($RES) { $Hash[] = array("id" => $RES["ID"], "model" => $RES["Model"], "icon" => $RES["Icon"], "type" => $RES["TYPE"], "material" => $RES["Material"], "menu" => strtolower($TYPE), "type" => strtolower($TYPE), "name" => $RES["NAME"], "slot" => "body"); } break; case 'beastman': $RES = $DB->SQL("SELECT ID, Icon, Body, Hands, Legs, Head, Material, Slot, Name_" . $LAN[$Language] . " AS NAME, Type AS TYPE FROM models_human WHERE ID = '" . $ID . "' AND Type='" . strtoupper($TYPE) . "'")[0]; if ($RES) { $Parts = array("Body", "Hands", "Legs", "Head");