Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- *
- * @author Andy
- */
- var status;
- var text;
- var spawns = [
- /* edit them yourself - you can add more as well!
- [name, mobId, itemId, amount(item)]*/
- ["snail", 100100, 4000000, 10], // this is an example, name is "snail" - spawns 100100 (snail) - for item 10 4000000 (blue snail shell)
- /*["input2", 1, 1, 1],
- ["input3", 1, 1, 1],
- ["input4", 1, 1, 1],
- ["input5", 1, 1, 1],
- ["input6", 1, 1, 1],
- ["input7", 1, 1, 1],
- ["input8", 1, 1, 1],
- ["input9", 1, 1, 1],
- ["input10", 1, 1, 1]*/
- ];
- // ONLY CHANGE GREY TEXT BELOW THIS POINT!
- function start() {
- status = -1;
- action(1, 0, 0);
- }
- function action(mode, type, selection) {
- if (mode === 1) {
- status++;
- }else{
- status--;
- }
- if (status === 0) {
- text = "Hey which monster do you want to spawn?";
- for (var i = 0; i < spawns.length; i++) {
- text += "\r\n#L" + i + "#Spawn 1 " + spawns[i][0] + " for " + spawns[selection][3] + " #i" + spawns[i][2] + "##l";
- }
- cm.sendSimple(text);
- } else if (status === 1) {
- if (cm.haveItem(spawns[selection][2], spawns[selection][3])) {
- cm.summonMob(spawns[selection][1], 1);
- cm.gainItem(spawns[selection][2], -spawns[selection][3]);
- } else {
- cm.sendOk("You need at least " + spawns[selection][3] + " #i" + spawns[i][2] + "# to spawn a " + spawns[i][0] + "");
- }
- cm.dispose();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement