Test: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
'''Instructions:''' Fill out the form and copy the code it gives you. | |||
*If you're using it '''in-game''', you can use the following to implement it: | |||
**Take the whole code generated below, make it into a new paste on [http://pastebin.com/ PasteBin], then click 'Raw'. From there, use the in-game command '''/cmdurl [Pastebin URL]'''. | |||
**Omit the '/' at the beginning of the code below and copy it chunks at a time. Use '''/buffer s [Chunk 1]''' and from there, use '''/buffer a [Chunk 2+]'''. It's recommended to copy and paste chunks mid-word instead of during a space, as this is the easiest method to use the buffer commands. | |||
*[[ | **Copy and paste the full code into a book (if it fits), then sign the book and use '''/book pt'''. Left click with the book and it'll execute the command. | ||
*[[ | *If you're using it for a '''quest''': | ||
* | **Replace '''/i''' with '''/give {p}''' and insert it into your quest document. | ||
* | |||
'''NOTE:''' This doesn't yet support enchants, custom or vanilla, so you'll have to add those in manually. You can edit the code below as you please. | |||
<html> | |||
<script> | |||
function format() | |||
{ | |||
var holder = document.item.iName.value; | |||
var itemid = document.item.iID.value; | |||
var amount = document.item.iAmount.value; | |||
var holder2 = desc(holder); | |||
var namespace = holder2.join(""); | |||
var holder = color(); | |||
var iColor = holder; | |||
var name = iColor + namespace; | |||
holder = document.item.iDesc.value; | |||
var description = desc(holder); | |||
var d = description.join(""); | |||
var final = | |||
"/i " + itemid + " " + amount + " name:" + name + " lore:" + d; | |||
document.item.endres.value = final; | |||
} | |||
function color() | |||
{ | |||
var holder = document.item.iRarity.value; | |||
var color = ""; | |||
if (holder === "common") | |||
color = "&r"; | |||
else if (holder === "enchanted") | |||
color = "&b"; | |||
else if (holder === "uncommon") | |||
color = "&a"; | |||
else if (holder === "rare") | |||
color = "&e"; | |||
else if (holder === "epic") | |||
color = "&d"; | |||
else | |||
color = "&c"; | |||
return color; | |||
} | |||
function desc(d) | |||
{ | |||
var desc = d.split(''); | |||
for (var i = 0; i < desc.length; i++) | |||
if (desc[i] === " ") | |||
desc[i] = "_"; | |||
var counter = 40; | |||
for (var x = 0; x < desc.length; x++) | |||
if (desc[x] === "_" && x >= counter) | |||
{ | |||
desc[x] = "|"; | |||
counter = counter + 40; | |||
}} | } | ||
</ | return desc; | ||
} | |||
</script> | |||
<form name="item" id="item"> | |||
Minecraft Item <i>(<a href="http://minecraft-ids.grahamedgecombe.com/">Item List</a>)</i> | |||
<input name="list" id="iID"></input><br> | |||
Item Amount: <input type="text" id="iAmount"></input><br><br> | |||
Item Name: <input type="text" id="iName" value="Fush"></input><br> | |||
Rarity Tier <i>(See <a href="http://www.massivecraft.com/how-to-design-a-custom-item#rarity-tiers">Rarity Tiers</a>)</i> | |||
<select id="iRarity"> | |||
<option value="common">Common</option> | |||
<option value="enchanted">Enchanted</option> | |||
<option value="uncommon">Uncommon</option> | |||
<option value="rare">Rare</option> | |||
<option value="epic">Epic</option> | |||
<option value="legendary">Legendary</option> | |||
</select><br> | |||
Item Description: <input type="text" id="iDesc"></inpit><br> | |||
<input type="button" value="Submit" onClick="format()"></input><br><br> | |||
<textarea name="endres" id="endres" rows="5" cols="40">Item here.</textarea> | |||
</form> | |||
</html> |
Revision as of 00:31, 29 December 2015
Instructions: Fill out the form and copy the code it gives you.
- If you're using it in-game, you can use the following to implement it:
- Take the whole code generated below, make it into a new paste on PasteBin, then click 'Raw'. From there, use the in-game command /cmdurl [Pastebin URL].
- Omit the '/' at the beginning of the code below and copy it chunks at a time. Use /buffer s [Chunk 1] and from there, use /buffer a [Chunk 2+]. It's recommended to copy and paste chunks mid-word instead of during a space, as this is the easiest method to use the buffer commands.
- Copy and paste the full code into a book (if it fits), then sign the book and use /book pt. Left click with the book and it'll execute the command.
- If you're using it for a quest:
- Replace /i with /give {p} and insert it into your quest document.
NOTE: This doesn't yet support enchants, custom or vanilla, so you'll have to add those in manually. You can edit the code below as you please.