Advanced Fame Seller

Junior Spellweaver
Joined
Jul 20, 2008
Messages
147
Reaction score
5
Hi..I have created a fame seller that sells fame in a bundle, meaning that you can buy 10 fame for the price of 100mil. 1 fame is ussually just 10mil. You can buy fame in groups of 1,3,5,10,20,50,100!
If you buy 100 fame, there is a map message saying how rich you are!

Hopefully it doesn't spam.

It works 100% :D

go to source>scripts>npc and choose which npc you want to put it in. Copy and paste the below text into the npc you want it in.

Added Pictures

Code:
/*
	This file is part of the MyStoryMS Maple Story Server
    Copyright (C) 2008 Nathan

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License version 3
    as published by the Free Software Foundation. You may not use, modify
    or distribute this program under any other version of the
    GNU Affero General Public License.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see .#fUI/UIWindow.img/QuestIcon/6/0
*/

//Malady

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

function start() {
	status = -1;
	action(1, 0, 0);
}

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0 && status == 0) {
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendSimple("Hello...\r\nI am the #fUI/UIWindow.img/QuestIcon/6/0# Seller  .. If you would like to buy some Fame just choose one of the following deals :\r\n#b#L0#1 #fUI/UIWindow.img/QuestIcon/6/0# (10,000,000 mesos).#l\r\n#L1#3 #fUI/UIWindow.img/QuestIcon/6/0# (30,000,000 mesos).#l\r\n#L2#5 #fUI/UIWindow.img/QuestIcon/6/0# (50,000,000 mesos).#l\r\n#L3#10 #fUI/UIWindow.img/QuestIcon/6/0# (100,000,000 mesos).#l\r\n#L4#20 #fUI/UIWindow.img/QuestIcon/6/0# (200,000,000 mesos).#l\r\n#L5#50 #fUI/UIWindow.img/QuestIcon/6/0# (500,000,000 mesos).#l\r\n#L6#100 #fUI/UIWindow.img/QuestIcon/6/0# (1,000,000,000 mesos).#l\r\n\r\n#kEnjoy :)");
		} else if (status == 1) {
			if (selection == 0) {
				cm.sendSimple("1 #fUI/UIWindow.img/QuestIcon/6/0# #b10,000,000 mesos#k.\r\nAre you sure you want to buy it ?\r\n#b#L0#Yes, I am.#l");
			} else if (selection == 1) {
				cm.sendSimple("3 #fUI/UIWindow.img/QuestIcon/6/0# #b30,000,000 mesos#k.\r\nAre you sure you want to buy it ?\r\n#b#L1#Yes, I am.#l");
			} else if (selection == 2) {
				cm.sendSimple("5 #fUI/UIWindow.img/QuestIcon/6/0# #b50,000,000 mesos#k.\r\nAre you sure you want to buy it ?\r\n#b#L2#Yes, I am.#l");
			} else if (selection == 3) {
				cm.sendSimple("10 #fUI/UIWindow.img/QuestIcon/6/0# #b100,000,000 mesos#k.\r\nAre you sure you want to buy it ?\r\n#b#L3#Yes, I am.#l");
      			} else if (selection == 4) {
        			cm.sendSimple("20 #fUI/UIWindow.img/QuestIcon/6/0# #b200,000,000 mesos#k.\r\nAre you sure you want to buy it ?\r\n#n#L4#Yes, I am.#l");
      			} else if (selection == 5) {
        			cm.sendSimple("50 #fUI/UIWindow.img/QuestIcon/6/0# #b500,000,000 mesos#k.\r\nAre you sure you want to buy it ?\r\n#n#L5#Yes, I am.#l");
      			} else if (selection == 6) {
       			 	cm.sendSimple("100 #fUI/UIWindow.img/QuestIcon/6/0# #b1,000,000,000 mesos#k.\r\nAre you sure you want to buy it ?\r\n#n#L6#Yes, I am.#l");
			}
		} if (status == 2) {
	  if (selection == 0) {
	  if (cm.getMeso() >= 10000000) {
	  cm.sendOk("You have bought #b1 #fUI/UIWindow.img/QuestIcon/6/0##k.");
	  cm.gainMeso(-10000000);
          cm.gainFame(1);
	  cm.dispose();
	} else {
	  cm.sendOk("You don't have enough mesos.");
	  cm.dispose();
	}
	} else if (selection == 1) {
	  if (cm.getMeso() >= 30000000) {
	  cm.sendOk("You have bought #b3 #fUI/UIWindow.img/QuestIcon/6/0##k.");
	  cm.gainMeso(-30000000);
	  cm.gainFame(3);
	  cm.dispose();
	} else {
	  cm.sendOk("You don't have enough mesos.");
	  cm.dispose();
	}
	} else if (selection == 2) {
	  if (cm.getMeso() >= 50000000) {
	  cm.sendOk("You have bought #b5 #fUI/UIWindow.img/QuestIcon/6/0##k.");
	  cm.gainMeso(-50000000);
	  cm.gainFame(5);
	  cm.dispose();
	} else {
	  cm.sendOk("You don't have enough mesos.");
	  cm.dispose();
	}
	} else if (selection == 3) {
	  if (cm.getMeso() >= 100000000) {
	  cm.sendOk("You have bought #b10 #fUI/UIWindow.img/QuestIcon/6/0##k");
	  cm.gainMeso(-100000000);
          cm.gainFame(10);
	  cm.dispose();
	} else {
	  cm.sendOk("You don't have enough mesos.");
	  cm.dispose();
	}
      } else if (selection == 4) {
	  if (cm.getMeso() >= 200000000) {
	  cm.sendOk("You have bought #b20 #fUI/UIWindow.img/QuestIcon/6/0##k");
	  cm.gainMeso(-200000000);
          cm.gainFame(20);
	  cm.dispose();
	} else {
	  cm.sendOk("You don't have enough mesos.");
	  cm.dispose();
        }
      } else if (selection == 5) {
	  if (cm.getMeso() >= 500000000) {
	  cm.sendOk("You have bought #b50 #fUI/UIWindow.img/QuestIcon/6/0##k");
	  cm.gainMeso(-500000000);
          cm.gainFame(50);
	  cm.dispose();
	} else {
	  cm.sendOk("You don't have enough mesos.");
	  cm.dispose();
        }
      } else if (selection == 6) {
	  if (cm.getMeso() >= 1000000000) {
	  cm.sendOk("You have bought #b100 #fUI/UIWindow.img/QuestIcon/6/0##k");
	  cm.gainMeso(-1000000000);
          cm.gainFame(100);
          var winningplayer = cm.getChar().getName();
          cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
	  cm.dispose();
	} else {
	  cm.sendOk("You don't have enough mesos.");
	  cm.dispose();
        }
      }
    }
  }
}


