- Joined
- Dec 11, 2008
- Messages
- 3
- Reaction score
- 0
Code:
var status = -1;
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == -1) {
cm.sendOk("Are you sure? Scaredy cat");
cm.dispose();
} else {
if (mode == 1) {
status++;
} else {
status--;
}
if (status == 0) {
cm.sendNext("#ehi i Am seller chaos scroll!!!");
} else if (status == 1) {
cm.sendYesNo("\r\nI am the Seller #i2049100#\r\nWould you like to buy some \r\n#i2049100#?")
} else if (status == 2) {
cm.sendGetText("\r\nput in the box below the amount of \r\nchaos scroll you want to buy.\r\n\r\n(1 FOR 140000000 MESOS!!!")
} else if (status == 3) {
text = cm.getText();
cm.sendYesNo("#eI See, so you want to buy \r\n" + text + " chaos scroll..\r\nWell, its gonna cost you " + text * 140000000 + "\r\nAre you sure you want to make the purchase?")
} else if (status == 4) {
price = text * 140000000;
if (cm.getMeso() >= price) {
cm.gainMeso(-price)
cm.gainItem(2049100, text);
cm.sendNext("#eYou have been lost " + price +" Mesos! and gained " + text + "#i2049100#")
} else {
cm.sendNext("Im sorry but you dont have enought Mesos.")
cm.dispose();
}
}
}
}