Aller au contenu

[TUTO]Script pour l'item_proto des files 2013 de EB


Messages recommandés

Bonjour, bonsoir à tous,

 

Alors, aujourd'hui je vais vous faire mon premier tuto pour vous expliquer comment mettre en place un script pour convertir l'item_proto de navicat en item_proto pour WinSCP.

Tout d'abord, comme vous l'aurez sûrement remarqués, lorsque vous faites une modification de l'item_proto dans navicat, rien ne se passe, l'item n'est pas implanté et il disparaît de la liste au prochain reboot. Pour implanter un item, il faut désormais passer par le fichier item_proto.txt qui se trouve dans le dossier db de votre ftp (avec WinSCP en général).

 

Ce script permet donc de faire une modification sur l'item_proto.sql, puis de le convertir en fichier item_proto.txt et item_name.txt a placer a la place des anciens dans votre dossier db.

 

Pour commencer, vous devrez faire un clic droit sur votre item_proto.sql, puis cliquer sur "Design table" (le troisième), puis en haut, cliquer sur "Add Field".

Vous compléterez ainsi :

 

Name > specular

Type > tinyint

Length > 4

Décimals > 0

Allow Null > Cochez

 

Ensuite, on en passe à Wamp. Pour que le script fonctionne, vous devez créer un fichier en .php dans le dossier "www" de Wamp et vous devez y copier/coller ce code :

 

 

 
<?PHP
ini_set('display_errors', 1);
$sqlHp = new mysqli("LOCALHOST", "ID", "MDP") or die(mysql_error()) ;
if (mysqli_connect_errno()) printf("Connect failed: %s\n", mysqli_connect_error());

   /*
    * Item AntiFlags
    * 0:       NONE
    * 1:       ANTI_FEMALE
    * 2:       ANTI_MALE
    * 4:       ANTI_MUSA
    * 8:       ANTI_ASSASSIN
    * 16:      ANTI_SURA
    * 32:      ANTI_MUDANG
    * 64:      ANTI_GET
    * 128:     ANTI_DROP
    * 256:     ANTI_SELL
    * 512:     ANTI_EMPIRE_A
    * 1024:    ANTI_EMPIRE_B
    * 2048:    ANTI_EMPIRE_C
    * 4096:    ANTI_SAVE
    * 8192:    ANTI_GIVE  
    * 16384:   ANTI_PKDROP 
    * 32768:   ANTI_STACK
    * 65536:   ANTI_MYSHOP
    * 131072:  ANTI_SAFEBOX
    */
   const ITEM_ANTIFLAG_NONE = 0;
   const ITEM_ANTIFLAG_FEMALE = 1;
   const ITEM_ANTIFLAG_MALE = 2;
   const ITEM_ANTIFLAG_WARRIOR = 4;
   const ITEM_ANTIFLAG_ASSASSIN = 8;
   const ITEM_ANTIFLAG_SURA = 16;
   const ITEM_ANTIFLAG_SHAMAN = 32;
   const ITEM_ANTIFLAG_GET = 64;
   const ITEM_ANTIFLAG_DROP = 128;
   const ITEM_ANTIFLAG_SELL = 256;
   const ITEM_ANTIFLAG_EMPIRE_A = 512;
   const ITEM_ANTIFLAG_EMPIRE_B = 1024;
   const ITEM_ANTIFLAG_EMPIRE_C = 2048;
   const ITEM_ANTIFLAG_SAVE = 4096;
   const ITEM_ANTIFLAG_GIVE = 8192;
   const ITEM_ANTIFLAG_PKDROP = 16384;
   const ITEM_ANTIFLAG_STACK = 32768;
   const ITEM_ANTIFLAG_MYSHOP = 65536;
   const ITEM_ANTIFLAG_SAFEBOX = 131072;

   /*
    * Item Flags:
    * 0:       NONE
    * 1:       ITEM_TUNABLE
    * 2:       ITEM_SAVE
    * 4:       ITEM_STACKABLE
    * 8:       COUNT_PER_1GOLD
    * 16:      ITEM_SLOW_QUERY
    * 32:      ITEM_UNIQUE
    * 64:      ITEM_MAKECOUNT
    * 128:     ITEM_IRREMOVABLE
    * 256:     CONFIRM_WHEN_USE
    * 512:     QUEST_USE
    * 1024:    QUEST_USE_MULTIPLE
    * 2048:    QUEST_GIVE
    * 4096:    ITEM_QUEST
    * 8192:    LOG  
    * 16384:   ITEM_APPLICABLE
    */
   const ITEM_FLAG_NONE = 0;
   const ITEM_FLAG_ITEM_TUNABLE = 1;
   const ITEM_FLAG_ITEM_SAVE = 2;
   const ITEM_FLAG_ITEM_STACKABLE = 4;
   const ITEM_FLAG_COUNT_PER_1GOLD = 8;
   const ITEM_FLAG_ITEM_SLOW_QUERY = 16;
   const ITEM_FLAG_ITEM_UNIQUE = 32;
   const ITEM_FLAG_ITEM_MAKECOUNT = 64;
   const ITEM_FLAG_ITEM_IRREMOVABLE = 128;
   const ITEM_FLAG_CONFIRM_WHEN_USE = 256;
   const ITEM_FLAG_QUEST_USE = 512;
   const ITEM_FLAG_QUEST_USE_MULTIPLE = 1024;
   const ITEM_FLAG_QUEST_GIVE = 2048;
   const ITEM_FLAG_ITEM_QUEST = 4096;
   const ITEM_FLAG_LOG = 8192;
   const ITEM_FLAG_ITEM_APPLICABLE = 16384;

   /*
    * Item WearFlag 
    * 0:       NONE
    * 1:       WEAR_BODY
    * 2:       WEAR_HEAD
    * 4:       WEAR_FOOTS
    * 8:       WEAR_WRIST
    * 16:      WEAR_WEAPON
    * 32:      WEAR_NECK
    * 64:      WEAR_EAR
    * 128:     WEAR_SHIELD
    * 256:     WEAR_UNIQUE
    * 512:     WEAR_ARROW
    * 1024:    WEAR_HAIR
    * 2048:    WEAR_ABILITY
    */
   const ITEM_WEARFLAG_NONE = 0;
   const ITEM_WEARFLAG_ARMOR = 1;
   const ITEM_WEARFLAG_HEAD = 2;
   const ITEM_WEARFLAG_FOOT = 4;
   const ITEM_WEARFLAG_WRIST = 8;
   const ITEM_WEARFLAG_WEAPON = 16;
   const ITEM_WEARFLAG_NECK = 32;
   const ITEM_WEARFLAG_EAR = 64;
   const ITEM_WEARFLAG_SPECIAL = 128;
   const ITEM_WEARFLAG_SHIELD = 256;
   const ITEM_WEARFLAG_ARROW = 512;
   const ITEM_WEARFLAG_HAIR = 1024;
   const ITEM_WEARFLAG_ABILITY = 2048;



    function setMenu() {
       createInnerMenu("Modus");
       addInnerMenuItem("Modus", "SQL zu XML", "&mode=sql2xml");
       addInnerMenuItem("Modus", "SQL zu TXT", "&mode=sql2txt");
   }

    function loadOverview() {
       addHtmlTemplate("overview");
   }
/*
    function convertSQLToXML() {

       $item_proto = fopen("downloads/item_proto", "w");
       if (!$item_proto) {
           addHtml("Fehler beim erstellen/schreiben der Datei!");
           return 0;
       }

       db->select_db("game", "player");
       $item_proto_abfrage = db->query("game", "SELECT vnum, name, locale_name, type, subtype, weight, size, antiflag, flag, wearflag, immuneflag, gold, shop_buy_price, refined_vnum, refine_set, refine_set2, magic_pct, limittype0, limitvalue0, limittype1, limitvalue1, applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, value0, value1, value2, value3, value4, value5, socket0, socket1, socket2, socket3, socket4, socket5, specular, socket_pct, addon_type FROM item_proto ORDER by vnum asc");
       $item_proto_abfrage->bind_result($vnum, $name, $locale_name, $type, $subtype, $weight, $size, $antiflag, $flag, $wearflag, $immuneflag, $gold, $shop_buy_price, $refined_vnum, $refine_set, $refine_set2, $magic_pct, $limittype0, $limitvalue0, $limittype1, $limitvalue1, $applytype0, $applyvalue0, $applytype1, $applyvalue1, $applytype2, $applyvalue2, $value0, $value1, $value2, $value3, $value4, $value5, $socket0, $socket1, $socket2, $socket3, $socket4, $socket5, $specular, $socket_pct, $addon_type);

       fwrite($item_proto, '' . "\n");
       while ($item_proto_abfrage->fetch()) {
           fwrite($item_proto, "\t\n");
       }
       fwrite($item_proto, '');

       fclose($item_proto);
       addHtml("Datei wurde erstellt.
");
       addHtml('Download Link');
   }
*/
    function convertSQLToTXT($sqlHp) {
       $item_proto_txt = fopen('./item_proto.txt', "w");
       $item_names_txt = fopen('./item_names.txt', "w");
       if (!$item_proto_txt) {
           addHtml("Fehler beim erstellen/schreiben der Datei (item_proto.txt)!");
           return 0;
       }
       if (!$item_names_txt) {
           addHtml("Fehler beim erstellen/schreiben der Datei (item_names.txt)!");
           return 0;
       }
	$sqlCmd='SELECT * FROM player.item_proto';
	$sqlQry=mysqli_query($sqlHp,$sqlCmd) or die(mysqli_error($sqlHp)." Q=".$sqlCmd);

/*
       db->select_db("game", "player");
       $item_proto_abfrage = db->query("game", "SELECT vnum, name, locale_name, type, subtype, weight, size, antiflag, flag, wearflag, immuneflag, gold, shop_buy_price, refined_vnum, refine_set, refine_set2, magic_pct, limittype0, limitvalue0, limittype1, limitvalue1, applytype0, applyvalue0, applytype1, applyvalue1, applytype2, applyvalue2, value0, value1, value2, value3, value4, value5, socket0, socket1, socket2, socket3, socket4, socket5, specular, socket_pct, addon_type FROM item_proto ORDER by vnum asc");
       $item_proto_abfrage->bind_result($vnum, $name, $locale_name, $type, $subtype, $weight, $size, $antiflag, $flag, $wearflag, $immuneflag, $gold, $shop_buy_price, $refined_vnum, $refine_set, $refine_set2, $magic_pct, $limittype0, $limitvalue0, $limittype1, $limitvalue1, $applytype0, $applyvalue0, $applytype1, $applyvalue1, $applytype2, $applyvalue2, $value0, $value1, $value2, $value3, $value4, $value5, $socket0, $socket1, $socket2, $socket3, $socket4, $socket5, $specular, $socket_pct, $addon_type);
*/
       fwrite($item_proto_txt, '"Vnum"    "Name"    "Type"    "SubType"    "Size"    "AntiFlags"    "Flags"    "WearFlags"    "ImmuneFlags"    "Gold"    "ShopBuyPrice"    "RefinedVnum"    "RefineSet"    "AlterToMagicItemPercent"    "LimitType0"    "LimitValue0"    "LimitType1"    "LimitValue1"    "ApplyType0"    "ApplyValue0"    "ApplyType1"    "ApplyValue1"    "ApplyType2"    "ApplyValue2"    "Value0"    "Value1"    "Value2"    "Value3"    "Value4"    "Value5"    "Specular"    "GainSocketPercent"    "AddonType"' . "\r\n");
       fwrite($item_names_txt, "VNUM\tLOCALE_NAME\n");
       while ($prochainObjet=mysqli_fetch_object($sqlQry)) {
           $item_string = "";
           $item_string .= $prochainObjet->vnum;
           $item_string .= "\t";
           $item_string .= "\"$prochainObjet->name\"";
           $item_string .= "\t";
           $item_string .= getTypeString($prochainObjet->type);
           $item_string .= "\t";
           $item_string .= getSubtypeString($prochainObjet->type, $prochainObjet->subtype);
           $item_string .= "\t";
           $item_string .= $prochainObjet->size;
           $item_string .= "\t";
           $item_string .= getAntiFlagString($prochainObjet->antiflag);
           $item_string .= "\t";
           $item_string .= getFlagString($prochainObjet->flag);
           $item_string .= "\t";
           $item_string .= getWearFlagString($prochainObjet->wearflag);
           $item_string .= "\t";
           $item_string .= (strlen($prochainObjet->immuneflag) == 0) ? '"NONE"' : $prochainObjet->immuneflag;
           $item_string .= "\t";
           $item_string .= $prochainObjet->gold;
           $item_string .= "\t";
           $item_string .= $prochainObjet->shop_buy_price;
           $item_string .= "\t";
           $item_string .= $prochainObjet->refined_vnum;
           $item_string .= "\t";
           $item_string .= $prochainObjet->refine_set;
           $item_string .= "\t";
           $item_string .= $prochainObjet->magic_pct;
           $item_string .= "\t";
           $item_string .= getLimitType($prochainObjet->limittype0);
           $item_string .= "\t";
           $item_string .= $prochainObjet->limitvalue0;
           $item_string .= "\t";
           $item_string .= getLimitType($prochainObjet->limittype1);
           $item_string .= "\t";
           $item_string .= $prochainObjet->limitvalue1;
           $item_string .= "\t";
           $item_string .= getApplyType($prochainObjet->applytype0);
           $item_string .= "\t";
           $item_string .= $prochainObjet->applyvalue0;
           $item_string .= "\t";
           $item_string .= getApplyType($prochainObjet->applytype1);
           $item_string .= "\t";
           $item_string .= $prochainObjet->applyvalue1;
           $item_string .= "\t";
           $item_string .= getApplyType($prochainObjet->applytype2);
           $item_string .= "\t";
           $item_string .= $prochainObjet->applyvalue2;
           $item_string .= "\t";
           $item_string .= $prochainObjet->value0;
           $item_string .= "\t";
           $item_string .= $prochainObjet->value1;
           $item_string .= "\t";
           $item_string .= $prochainObjet->value2;
           $item_string .= "\t";
           $item_string .= $prochainObjet->value3;
           $item_string .= "\t";
           $item_string .= $prochainObjet->value4;
           $item_string .= "\t";
           $item_string .= $prochainObjet->value5;
           $item_string .= "\t";
           $item_string .= $prochainObjet->specular;
           $item_string .= "\t";
           $item_string .= $prochainObjet->socket_pct;
           $item_string .= "\t";
           $item_string .= $prochainObjet->addon_type;
           $item_string .= "\r\n";
           fwrite($item_proto_txt, $item_string);
           fwrite($item_names_txt, "$prochainObjet->vnum\t$prochainObjet->locale_name\r\n");
       }

       fclose($item_proto_txt);
       fclose($item_names_txt);
   }

    function getTypeString($type) {
       switch ($type) {
           case 0: // ITEM_NONE
               return '"ITEM_NONE"';
               break;
           case 1: // ITEM_WEAPON
               return '"ITEM_WEAPON"';
               break;
           case 2: // ITEM_ARMOR
               return '"ITEM_ARMOR"';
               break;
           case 3: //ITEM_USE
               return '"ITEM_USE"';
               break;
           case 5: // ITEM_MATERIAL
               return '"ITEM_MATERIAL"';
               break;
           case 6: // ITEM_SPECIAL
               return '"ITEM_SPECIAL"';
               break;
           case 8: // ITEM_LOTTERY
               return '"ITEM_LOTTERY"';
               break;
           case 9: // ITEM_ELK
               return '"ITEM_ELK"';
               break;
           case 10: // ITEM_METIN
               return '"ITEM_METIN"';
               break;
           case 11: // ITEM_CONTAINER
               return '"ITEM_CONTAINER"';
               break;
           case 12: // ITEM_FISH
               return '"ITEM_FISH"';
               break;
           case 13: // ITEM_ROD
               return '"ITEM_ROD"';
               break;
           case 14: // ITEM_RESOURCE
               return '"ITEM_RESOURCE"';
               break;
           case 15: //ITEM_CAMPFIRE
               return '"ITEM_CAMPFIRE"';
               break;
           case 16: // ITEM_UNIQUE
               return '"ITEM_UNIQUE"';
               break;
           case 17: // ITEM_SKILLBOOK
               return '"ITEM_SKILLBOOK"';
               break;
           case 18: // ITEM_QUEST
               return '"ITEM_QUEST"';
               break;
           case 19: // ITEM_POLYMORPH
               return '"ITEM_POLYMORPH"';
               break;
           case 20: // ITEM_TREASURE_BOX
               return '"ITEM_TREASURE_BOX"';
               break;
           case 21: // ITEM_TREASURE_KEY
               return '"ITEM_TREASURE_KEY"';
               break;
           case 22: // ITEM_SKILLFORGET
               return '"ITEM_SKILLFORGET"';
               break;
           case 23: // ITEM_GIFTBOX
               return '"ITEM_GIFTBOX"';
               break;
           case 24: // ITEM_PICK
               return '"ITEM_PICK"';
               break;
           case 27: // ITEM_BLEND
               return '"ITEM_BLEND"';
               break;
           case 28: // ITEM_COSTUME
               return '"ITEM_COSTUME"';
               break;
           default: // Alles andere, falls welche vergessen wurden
               addHtml("TYPE $type konnte nicht zugeordnet werden!
");
               break;
       }
   }

    function getSubtypeString($type, $subtype) {
       switch ($type) {
           case 0: // ITEM_NONE
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 1: // ITEM_WEAPON
               switch ($subtype) {
                   case 0: // WEAPON_SWORD
                       return '"WEAPON_SWORD"';
                       break;
                   case 1: // WEAPON_DAGGER
                       return '"WEAPON_DAGGER"';
                       break;
                   case 2: // WEAPON_BOW
                       return '"WEAPON_BOW"';
                       break;
                   case 3: // WEAPON_TWO_HANDED
                       return '"WEAPON_TWO_HANDED"';
                       break;
                   case 4: // WEAPON_BELL
                       return '"WEAPON_BELL"';
                       break;
                   case 5: // WEAPON_FAN
                       return '"WEAPON_FAN"';
                       break;
                   case 6: // WEAPON_ARROW
                       return '"WEAPON_ARROW"';
                       break;
                   case 7: // WEAPON_MOUNT_SPEAR
                       return '"WEAPON_MOUNT_SPEAR"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
           case 2: // ITEM_ARMOR
               switch ($subtype) {
                   case 0: // ARMOR_BODY
                       return '"ARMOR_BODY"';
                       break;
                   case 1: // ARMOR_HEAD
                       return '"ARMOR_HEAD"';
                       break;
                   case 2: // ARMOR_SHIELD
                       return '"ARMOR_SHIELD"';
                       break;
                   case 3: // ARMOR_WRIST
                       return '"ARMOR_WRIST"';
                       break;
                   case 4: // ARMOR_FOOTS
                       return '"ARMOR_FOOTS"';
                       break;
                   case 5: // ARMOR_NECK
                       return '"ARMOR_NECK"';
                       break;
                   case 6: // ARMOR_EAR
                       return '"ARMOR_EAR"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 3: //ITEM_USE
               switch ($subtype) {
                   case 0: // USE_POTION
                       return '"USE_POTION"';
                       break;
                   case 1: // USE_TALISMAN
                       return '"USE_TALISMAN"';
                       break;
                   case 2: // USE_TUNING
                       return '"USE_TUNING"';
                       break;
                   case 6: // USE_BAIT
                       return '"USE_BAIT"';
                       break;
                   case 7: // USE_ABILITY_UP
                       return '"USE_ABILITY_UP"';
                       break;
                   case 8: // USE_AFFECT
                       return '"USE_AFFECT"';
                       break;
                   case 9: // USE_CREATE_STONE
                       return '"USE_CREATE_STONE"';
                       break;
                   case 10: // USE_SPECIAL
                       return '"USE_SPECIAL"';
                       break;
                   case 11: // USE_POTION_NODELAY
                       return '"USE_POTION_NODELAY"';
                       break;
                   case 12: // USE_CLEAR
                       return '"USE_CLEAR"';
                       break;
                   case 13: // USE_INVISIBILITY
                       return '"USE_INVISIBILITY"';
                       break;
                   case 14: // USE_DETACHMENT
                       return '"USE_DETACHMENT"';
                       break;
                   case 15: // USE_BUCKET
                       return '"USE_BUCKET"';
                       break;
                   case 17: // USE_CLEAN_SOCKET
                       return '"USE_CLEAN_SOCKET"';
                       break;
                   case 18: // USE_CHANGE_ATTRIBUTE
                       return '"USE_CHANGE_ATTRIBUTE"';
                       break;
                   case 19: // USE_ADD_ATTRIBUTE
                       return '"USE_ADD_ATTRIBUTE"';
                       break;
                   case 20: // USE_ADD_ACCESSORY_SOCKET
                       return '"USE_ADD_ACCESSORY_SOCKET"';
                       break;
                   case 21: // USE_PUT_INTO_ACCESSORY_SOCKET
                       return '"USE_PUT_INTO_ACCESSORY_SOCKET"';
                       break;
                   case 22: // USE_ADD_ATTRIBUTE2
                       return '"USE_ADD_ATTRIBUTE2"';
                       break;
                   case 23: // USE_RECIPE
                       return '"USE_RECIPE"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 5: // ITEM_MATERIAL
               switch ($subtype) {
                   case 0: // MATERIAL_LEATHER
                       return '"MATERIAL_LEATHER"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 6: // ITEM_SPECIAL
               switch ($subtype) {
                   case 0: // SPECIAL_MAP
                       return '"SPECIAL_MAP"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 8: // ITEM_LOTTERY
               switch ($subtype) {
                   case 0: // LOTTERY_TICKET
                       return '"LOTTERY_TICKET"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 9: // ITEM_ELK
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 10: // ITEM_METIN
               switch ($subtype) {
                   case 0: // METIN_NORMAL
                       return '"METIN_NORMAL"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 11: //ITEM_CONTAINER
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
           case 12: // ITEM_FISH
               switch ($subtype) {
                   case 0: // FISH_ALIVE
                       return '"FISH_ALIVE"';
                       break;
                   case 1: // FISH_DEAD
                       return '"FISH_DEAD"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 13: // ITEM_ROD
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 14: // ITEM_RESOURCE
               switch ($subtype) {
                   case 0: // RESOURCE_FISHBONE
                       return '"RESOURCE_FISHBONE"';
                       break;
                   case 1: // RESOURCE_WATERSTONEPIECE
                       return '"RESOURCE_WATERSTONEPIECE"';
                       break;
                   case 2: // RESOURCE_WATERSTONE
                       return '"RESOURCE_WATERSTONE"';
                       break;
                   case 3: // RESOURCE_BLOOD_PEARL
                       return '"RESOURCE_BLOOD_PEARL"';
                       break;
                   case 4: // RESOURCE_BLUE_PEARL
                       return '"RESOURCE_BLUE_PEARL"';
                       break;
                   case 5: // RESOURCE_WHITE_PEARL
                       return '"RESOURCE_WHITE_PEARL"';
                       break;
                   case 6: // RESOURCE_BUCKET
                       return '"RESOURCE_BUCKET"';
                       break;
                   case 7: // RESOURCE_CRYSTAL
                       return '"RESOURCE_CRYSTAL"';
                       break;
                   case 8: // RESOURCE_GEM
                       return '"RESOURCE_GEM"';
                       break;
                   case 9: // RESOURCE_STONE
                       return '"RESOURCE_STONE"';
                       break;
                   case 10: // RESOURCE_METIN
                       return '"RESOURCE_METIN"';
                       break;
                   case 11: // RESOURCE_ORE
                       return '"RESOURCE_ORE"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 15: //ITEM_CAMPFIRE
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
               }
           case 16: // ITEM_UNIQUE
               switch ($subtype) {
                   case 0: // UNIQUE_NONE
                       return '"UNIQUE_NONE"';
                       break;
                   case 2: // UNIQUE_SPECIAL_RIDE
                       return '"UNIQUE_SPECIAL_RIDE"';
                   case 10: // USE_SPECIAL
                       return '"USE_SPECIAL"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 17: // ITEM_SKILLBOOK
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 18: // ITEM_QUEST
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 19: // ITEM_POLYMORPH
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 20: // ITEM_TREASURE_BOX
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 21: // ITEM_TREASURE_KEY
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 22: // ITEM_SKILLFORGET
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 23: // ITEM_GIFTBOX
               switch ($subtype) {
                   case 0: // ANTI_DROP
                       return '"ANTI_DROP"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 24: // ITEM_PICK
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 27: // ITEM_BLEND
               switch ($subtype) {
                   case 0: // (int) 0
                       return (int) 0;
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           case 28: // ITEM_COSTUME
               switch ($subtype) {
                   case 0: // COSTUME_HAIR
                       return '"COSTUME_BODY"';
                       break;
                   case 1: // COSTUME_BODY
                       return '"COSTUME_HAIR"';
                       break;
                   default:
                       addHtml("TYPE::$type SUBTYPE::$subtype konnte nicht zugeordnet werden!
");
                       break;
               }
               break;
           default: // Alles andere, falls welche vergessen wurden
               addHtml("TYPE $type konnte nicht zugeordnet werden!
");
               break;
       }
   }

    function getAntiFlagString($flag) {

       $anti_flag_string_arr = array();
       $anti_flag_string = "";

       if ($flag == ITEM_ANTIFLAG_NONE) {
           return '"NONE"';
       }
       if ($flag & ITEM_ANTIFLAG_FEMALE) {
           $anti_flag_string_arr[] = "ANTI_FEMALE";
       }
       if ($flag & ITEM_ANTIFLAG_MALE) {
           $anti_flag_string_arr[] = "ANTI_MALE";
       }
       if ($flag & ITEM_ANTIFLAG_WARRIOR) {
           $anti_flag_string_arr[] = "ANTI_MUSA";
       }
       if ($flag & ITEM_ANTIFLAG_ASSASSIN) {
           $anti_flag_string_arr[] = "ANTI_ASSASSIN";
       }
       if ($flag & ITEM_ANTIFLAG_SURA) {
           $anti_flag_string_arr[] = "ANTI_SURA";
       }
       if ($flag & ITEM_ANTIFLAG_SHAMAN) {
           $anti_flag_string_arr[] = "ANTI_MUDANG";
       }
       if ($flag & ITEM_ANTIFLAG_GET) {
           $anti_flag_string_arr[] = "ANTI_GET";
       }
       if ($flag & ITEM_ANTIFLAG_DROP) {
           $anti_flag_string_arr[] = "ANTI_DROP";
       }
       if ($flag & ITEM_ANTIFLAG_SELL) {
           $anti_flag_string_arr[] = "ANTI_SELL";
       }
       if ($flag & ITEM_ANTIFLAG_EMPIRE_A) {
           $anti_flag_string_arr[] = "ANTI_EMPIRE_A";
       }
       if ($flag & ITEM_ANTIFLAG_EMPIRE_B) {
           $anti_flag_string_arr[] = "ANTI_EMPIRE_B";
       }
       if ($flag & ITEM_ANTIFLAG_EMPIRE_C) {
           $anti_flag_string_arr[] = "ANTI_EMPIRE_C";
       }
       if ($flag & ITEM_ANTIFLAG_SAVE) {
           $anti_flag_string_arr[] = "ANTI_SAVE";
       }
       if ($flag & ITEM_ANTIFLAG_GIVE) {
           $anti_flag_string_arr[] = "ANTI_GIVE";
       }
       if ($flag & ITEM_ANTIFLAG_PKDROP) {
           $anti_flag_string_arr[] = "ANTI_PKDROP";
       }
       if ($flag & ITEM_ANTIFLAG_STACK) {
           $anti_flag_string_arr[] = "ANTI_STACK";
       }
       if ($flag & ITEM_ANTIFLAG_MYSHOP) {
           $anti_flag_string_arr[] = "ANTI_MYSHOP";
       }
       if ($flag & ITEM_ANTIFLAG_SAFEBOX) {
           $anti_flag_string_arr[] = "ANTI_SAFEBOX";
       }

       $anti_flag_string .= '"';
       for ($i = 0; $i < count($anti_flag_string_arr); $i++) {
           $anti_flag_string .= ($i + 1 < count($anti_flag_string_arr)) ? "$anti_flag_string_arr[$i] | " : "$anti_flag_string_arr[$i]\"";
       }
       if (count($anti_flag_string_arr) == 0) {
           $anti_flag_string_arr .= '"';
       }
       return $anti_flag_string;
   }

    function getFlagString($flag) {

       $flag_string_arr = array();
       $flag_string = "";

       if ($flag == ITEM_FLAG_NONE) {
           return '"NONE"';
       }

       if ($flag & ITEM_FLAG_ITEM_TUNABLE) {
           $flag_string_arr[] = "ITEM_TUNABLE";
       }

       if ($flag & ITEM_FLAG_ITEM_SAVE) {
           $flag_string_arr[] = "ITEM_SAVE";
       }

       if ($flag & ITEM_FLAG_ITEM_STACKABLE) {
           $flag_string_arr[] = "ITEM_STACKABLE";
       }

       if ($flag & ITEM_FLAG_COUNT_PER_1GOLD) {
           $flag_string_arr[] = "COUNT_PER_1GOLD";
       }

       if ($flag & ITEM_FLAG_ITEM_SLOW_QUERY) {
           $flag_string_arr[] = "ITEM_SLOW_QUERY";
       }

       if ($flag & ITEM_FLAG_ITEM_UNIQUE) {
           $flag_string_arr[] = "ITEM_UNIQUE";
       }

       if ($flag & ITEM_FLAG_ITEM_MAKECOUNT) {
           $flag_string_arr[] = "ITEM_MAKECOUNT";
       }

       if ($flag & ITEM_FLAG_ITEM_IRREMOVABLE) {
           $flag_string_arr[] = "ITEM_IRREMOVABLE";
       }

       if ($flag & ITEM_FLAG_CONFIRM_WHEN_USE) {
           $flag_string_arr[] = "CONFIRM_WHEN_USE";
       }

       if ($flag & ITEM_FLAG_QUEST_USE) {
           $flag_string_arr[] = "QUEST_USE";
       }

       if ($flag & ITEM_FLAG_QUEST_USE_MULTIPLE) {
           $flag_string_arr[] = "QUEST_USE_MULTIPLE";
       }

       if ($flag & ITEM_FLAG_QUEST_GIVE) {
           $flag_string_arr[] = "QUEST_GIVE";
       }

       if ($flag & ITEM_FLAG_ITEM_QUEST) {
           $flag_string_arr[] = "ITEM_QUEST";
       }

       if ($flag & ITEM_FLAG_LOG) {
           $flag_string_arr[] = "LOG";
       }

       if ($flag & ITEM_FLAG_ITEM_APPLICABLE) {
           $flag_string_arr[] = "ITEM_APPLICABLE";
       }

       $flag_string .= '"';
       for ($i = 0; $i < count($flag_string_arr); $i++) {
           $flag_string .= ($i + 1 < count($flag_string_arr)) ? "$flag_string_arr[$i] | " : "$flag_string_arr[$i]\"";
       }
       if (count($flag_string_arr) == 0) {
           $flag_string .= '"';
       }
       return $flag_string;
   }

    function getWearFlagString($flag) {

       $wear_flag_string_arr = array();
       $wear_flag_string = "";

       if ($flag == ITEM_WEARFLAG_NONE) {
           return '"NONE"';
       }

       if ($flag & ITEM_WEARFLAG_ARMOR) {
           $wear_flag_string_arr[] = "WEAR_BODY";
       }

       if ($flag & ITEM_WEARFLAG_HEAD) {
           $wear_flag_string_arr[] = "WEAR_HEAD";
       }

       if ($flag & ITEM_WEARFLAG_FOOT) {
           $wear_flag_string_arr[] = "WEAR_FOOTS";
       }

       if ($flag & ITEM_WEARFLAG_WRIST) {
           $wear_flag_string_arr[] = "WEAR_WRIST";
       }

       if ($flag & ITEM_WEARFLAG_WEAPON) {
           $wear_flag_string_arr[] = "WEAR_WEAPON";
       }

       if ($flag & ITEM_WEARFLAG_NECK) {
           $wear_flag_string_arr[] = "WEAR_NECK";
       }

       if ($flag & ITEM_WEARFLAG_EAR) {
           $wear_flag_string_arr[] = "WEAR_EAR";
       }

       if ($flag & ITEM_WEARFLAG_SPECIAL) {
           $wear_flag_string_arr[] = "WEAR_SHIELD";
       }

       if ($flag & ITEM_WEARFLAG_SHIELD) {
           $wear_flag_string_arr[] = "WEAR_UNIQUE";
       }

       if ($flag & ITEM_WEARFLAG_ARROW) {
           $wear_flag_string_arr[] = "WEAR_ARROW";
       }

       if ($flag & ITEM_WEARFLAG_HAIR) {
           $wear_flag_string_arr[] = "WEAR_HAIR";
       }

       if ($flag & ITEM_WEARFLAG_ABILITY) {
           $wear_flag_string_arr[] = "WEAR_ABILITY";
       }
       $wear_flag_string .= '"';
       for ($i = 0; $i < count($wear_flag_string_arr); $i++) {
           $wear_flag_string .= ($i + 1 < count($wear_flag_string_arr)) ? "$wear_flag_string_arr[$i] | " : "$wear_flag_string_arr[$i]\"";
       }
       if (count($wear_flag_string_arr) == 0) {
           $wear_flag_string .= '"';
       }
       return $wear_flag_string;
   }

    function getLimitType($type) {
       switch ($type) {
           case 0: // LIMIT_NONE
               return '"LIMIT_NONE"';
               break;
           case 1: // LEVEL
               return '"LEVEL"';
               break;
           case 6: // PC_BANG
               return '"PC_BANG"';
               break;
           case 7: // REAL_TIME
               return '"REAL_TIME"';
               break;
           case 8: // REAL_TIME_FIRST_USE
               return '"REAL_TIME_FIRST_USE"';
               break; #
           case 9: // TIMER_BASED_ON_WEAR
               return '"TIMER_BASED_ON_WEAR"';
               break;
           default:
               addHtml("Unbekannter Limit Type::$type
");
               break;
       }
   }

    function getApplyType($apply_type) {
       switch ($apply_type) {
           case 0: // APPLY_NONE
               return '"APPLY_NONE"';
               break;
           case 1: // APPLY_MAX_HP
               return '"APPLY_MAX_HP"';
               break;
           case 2: // APPLY_MAX_SP
               return '"APPLY_MAX_SP"';
               break;
           case 3: // APPLY_CON
               return '"APPLY_CON"';
               break;
           case 4: // APPLY_INT
               return '"APPLY_INT"';
               break;
           case 5: // APPLY_STR
               return '"APPLY_STR"';
               break;
           case 6: // APPLY_DEX
               return '"APPLY_DEX"';
               break;
           case 7: // APPLY_ATT_SPEED
               return '"APPLY_ATT_SPEED"';
               break;
           case 8: // APPLY_MOV_SPEED
               return '"APPLY_MOV_SPEED"';
               break;
           case 9: // APPLY_CAST_SPEED
               return '"APPLY_CAST_SPEED"';
               break;
           case 10: // APPLY_HP_REGEN
               return '"APPLY_HP_REGEN"';
               break;
           case 11: // APPLY_SP_REGEN
               return '"APPLY_SP_REGEN"';
               break;
           case 12: // APPLY_POISON_PCT
               return '"APPLY_POISON_PCT"';
               break;
           case 13: // APPLY_STUN_PCT
               return '"APPLY_STUN_PCT"';
               break;
           case 14: // APPLY_SLOW_PCT
               return '"APPLY_SLOW_PCT"';
               break;
           case 15: // APPLY_CRITICAL_PCT
               return '"APPLY_CRITICAL_PCT"';
               break;
           case 16: // APPLY_PENETRATE_PCT
               return '"APPLY_PENETRATE_PCT"';
               break;
           case 17: // APPLY_ATTBONUS_HUMAN
               return '"APPLY_ATTBONUS_HUMAN"';
               break;
           case 18: // APPLY_ATTBONUS_ANIMAL
               return '"APPLY_ATTBONUS_ANIMAL"';
               break;
           case 19: // APPLY_ATTBONUS_ORC
               return '"APPLY_ATTBONUS_ORC"';
               break;
           case 20: // APPLY_ATTBONUS_MILGYO
               return '"APPLY_ATTBONUS_MILGYO"';
               break;
           case 21: // APPLY_ATTBONUS_UNDEAD
               return '"APPLY_ATTBONUS_UNDEAD"';
               break;
           case 22: // APPLY_ATTBONUS_DEVIL
               return '"APPLY_ATTBONUS_DEVIL"';
               break;
           case 23: // APPLY_STEAL_HP
               return '"APPLY_STEAL_HP"';
               break;
           case 24: // APPLY_STEAL_SP
               return '"APPLY_STEAL_SP"';
               break;
           case 25: // APPLY_MANA_BURN_PCT
               return '"APPLY_MANA_BURN_PCT"';
               break;
           case 26: // APPLY_DAMAGE_SP_RECOVER
               return '"APPLY_DAMAGE_SP_RECOVER"';
               break;
           case 27: // APPLY_BLOCK
               return '"APPLY_BLOCK"';
               break;
           case 28: // APPLY_DODGE
               return '"APPLY_DODGE"';
               break;
           case 29: // APPLY_RESIST_SWORD
               return '"APPLY_RESIST_SWORD"';
               break;
           case 30: // APPLY_RESIST_TWOHAND
               return '"APPLY_RESIST_TWOHAND"';
               break;
           case 31: // APPLY_RESIST_DAGGER
               return '"APPLY_RESIST_DAGGER"';
               break;
           case 32: // APPLY_RESIST_BELL
               return '"APPLY_RESIST_BELL"';
               break;
           case 33: // APPLY_RESIST_FAN
               return '"APPLY_RESIST_FAN"';
               break;
           case 34: // APPLY_RESIST_BOW
               return '"APPLY_RESIST_BOW"';
               break;
           case 35: // APPLY_RESIST_FIRE
               return '"APPLY_RESIST_FIRE"';
               break;
           case 36: // APPLY_RESIST_ELEC
               return '"APPLY_RESIST_ELEC"';
               break;
           case 37: // APPLY_RESIST_MAGIC
               return '"APPLY_RESIST_MAGIC"';
               break;
           case 38: // APPLY_RESIST_WIND
               return '"APPLY_RESIST_WIND"';
               break;
           case 39: // APPLY_REFLECT_MELEE
               return '"APPLY_REFLECT_MELEE"';
               break;
           case 40: // APPLY_REFLECT_CURSE
               return '"APPLY_REFLECT_CURSE"';
               break;
           case 41: // APPLY_POISON_REDUCE
               return '"APPLY_POISON_REDUCE"';
               break;
           case 42: // APPLY_KILL_SP_RECOVER
               return '"APPLY_KILL_SP_RECOVER"';
               break;
           case 43: // APPLY_EXP_DOUBLE_BONUS
               return '"APPLY_EXP_DOUBLE_BONUS"';
               break;
           case 44: // APPLY_GOLD_DOUBLE_BONUS
               return '"APPLY_GOLD_DOUBLE_BONUS"';
               break;
           case 45: // APPLY_ITEM_DROP_BONUS
               return '"APPLY_ITEM_DROP_BONUS"';
               break;
           case 46: // APPLY_POTION_BONUS
               return '"APPLY_POTION_BONUS"';
               break;
           case 47: // APPLY_KILL_HP_RECOVER
               return '"APPLY_KILL_HP_RECOVER"';
               break;
           case 48: // APPLY_IMMUNE_STUN
               return '"APPLY_IMMUNE_STUN"';
               break;
           case 49: // APPLY_IMMUNE_SLOW
               return '"APPLY_IMMUNE_SLOW"';
               break;
           case 50: // APPLY_IMMUNE_FALL
               return '"APPLY_IMMUNE_FALL"';
               break;
           case 51: // APPLY_SKILL
               return '"APPLY_SKILL"';
               break;
           case 52: // APPLY_BOW_DISTANCE
               return '"APPLY_BOW_DISTANCE"';
               break;
           case 53: // APPLY_ATT_GRADE_BONUS
               return '"APPLY_ATT_GRADE_BONUS"';
               break;
           case 54: // APPLY_DEF_GRADE_BONUS
               return '"APPLY_DEF_GRADE_BONUS"';
               break;
           case 55: // APPLY_MAGIC_ATT_GRADE
               return '"APPLY_MAGIC_ATT_GRADE"';
               break;
           case 56: // APPLY_MAGIC_DEF_GRADE
               return '"APPLY_MAGIC_DEF_GRADE"';
               break;
           case 57: // APPLY_CURSE_PCT
               return '"APPLY_CURSE_PCT"';
               break;
           case 58: // APPLY_MAX_STAMINA
               return '"APPLY_MAX_STAMINA"';
               break;
           case 59: // APPLY_ATTBONUS_WARRIOR
               return '"APPLY_ATTBONUS_WARRIOR"';
               break;
           case 60: // APPLY_ATTBONUS_ASSASSIN
               return '"APPLY_ATTBONUS_ASSASSIN"';
               break;
           case 61: // APPLY_ATTBONUS_SURA
               return '"APPLY_ATTBONUS_SURA"';
               break;
           case 62: // APPLY_ATTBONUS_SHAMAN
               return '"APPLY_ATTBONUS_SHAMAN"';
               break;
           case 63: // APPLY_ATTBONUS_MONSTER
               return '"APPLY_ATTBONUS_MONSTER"';
               break;
           case 64: // APPLY_MALL_ATTBONUS
               return '"APPLY_MALL_ATTBONUS"';
               break;
           case 65: // APPLY_MALL_DEFBONUS
               return '"APPLY_MALL_DEFBONUS"';
               break;
           case 66: // APPLY_MALL_EXPBONUS
               return '"APPLY_MALL_EXPBONUS"';
               break;
           case 67: // APPLY_MALL_ITEMBONUS
               return '"APPLY_MALL_ITEMBONUS"';
               break;
           case 68: // APPLY_MALL_GOLDBONUS
               return '"APPLY_MALL_GOLDBONUS"';
               break;
           case 69: // APPLY_MAX_HP_PCT
               return '"APPLY_MAX_HP_PCT"';
               break;
           case 70: // APPLY_MAX_SP_PCT
               return '"APPLY_MAX_SP_PCT"';
               break;
           case 71: // APPLY_SKILL_DAMAGE_BONUS
               return '"APPLY_SKILL_DAMAGE_BONUS"';
               break;
           case 72: // APPLY_NORMAL_HIT_DAMAGE_BONUS
               return '"APPLY_NORMAL_HIT_DAMAGE_BONUS"';
               break;
           case 73: // APPLY_SKILL_DEFEND_BONUS
               return '"APPLY_SKILL_DEFEND_BONUS"';
               break;
           case 74: // APPLY_NORMAL_HIT_DEFEND_BONUS
               return '"APPLY_NORMAL_HIT_DEFEND_BONUS"';
               break;
           case 75: // APPLY_PC_BANG_EXP_BONUS
               return '"APPLY_PC_BANG_EXP_BONUS"';
               break;
           case 76: // APPLY_PC_BANG_DROP_BONUS
               return '"APPLY_PC_BANG_DROP_BONUS"';
               break;
           case 77: // APPLY_EXTRACT_HP_PCT
               return '"APPLY_EXTRACT_HP_PCT"';
               break;
           case 78: // APPLY_RESIST_WARRIOR
               return '"APPLY_RESIST_WARRIOR"';
               break;
           case 79: // APPLY_RESIST_ASSASSIN
               return '"APPLY_RESIST_ASSASSIN"';
               break;
           case 80: // APPLY_RESIST_SURA
               return '"APPLY_RESIST_SURA"';
               break;
           case 81: // APPLY_RESIST_SHAMAN
               return '"APPLY_RESIST_SHAMAN"';
               break;
           case 82: // APPLY_ENERGY
               return '"APPLY_ENERGY"';
               break;
           case 83: // APPLY_DEF_GRADE
               return '"APPLY_DEF_GRADE"';
               break;
           case 84: // APPLY_COSTUME_ATTR_BONUS
               return '"APPLY_COSTUME_ATTR_BONUS"';
               break;
           case 85: // APPLY_MAGIC_ATTBONUS_PER
               return '"APPLY_MAGIC_ATTBONUS_PER"';
               break;
           case 86: // APPLY_MELEE_MAGIC_ATTBONUS_PER
               return '"APPLY_MELEE_MAGIC_ATTBONUS_PER"';
               break;
           default:
               addHtml("Unbekannter Apply Type::$type
");
               break;
       }
   }

   /*
    * Limit Types
    * 0:   LIMIT_NONE
    * 1:   LEVEL
    * 6:   PC_BANG
    * 7:   REAL_TIME
    * 8:   REAL_TIME_FIRST_USE
    * 9:   TIMER_BASED_ON_WEAR
    */

   /*
    * Types:
    * 0:   ITEM_NONE
    *      0:  NONE
    * 1:   ITEM_WEAPON
    *      0:  WEAPON_SWORD
    *      1:  WEAPON_DAGGER
    *      2:  WEAPON_BOW
    *      3:  WEAPON_TWO_HANDED
    *      4:  WEAPON_BELL
    *      5:  WEAPON_FAN
    *      6:  WEAPON_ARROW
    *      7:  WEAPON_MOUNT_SPEAR
    * 2:   ITEM_ARMOR
    *      0:  ARMOR_BODY
    *      1:  ARMOR_HEAD
    *      2:  ARMOR_SHIELD
    *      3:  ARMOR_WRIST
    *      4:  ARMOR_FOOTS
    *      5:  ARMOR_NECK
    *      6:  ARMOR_EAR
    * 3:   ITEM_USE
    *      0:  USE_POTION
    *      1:  USE_TALISMAN
    *      2:  USE_TUNING
    *      6:  USE_BAIT
    *      7:  USE_ABILITY_UP
    *      8:  USE_AFFECT
    *      9:  USE_CREATE_STONE
    *      10: USE_SPECIAL
    *      11: USE_POTION_NODELAY
    *      12: USE_CLEAR
    *      13: USE_INVISIBILITY
    *      14: USE_DETACHMENT
    *      15: USE_BUCKET
    *      17: USE_CLEAN_SOCKET
    *      18: USE_CHANGE_ATTRIBUTE
    *      19: USE_ADD_ATTRIBUTE
    *      20: USE_ADD_ACCESSORY_SOCKET
    *      21: USE_PUT_INTO_ACCESSORY_SOCKET
    *      22: USE_ADD_ATTRIBUTE2
    *      23: USE_RECIPE
    * 5:   ITEM_MATERIAL
    *      0:  MATERIAL_LEATHER
    * 6:   ITEM_SPECIAL
    *      0:  SPECIAL_MAP
    * 8:   ITEM_LOTTERY
    *      0:  LOTTERY_TICKET
    * 9:   ITEM_ELK
    *      0:  (int) 0
    * 10:  ITEM_METIN
    *      0:  METIN_NORMAL
    * 12:  ITEM_FISH
    *      0:  FISH_ALIVE
    *      1:  FISH_DEAD
    * 13:  ITEM_ROD
    * 14:  ITEM_RESOURCE
    *      1:  RESOURCE_WATERSTONEPIECE
    *      2:  RESOURCE_WATERSTONE
    *      3:  RESOURCE_BLOOD_PEARL
    *      4:  RESOURCE_BLUE_PEARL
    *      5:  RESOURCE_WHITE_PEARL
    *      6:  RESOURCE_BUCKET
    *      7:  RESOURCE_CRYSTAL
    *      8:  RESOURCE_GEM
    *      9:  RESOURCE_STONE
    *      10: RESOURCE_METIN
    *      11: RESOURCE_ORE
    * 16:  ITEM_UNIQUE
    *      0:  UNIQUE_NONE
    *      10: USE_SPECIAL
    * 17:  ITEM_SKILLBOOK
    *      0: (int) 0
    * 18:  ITEM_QUEST
    *      0:  (int) 0
    * 19:  ITEM_POLYMORPH
    *      0: (int) 0
    * 20:  ITEM_TREASURE_BOX
    *      0: (int) 0
    * 21:  ITEM_TREASURE_KEY
    *      0: (int) 0
    * 22:  ITEM_SKILLFORGET
    *      0: (int) 0
    * 23:  ITEM_GIFTBOX
    *      0:  ANTI_DROP
    * 24:  ITEM_PICK
    * 27:  ITEM_BLEND
    *      0: (int) 0
    * 28:  ITEM_COSTUME
    *      0:  COSTUME_BODY
    *      1:  COSTUME_HAIR
    */
convertSQLToTXT($sqlHp);

?>
 

 

 

Remplacez "LOCALHOST" de la ligne 3 par l'adresse IP serveur, "ID" par votre id et pareil pour "MDP".

Ensuite, il ne vous reste plus qu'à modifier votre item_proto de navicat, lancer ce script avec votre Wamp et récupérer les .txt restants.

 

Tuto : De moi.

Source : EB.

Petit message : Je ne fais pas ça pour un +1 ou un Merci mais juste pour aider, je ne me sert pas des créations des autres pour avoir des merci ou +1, si vous voulez remercier quelqu'un c'est Honni de EB, pas moi.

  • J'adore 1
Lien vers le commentaire
  • Réponses 3
  • Created
  • Dernière réponse

Top Posters In This Topic

Top Posters In This Topic

  • 2 weeks later...

Créer un compte ou se connecter pour commenter

Vous devez être membre afin de pouvoir déposer un commentaire

Créer un compte

Créez un compte sur notre communauté. C’est facile !

Créer un nouveau compte

Se connecter

Vous avez déjà un compte ? Connectez-vous ici.

Connectez-vous maintenant


×
×
  • Créer...

Information importante

Conditions d’utilisation / Politique de confidentialité / Règles / Nous avons placé des cookies sur votre appareil pour aider à améliorer ce site. Vous pouvez choisir d’ajuster vos paramètres de cookie, sinon nous supposerons que vous êtes d’accord pour continuer.