Reklam
Merhabalar bir item non upgrade , reverse , uniq yada neyse bunu databasenın hangi tablosunun hangi stunundan bakabiliriz?
switch ($item->ItemType) {
case 0:
$itemType = "<h2 class='type_0'>(Normal Item)</h2>";
break;
case 1:
$itemType = "<h2 class='type_1'>(Magic Item)</h2>";
break;
case 2:
$itemType = "<h2 class='type_2'>(Rares Item)</h2>";
break;
case 3:
$itemType = "<h2 class='type_3'>(Craft Item)</h2>";
break;
case 4:
$itemType = "<h2 class='type_4'>(Unique Item)</h2>";
break;
case 5:
$itemType = "<h2 class='type_5'>(Upgrade Item)</h2>";
break;
case 6:
$itemType = "<h2 class='type_6'>(Event Item)</h2>";
break;
case 7:
$itemType = "<h2 class='type_7'>(Pet Item)</h2>";
break;
case 8:
$itemType = "<h2 class='type_8'>(Cospre Item)</h2>";
break;
case 9:
$itemType = "<h2 class='type_9'>(Minerva Item)</h2>";
break;
case 11:
$itemType = "<h2 class='type_11'>(Reverse Upgrade Item)</h2>";
break;
case 12:
$itemType = "<h2 class='type_12'>(Reverse Unique Item)</h2>";
break;
}
Hocam ITEM tablosunda ItemType kolonunda istediğin veri tipi mevcut. Ben panellerim de aşağıda ki type = name eşleşmesini kullanıyorum. Bunlar default bir knight_online veritabanı için uygundur fakat yeni eklenen item typelar var ise onları tam bilemiyorum.
PHP:switch ($item->ItemType) { case 0: $itemType = "<h2 class='type_0'>(Normal Item)</h2>"; break; case 1: $itemType = "<h2 class='type_1'>(Magic Item)</h2>"; break; case 2: $itemType = "<h2 class='type_2'>(Rares Item)</h2>"; break; case 3: $itemType = "<h2 class='type_3'>(Craft Item)</h2>"; break; case 4: $itemType = "<h2 class='type_4'>(Unique Item)</h2>"; break; case 5: $itemType = "<h2 class='type_5'>(Upgrade Item)</h2>"; break; case 6: $itemType = "<h2 class='type_6'>(Event Item)</h2>"; break; case 7: $itemType = "<h2 class='type_7'>(Pet Item)</h2>"; break; case 8: $itemType = "<h2 class='type_8'>(Cospre Item)</h2>"; break; case 9: $itemType = "<h2 class='type_9'>(Minerva Item)</h2>"; break; case 11: $itemType = "<h2 class='type_11'>(Reverse Upgrade Item)</h2>"; break; case 12: $itemType = "<h2 class='type_12'>(Reverse Unique Item)</h2>"; break; }
Ama @ChaosKnightX 'da bahsettiği gibi veritabanından veritabanına değişiklik gösterebiliyor. Bazılarında Kind sütununda, bazılarında ise ItemType sütununda tutuluyor bu veri. Ama ben Kind için aşağıda ki kod bloğunu kullanıyorum, ItemType içinse yukarıda vermiş olduğumu.Hocam ITEM tablosunda ItemType kolonunda istediğin veri tipi mevcut. Ben panellerim de aşağıda ki type = name eşleşmesini kullanıyorum. Bunlar default bir knight_online veritabanı için uygundur fakat yeni eklenen item typelar var ise onları tam bilemiyorum.
PHP:switch ($item->ItemType) { case 0: $itemType = "<h2 class='type_0'>(Normal Item)</h2>"; break; case 1: $itemType = "<h2 class='type_1'>(Magic Item)</h2>"; break; case 2: $itemType = "<h2 class='type_2'>(Rares Item)</h2>"; break; case 3: $itemType = "<h2 class='type_3'>(Craft Item)</h2>"; break; case 4: $itemType = "<h2 class='type_4'>(Unique Item)</h2>"; break; case 5: $itemType = "<h2 class='type_5'>(Upgrade Item)</h2>"; break; case 6: $itemType = "<h2 class='type_6'>(Event Item)</h2>"; break; case 7: $itemType = "<h2 class='type_7'>(Pet Item)</h2>"; break; case 8: $itemType = "<h2 class='type_8'>(Cospre Item)</h2>"; break; case 9: $itemType = "<h2 class='type_9'>(Minerva Item)</h2>"; break; case 11: $itemType = "<h2 class='type_11'>(Reverse Upgrade Item)</h2>"; break; case 12: $itemType = "<h2 class='type_12'>(Reverse Unique Item)</h2>"; break; }
switch ($item->Kind) {
case 0:
$itemKind = "<h3>Rewards</h3>";
break;
case 10:
$itemKind = "<h3>Wing</h3>";
break;
case 11:
$itemKind = "<h3>Dagger</h3>";
break;
case 12:
$itemKind = "<h3>[JP] Dagger Set</h3>";
break;
case 21:
$itemKind = "<h3>One-handed Sword</h3>";
break;
case 22:
$itemKind = "<h3>Two-handed Sword</h3>";
break;
case 31:
$itemKind = "<h3>One-handed Axe</h3>";
break;
case 32:
$itemKind = "<h3>Two-handed Axe</h3>";
break;
case 41:
$itemKind = "<h3>One-handed Club</h3>";
break;
case 42:
$itemKind = "<h3>Two-handed Club</h3>";
break;
case 43:
$itemKind = "<h3>[JP] One-handed Set</h3>";
break;
case 51:
$itemKind = "<h3>One-handed Spear</h3>";
break;
case 52:
$itemKind = "<h3>Long Spear</h3>";
break;
case 60:
$itemKind = "<h3>Shield</h3>";
break;
case 61:
$itemKind = "<h3>Pickaxe</h3>";
break;
case 62:
$itemKind = "<h3>Long Spear</h3>";
break;
case 63:
$itemKind = "<h3>Fishing Rod</h3>";
break;
case 70:
$itemKind = "<h3>Bow</h3>";
break;
case 71:
$itemKind = "<h3>Crossbow</h3>";
break;
case 91:
$itemKind = "<h3>Earring</h3>";
break;
case 92:
$itemKind = "<h3>Necklace</h3>";
break;
case 93:
$itemKind = "<h3>Ring</h3>";
break;
case 94:
$itemKind = "<h3>Belt</h3>";
break;
case 95:
$itemKind = "<h3>Lune Item</h3>";
break;
case 97:
$itemKind = "<h3>Sundries</h3>";
break;
case 98:
$itemKind = "<h3>Scroll</h3>";
break;
case 110:
$itemKind = "<h3>Staff</h3>";
break;
case 120:
$itemKind = "<h3>Arrow</h3>";
break;
case 130:
$itemKind = "<h3>Javelin</h3>";
break;
case 140:
$itemKind = "<h3>Jamadhar</h3>";
break;
case 150:
$itemKind = "<h3>Familiar Egg</h3>";
break;
case 151:
$itemKind = "<h3>Familiar Item</h3>";
break;
case 152:
$itemKind = "<h3>[US] Familiar</h3>";
break;
case 170:
$itemKind = "<h3>Autoloot</h3>";
break;
case 171:
$itemKind = "<h3>Image Change Scroll</h3>";
break;
case 172:
$itemKind = "<h3>Familiar Attack</h3>";
break;
case 173:
$itemKind = "<h3>Familiar Defense</h3>";
break;
case 174:
$itemKind = "<h3>Familiar Loyalty</h3>";
break;
case 175:
$itemKind = "<h3>Familiar Speciality Food</h3>";
break;
case 176:
$itemKind = "<h3>Familiar Food</h3>";
break;
case 181:
$itemKind = "<h3>Mace</h3>";
break;
case 200:
$itemKind = "<h3>Portu Armor</h3>";
break;
case 210:
$itemKind = "<h3>Warrior Armor</h3>";
break;
case 220:
$itemKind = "<h3>Rogue Armor</h3>";
break;
case 230:
$itemKind = "<h3>Magician Armor</h3>";
break;
case 240:
$itemKind = "<h3>Priest Armor</h3>";
break;
case 250:
$itemKind = "<h3>Seal & Heal Scroll</h3>";
break;
case 252:
$itemKind = "<h3>Cospre Item</h3>";
break;
case 253:
$itemKind = "<h3>Sealed Item</h3>";
break;
case 254:
$itemKind = "<h3>Chaos Skill Item</h3>";
break;
case 255:
$itemKind = "<h3>PUS Item</h3>";
break;
}
çözümün bu bro adam herşeyiyle vermiş eline sağlık @ForathdorHocam ITEM tablosunda ItemType kolonunda istediğin veri tipi mevcut. Ben panellerim de aşağıda ki type = name eşleşmesini kullanıyorum. Bunlar default bir knight_online veritabanı için uygundur fakat yeni eklenen item typelar var ise onları tam bilemiyorum.
PHP:switch ($item->ItemType) { case 0: $itemType = "<h2 class='type_0'>(Normal Item)</h2>"; break; case 1: $itemType = "<h2 class='type_1'>(Magic Item)</h2>"; break; case 2: $itemType = "<h2 class='type_2'>(Rares Item)</h2>"; break; case 3: $itemType = "<h2 class='type_3'>(Craft Item)</h2>"; break; case 4: $itemType = "<h2 class='type_4'>(Unique Item)</h2>"; break; case 5: $itemType = "<h2 class='type_5'>(Upgrade Item)</h2>"; break; case 6: $itemType = "<h2 class='type_6'>(Event Item)</h2>"; break; case 7: $itemType = "<h2 class='type_7'>(Pet Item)</h2>"; break; case 8: $itemType = "<h2 class='type_8'>(Cospre Item)</h2>"; break; case 9: $itemType = "<h2 class='type_9'>(Minerva Item)</h2>"; break; case 11: $itemType = "<h2 class='type_11'>(Reverse Upgrade Item)</h2>"; break; case 12: $itemType = "<h2 class='type_12'>(Reverse Unique Item)</h2>"; break; }
Teşekkür ederim hocam ne demek, ben kendi panellerimde yukarıda verdiğim yapıyı kullanıyorum.çözümün bu bro adam herşeyiyle vermiş eline sağlık @Forathdor
Ama @ChaosKnightX 'da bahsettiği gibi veritabanından veritabanına değişiklik gösterebiliyor. Bazılarında Kind sütununda, bazılarında ise ItemType sütununda tutuluyor bu veri. Ama ben Kind için aşağıda ki kod bloğunu kullanıyorum, ItemType içinse yukarıda vermiş olduğumu.
PHP:switch ($item->Kind) { case 0: $itemKind = "<h3>Rewards</h3>"; break; case 10: $itemKind = "<h3>Wing</h3>"; break; case 11: $itemKind = "<h3>Dagger</h3>"; break; case 12: $itemKind = "<h3>[JP] Dagger Set</h3>"; break; case 21: $itemKind = "<h3>One-handed Sword</h3>"; break; case 22: $itemKind = "<h3>Two-handed Sword</h3>"; break; case 31: $itemKind = "<h3>One-handed Axe</h3>"; break; case 32: $itemKind = "<h3>Two-handed Axe</h3>"; break; case 41: $itemKind = "<h3>One-handed Club</h3>"; break; case 42: $itemKind = "<h3>Two-handed Club</h3>"; break; case 43: $itemKind = "<h3>[JP] One-handed Set</h3>"; break; case 51: $itemKind = "<h3>One-handed Spear</h3>"; break; case 52: $itemKind = "<h3>Long Spear</h3>"; break; case 60: $itemKind = "<h3>Shield</h3>"; break; case 61: $itemKind = "<h3>Pickaxe</h3>"; break; case 62: $itemKind = "<h3>Long Spear</h3>"; break; case 63: $itemKind = "<h3>Fishing Rod</h3>"; break; case 70: $itemKind = "<h3>Bow</h3>"; break; case 71: $itemKind = "<h3>Crossbow</h3>"; break; case 91: $itemKind = "<h3>Earring</h3>"; break; case 92: $itemKind = "<h3>Necklace</h3>"; break; case 93: $itemKind = "<h3>Ring</h3>"; break; case 94: $itemKind = "<h3>Belt</h3>"; break; case 95: $itemKind = "<h3>Lune Item</h3>"; break; case 97: $itemKind = "<h3>Sundries</h3>"; break; case 98: $itemKind = "<h3>Scroll</h3>"; break; case 110: $itemKind = "<h3>Staff</h3>"; break; case 120: $itemKind = "<h3>Arrow</h3>"; break; case 130: $itemKind = "<h3>Javelin</h3>"; break; case 140: $itemKind = "<h3>Jamadhar</h3>"; break; case 150: $itemKind = "<h3>Familiar Egg</h3>"; break; case 151: $itemKind = "<h3>Familiar Item</h3>"; break; case 152: $itemKind = "<h3>[US] Familiar</h3>"; break; case 170: $itemKind = "<h3>Autoloot</h3>"; break; case 171: $itemKind = "<h3>Image Change Scroll</h3>"; break; case 172: $itemKind = "<h3>Familiar Attack</h3>"; break; case 173: $itemKind = "<h3>Familiar Defense</h3>"; break; case 174: $itemKind = "<h3>Familiar Loyalty</h3>"; break; case 175: $itemKind = "<h3>Familiar Speciality Food</h3>"; break; case 176: $itemKind = "<h3>Familiar Food</h3>"; break; case 181: $itemKind = "<h3>Mace</h3>"; break; case 200: $itemKind = "<h3>Portu Armor</h3>"; break; case 210: $itemKind = "<h3>Warrior Armor</h3>"; break; case 220: $itemKind = "<h3>Rogue Armor</h3>"; break; case 230: $itemKind = "<h3>Magician Armor</h3>"; break; case 240: $itemKind = "<h3>Priest Armor</h3>"; break; case 250: $itemKind = "<h3>Seal & Heal Scroll</h3>"; break; case 252: $itemKind = "<h3>Cospre Item</h3>"; break; case 253: $itemKind = "<h3>Sealed Item</h3>"; break; case 254: $itemKind = "<h3>Chaos Skill Item</h3>"; break; case 255: $itemKind = "<h3>PUS Item</h3>"; break; }
allah binkere razı olsunçözümün bu bro adam herşeyiyle vermiş eline sağlık @Forathdor