Credits to me!(natkemon)
 

Attachments

  • Maple0016 - Advanced Fame Seller - RaGEZONE Forums
    Maple0016.webp
    78.2 KB · Views: 189
  • fame1 - Advanced Fame Seller - RaGEZONE Forums
    fame1.webp
    85.8 KB · Views: 131
Last edited:
Re: [RELEASE] Advanced Fame Seller

Lol, i think it would be a lot better if u found out how to do something like
cm.gainFame(+fame, 100) or something. Cuase putting cm.gainFame(+fame) 100 times is kinda bleh haha.

Good work though
 
Re: [RELEASE] Advanced Fame Seller

WoWWW SO ADVANCED ... -.- Btw this
Code:
 [b]winningplayer = cm.getChar().getName();[/b]
          cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
	  cm.dispose();
Should be changed to this
Code:
 [b]var winningplayer = cm.getChar().getName();[/b]
          cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
	  cm.dispose();
One more thing, you didn't add a selection to close the chat so if the player selects "End Chat" it won't dispose properly.
 
Re: [RELEASE] Advanced Fame Seller

Lol, i think it would be a lot better if u found out how to do something like
cm.gainFame(+fame, 100) or something. Cuase putting cm.gainFame(+fame) 100 times is kinda bleh haha.

Good work though

Yes i know, i did it this way because it looked like i put alot of effort into it.

Killshadow05, Mine owns your fame seller
 
Re: [RELEASE] Advanced Fame Seller

WoWWW SO ADVANCED ... -.- Btw this
Code:
 [b]winningplayer = cm.getChar().getName();[/b]
          cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
	  cm.dispose();
Should be changed to this
Code:
 [b]var winningplayer = cm.getChar().getName();[/b]
          cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
	  cm.dispose();
