CosmoMS Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

[Dragon] Fame Seller

2 posters

Go down

[Dragon] Fame Seller  Empty [Dragon] Fame Seller

Post  Ownage Sat Feb 19, 2011 9:23 pm

This is a code for a fame seller if u guys want to put a NPC in

Code:
    Fame Seller (10mil mesos per fame)
*/



var status = 0;
var price = 10000000;
var fame = 1;

function start() {
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0) {
        cm.sendYesNo("Do you wish to buy some #fUI/UIWindow.img/QuestIcon/6/0# for 10m mesos?");
        status++;
    } else {
        if ((status == 1 && type == 1 && selection == -1 && mode == 0) || mode == -1) {
            cm.dispose();
        } else {
            if (status == 1) {
                if (cm.getMeso() >= price) {
                    cm.gainFame(+fame);
                    cm.gainMeso(-price);
                    cm.dispose();
                } else {
                    cm.sendOk("You need atleast 10m Mesos.");
                    cm.dispose();
                }
            }
        }
    }

Ownage

Posts : 4
Points : 10
Reputation : 0
Join date : 2011-02-19

Back to top Go down

[Dragon] Fame Seller  Empty Re: [Dragon] Fame Seller

Post  Chase Mon Feb 21, 2011 10:44 am

Ownage wrote:This is a code for a fame seller if u guys want to put a NPC in

Code:
    Fame Seller (10mil mesos per fame)
*/



var status = 0;
var price = 10000000;
var fame = 1;

function start() {
    action(1, 0, 0);
}

function action(mode, type, selection) {
    if (status == 0) {
        cm.sendYesNo("Do you wish to buy some #fUI/UIWindow.img/QuestIcon/6/0# for 10m mesos?");
        status++;
    } else {
        if ((status == 1 && type == 1 && selection == -1 && mode == 0) || mode == -1) {
            cm.dispose();
        } else {
            if (status == 1) {
                if (cm.getMeso() >= price) {
                    cm.gainFame(+fame);
                    cm.gainMeso(-price);
                    cm.dispose();
                } else {
                    cm.sendOk("You need atleast 10m Mesos.");
                    cm.dispose();
                }
            }
        }
    }

Fame selling NPC might be added but even if so, only Donors will have access to it.
Chase
Chase
Co-Owner of CosmoMs
Co-Owner of CosmoMs

Posts : 81
Points : 126
Reputation : 7
Join date : 2011-02-21
Location : In Rachel's bed, tucked under her blanket.

Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum