• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Using a .html file to convert code to JASS

Status
Not open for further replies.
Level 1
Joined
Apr 8, 2020
Messages
110
How does one utilize the tool provided for Recipe to convert the following code into JASS?
Java:
[
    //   3 potions of healing
    // = 1 potion of greater healing
    { ingredients: [{ id: 'phea', charges: 3 }],
      products: [{ type: 'item', id: 'pghe', charges: 1 }]},

    //   3 potions of greater healing
    // = 1 health stone
    { ingredients: [{ id: 'pghe', charges: 3 }],
      products: [{ type: 'item', id: 'hlst', charges: 1 }]},

    //   1 Maul of Strength
    // + 1 Enchanted Gemstone
    // = 3 random different stones (Health Stone, Mana Stone, Ice Shard(kind of looks like a stone), Infeno Stone)
    // Note that the Maul of Strength is preserved (by being a product of the recipe)
    //
    { ingredients: [{ id: 'mlst' },
                    { id: 'engs' }],
      products: [{ type: 'item', id: 'mlst' },
                 { type: 'random-set',
                   set: [{ id: 'hlst', charges: 1 },
                         { id: 'shar', charges: 1 },
                         { id: 'infs', charges: 1 },
                         { id: 'mnst', charges: 1 }],
                   pick: 3 }]},

    //   1 Wirt's Leg
    // + 1 Drek'thar's Spellbook
    // = 1 Scroll of Town Portal
    { ingredients: [{ id: 'wtlg' },
                    { id: 'dtsb' }],
      products: [{ type: 'item', id: 'stwp', charges: 1 }]},

    //   1 Frostguard   (sword)
    // + 1 orb of frost
    // + 1 Frost Wyrm Skull Shield
    // = 1 Crown of the Deathlord
    { ingredients: [{ id: 'frgd' },
                    { id: 'ofro' },
                    { id: 'fwss' }],
      products: [{ type: 'item', id: 'crdt' }]},
]
Never mind, I got it. I just needed to convert the txt file to html. When I renamed the file, the file did not convert to the proper file, so I used notepad++ to do it.
 

Attachments

  • wc3-item-recipe.txt
    19 KB · Views: 29
  • recipe-demo.w3x
    20.1 KB · Views: 17
Last edited:
Status
Not open for further replies.
Top