One more thing, you didn't add a selection to close the chat so if the player selects "End Chat" it won't dispose properly.
Edit your script and add that >_> Else this message
Code:
cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
won't be displayed. Btw it won't work for someone doesn't have a gainFame function.
 
Re: [RELEASE] Advanced Fame Seller

Lol actually i dont know if you would say own.
Because im afraid to buy the 100 fame package, cause whenever you do your gonna get spammed with
You have gained 1 fame
You have gained 1 fame
You have gained 1 fame
You have gained 1 fame
You have gained 1 fame
You have gained 1 fame
ect

Edit:
And it was never a contest, i just wanted people to have a good fame seller instead of that stealing one.
 
Re: [RELEASE] Advanced Fame Seller

WoWWW SO ADVANCED ... -.- Btw this
Code:
 [b]winningplayer = cm.getChar().getName();[/b]
          cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
	  cm.dispose();
Should be changed to this
Code:
 [b]var winningplayer = cm.getChar().getName();[/b]
          cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
	  cm.dispose();
One more thing, you didn't add a selection to close the chat so if the player selects "End Chat" it won't dispose properly.
Edit your script and add that >_> Else this message
Code:
cm.mapMessage(5, "[FAME] "+ winningplayer +" Just bought 100 Fame for 1,000,000,000! WOW, so rich! ~");
won't be displayed. Btw it won't work for someone doesn't have a gainFame function.
Have you tested your script? From the looks of it some stuff might not work.. So please edit your script to what I posted above if the things I mentioned don't work >.>
 
Re: [RELEASE] Advanced Fame Seller

@xazerrx
Yeap it work with your fix haha. =)
BTW is it possible to make it broadcast to the whole world instead of map? I never tried before.
 
Re: [RELEASE] Advanced Fame Seller

In my server, Mine doesn't get spammed saying "you have gain 1 fame"

In my server, EVERYTHING WORKS

if you dont believe me,, play my server

mystoryms.thruhere.net
 
Re: [RELEASE] Advanced Fame Seller

Lol actually i dont know if you would say own.
Because im afraid to buy the 100 fame package, cause whenever you do your gonna get spammed with
You have gained 1 fame
You have gained 1 fame
You have gained 1 fame
You have gained 1 fame
You have gained 1 fame
You have gained 1 fame
ect

Edit:
And it was never a contest, i just wanted people to have a good fame seller instead of that stealing one.

First of all i didn't steal it! I gave credits, if only you read my thread properly
and
If i did cm.gainFame(+fame, 100) would i make it so it wont spam?
 
Re: [RELEASE] Advanced Fame Seller

In my server, Mine doesn't get spammed saying "you have gain 1 fame"

In my server, EVERYTHING WORKS

if you dont believe me,, play my server

mystoryms.thruhere.net

Yes, we completely understand, no need to advertise here.
 
Re: [RELEASE] Advanced Fame Seller

First of all i didn't steal it! I gave credits, if only you read my thread properly
and
If i did cm.gainFame(+fame, 100) would i make it so it wont spam?
and he meant the fame npc that steals fame. not u.
 
Re: [RELEASE] Advanced Fame Seller

Dude, chill out. We never blame you for anything
And it was never a contest, i just wanted people to have a good fame seller instead of that stealing one.

He wasn't refering to YOU. He meant that the original Coco will take mesos from you even if you select 'no'.
 
Re: [RELEASE] Advanced Fame Seller

someone needs to know the meaning of "Advance".

also, the "+fame" is not "One More Fame"

fame = 1 in that script..
and the +fame = +1, it means POSITIVE 1 basically.

In others words.. "+" is not necessary. and all you need is (If you got this function) cm.gainFame(100);/cm.gainFame(fame+[AMOUNT-1]) (the last one is stupid, but ok..).
 
Re: [RELEASE] Advanced Fame Seller

Things you need to add in case you think your script is so perfect :
Code:
winningplayer = cm.getChar().getName();
To
Code:
[b]var[/b] winningplayer = cm.getChar().getName();
And add
Code:
var fame = 1;
Both of them can be added at the top of the script. Add a proper disposing method too. If the player chooses "End Chat" It would not close the chatbox.

Otherwise just do what XxOsirisxX said.
 
Back