function nameGeneratingEquipment($item_id, $slot1, $slot2, $slot3, $slot4, $refine) { if (loginMySQL()) { // Defining variables $slotText = ''; // Take the name of your equipment through its ID in the database 'item_db' $nome = mysql_fetch_object(mysql_query('SELECT * FROM `item_db` WHERE `id` = ' . $item_id)); // Treat slots $slotArray = array($slot1, $slot2, $slot3, $slot4); // Array with all 4 slots if (count(array_filter($slotArray, function ($val) { return $val > 0; }) > 0)) { // Enable if you have at least one slot that is greater than 0 if ($slot1 == 255) { // Equipment created by a player (Practically the same idea misc.pm line ~ 1756) // slot1 -> 255 | slot3 -> Id with of the char // slot2 -> Element of weapon | slot4 -> Force Weapon $textElement = array(0 => ' ', 1 => 'Glacial', 2 => 'Mineral', 3 => 'Flamejante', 4 => 'Trovejante'); // Array with the names of the elements weapon (msgstringtable.txt line 451 ~ 455) $textForce = array(1 => 'Forte', 2 => 'Muito Forte', 3 => 'Fortíssima'); // Array with the names of the forces weapon (msgstringtable.txt line 460 ~ 462) $query = mysql_fetch_object(mysql_query('SELECT * FROM `list_id_nick` WHERE `id` = ' . $slot3)); $slotText = $textElement[$slot2] . ' ' . $textForce[$slot4] . ' <font color="#564f9c">' . $query->nick . '</font>'; } else { $textRate = array(1 => '', 2 => ' Bi', 3 => ' Trip', 4 => ' Quád'); // Array with the names of the repetition the cards (msgstringtable.txt line 447 ~ 449) $cardRead = array(); // Array that will store the cards that have already been added to the $slotText, not to repeat them $rate = array_count_values($slotArray); // Array that returns the frequency of times each term appears in $cardArray // Start loop for ($i = 0; $i < 4; $i++) { if ($slotArray[$i] != 0 && !in_array($slotArray[$i], $cardRead)) { $query = mysql_fetch_object(mysql_query('SELECT * FROM `card_prefix` WHERE `id` = ' . $slotArray[$i])); $slotText = $slotText . ' ' . $query->textPrefix . $textRate[$rate[$slotArray[$i]]]; $cardRead[$i] = $slotArray[$i]; } } // End loop } } // Treating refine if ($refine != '0') { $refine = '+ ' . $refine . ' '; } else { $refine = ''; } // Return the name of the equipment echo $refine; echo $nome->name_japanese; echo ' ' . $slotText; } }
$color = imagecolorallocatealpha($img, $sprite['palette'][$b]['r'], $sprite['palette'][$b]['g'], $sprite['palette'][$b]['b'], $sprite['palette'][$b]['a']); imagesetpixel($img, $p % $image['width'] + $actInfo->x, $p / $image['width'] - $actInfo->y, $color); //http://in.php.net/manual/en/function.imagesetpixel.php $p++; } $i++; } header('content-type: ', 'image/gif'); //http://in.php.net/manual/en/function.header.php imagegif($img); //http://in.php.net/manual/en/function.imagegif.php imagedestroy($img); //http://in.php.net/manual/en/function.imagedestroy.php return true; } if (loginMySQL()) { // Corpo $s = loadSprite('spr/oboro.spr'); drawImage($s, $_GET['frame'], 0, 0, 0, 0); // Cabeça $s = loadSprite('spr/cabelo.spr'); drawImage($s, $_GET['frame'], 1, 0, 0, 0); //IMPLEMENTAR AS COISAS DE CADA UM VER ULTIMOS LOG'S DA CONVERSA COM O WAP /* // Equip Top drawImage($s, $_GET['frame'], 0, 0, 0); // Equip Mid drawImage($s, $_GET['frame'], 0, 0, 0); // Equip Low