I have no idea if it works. It should. If the items are incorrect fix them for me. I rushed on this after I saw the noobness of the other one. Well, here it is.
Just kidding. I tested it and it worked. I'll point out some errors of StraMS's NPCCode:var status = 0; var itemsNeeded = [[4000000, 20],[4000015, 30],[4000033, 20],[4001042, 1],[4032190, 25]]; function start() { var string = "Hello " + cm.getPlayer().getName() + ", I'm the Christmas item trader.\r\nIf you have any of the required items you can trade them in for some fabulous prizes.\r\nThe items are \r\n\r\n"; for (var i = 0; i < itemsNeeded.length; i++) string += "#v" + itemsNeeded[i][0] + "#"; string += ". \r\nDo you have any of the items?"; cm.sendNext(string); } function action(made, by, jakesdexless) { if (made < 1) cm.dispose(); else { status++; var prizes = [[1702008], [1000026 + 10 * cm.getPlayer().getGender()], [1082101], [1012007, 1000026 + cm.getPlayer().getGender()], [1012007]]; if (status == 1) { var str = "What would you like to trade the items for?"; for (var i = 0; i < itemsNeeded.length; i++) str += "\r\n#L" + i + "#" + itemsNeeded[i][1] + " #t" + itemsNeeded[i][0] + "# for #t" + (i != 3 ? prizes[i][0] : (prizes[i][0] +"# and #t"+ prizes [i][1])) + "##l"; cm.sendSimple(str); } else if (status == 2) { var item = itemsNeeded[jakesdexless][0]; var quantity = itemsNeeded[jakesdexless][1]; if (cm.haveItem(item, quantity)) { cm.gainItem(item, -quantity); for (var x = 0; x < prizes[jakesdexless].length; x++) cm.gainItem(prizes[jakesdexless][x]); } else cm.sendOk("You do not have " + quantity + " of the item #t" + item + "#."); cm.dispose(); } } }
1.This has to be cm.sendSimple(String text). You can't select from sendNextPrev(String text).Code:cm.sendNextPrev("What would you like to trade the items for? \r\n\r\n\r\n#L0##b20 Blue Snail Shells for Santa's Sack#k#l \r\n#L1##b30 Horny Mushroom Caps for a Santa Hat#k#l \r\n#L2##b20 Croco Skins for Santa Gloves#k#l \r\n#L3##b1 Slime Eraser for a full #r" + cm.getChar().getGender() + " Santa Set#k#l \r\n#L4##b25 Orange Mushroom Caps for Santa's Beard#k#l");
2. It does not dispose. You click on it and you're stuck.
3. #r" + cm.getChar().getGender() + " Santa Set#k is not correct. If you're male it would said 0 Santa Set, if you're female it would say 1 Santa Set.
4. There's also a few style problems that are minor. You don't need to do #k and then change color without text. You also don't need the action(1, 0, 0); You don't need status = -1; Why not just do var status = -1; since that does the same thing. This part is also repetitive code:
Advantages of using this NPC as opposed to StraMS'sCode:if(cm.getChar().getGender() == 0) { cm.gainItem(4001042, -1); cm.gainItem(1012007); cm.gainItem(1000026); cm.gainItem(1082101); cm.gainItem(1050019); cm.gainItem(1071003); } else if(cm.getChar().getGender() == 1) { cm.gainItem(4001042, -1); cm.gainItem(1012007); cm.gainItem(1001036); cm.gainItem(1082101); cm.gainItem(1050019); cm.gainItem(1071003); }
1. This works.
2. It's shorter and easier to modify. It's based on ids and not text.
3. This NPC is from a parody thread.



![Christmas Item Exchanger [Even Better]](http://ragezone.com/hyper728.png)


