[Release] Flower Pot NPC SUPER EASY EDITING

Skilled Illusionist
Joined
Nov 29, 2008
Messages
370
Reaction score
7
I fixed up the NPC and made it so it's super easy to edit the items and stuff, just change the stuff at the top, I labeled it incase you don't know what it does.

I know there is a Flower Pot NPC already released with like a gm hat and stuff, but anyways, I made an npc and it has like 30-40 rare items for 40 flower pots each. You can get rid of the items you want, and change the amount of flower pots. Anyways, here it is.


PHP:
var item = Array(1072349, 1002735, 1002736, 1302081, 1312037, 1322060, 1402046, 1412033, 1422037, 1442063, 2070018, 1452060, 1442068, 1382060, 1022060, 1012106, 1332079, 1402050, 1462054, 1472074, 1432048, 1382052, 1372042, 1012076, 1012077, 1012078, 1012079, 1022058, 1302089, 1302088, 1302090, 1302091, 1302092, 1302094, 2041200, 1122001, 1122002, 1122003, 1122004, 1122005, 1122006, 1082246, 1072330, 1072333, 1072334, 1072341, 1062076, 1012084, 1002723);
var potsnum = 40; // Number of Item needed
var youritem = 4220000;  // Item Needed

function start() {
    var text = "What item do you want, all items are for #r"+potsnum+" #i"+youritem+" \r\n\ \r\n";
    for(var i = 0; i < item.length ; i++)
    text += "#L" + i + "##t" + item[i] + "##l\r\n";
    cm.sendSimple(text);
}
function action(mode, type, selection) {
    if(cm.haveItem(youritem, potsnum)) {
        cm.gainItem(item[selection], 1);
        cm.gainItem(youritem, -potsnum);
        cm.sendOk("#bYou have recieved your prize.");
        cm.dispose();
} else {
        cm.sendSimple("You don't have enough #i"+youritem+" \r\n\ to exchange for the item");
    }
    cm.dispose();
}
 
Last edited:
Back