Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Gambling NPC-Better~

Status
Not open for further replies.
Experienced Elementalist
Joined
Jul 18, 2008
Messages
232
Reaction score
0
This is my own gambling NPC!
1/4 chance of winnning
Added checks for below 0 and if you can't gamble 1.05 billion mesos or higher
Credits to Luke of CookieMs for base script
Credits to MeGoesRawr for editing
Code:
/*
Base Script by Luke(Roamer in RaGEZONE) and GanstaX(StraightX in RaGEZONE) in CookieMS
Gambling NPC by MeGoesRawr of SpinMs
Please leave credits! If not.... You are a crazy mofo leecher and deserve to die!
*/

importPackage(net.sf.odinms.client);

var status = 0;
var fee;
var chance = Math.floor(Math.random()*4+1);

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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0) {
			cm.sendOk("Okay... See ya later... if this is still here ur server ownere is a leecher from ragezone!");
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendNext("Hello #h #! I am the Gambler NPC of #bSpinMs#k! If you would like to gamble... Please proceed! if this is still here ur server ownere is a leecher from ragezone! if this is still here ur server ownere is a leecher from ragezone! if this is still here ur server ownere is a leecher from ragezone!1 if this is still here ur server ownere is a leecher from ragezone!! if this is still here ur server ownere is a leecher from ragezone!! if this is still here ur server ownere is a leecher from ragezone!!! if this is still here ur server ownere is a leecher from ragezone!!!!!");
		} else if (status == 1) {
			cm.sendGetText("How much money would you like to gamble? if this is still here ur server ownere is a leecher from ragezone!");
		} else if (status == 2) {
			fee = cm.getText();
			cm.sendYesNo("Are you sure you want to gamble #r" + fee + "#k mesos?... if this is still here ur server ownere is a leecher from ragezone!");
		} else if (status == 3) {
			if (cm.getMeso() < fee) {
				cm.sendOk("You don't have enough mesos! if this is still here ur server ownere is a leecher from ragezone!");
				cm.dispose();
			} else if (cm.getMeso() >= 1050000000) {
				cm.sendOk("I'm sorry but... You can't gamble when you have 1,050,000,000 mesos or higher... if this is still here ur server ownere is a leecher from ragezone!");
				cm.dispose();
			} else if (cm.getText() < 0) {
				cm.sendOk("You can't gamble less than 0 mesos... if this is still here ur server ownere is a leecher from ragezone!");
				cm.dispose();
			} else {
				if (chance <= 1) {
					cm.gainMeso(-fee);
					cm.sendNext("Tough luck... Maybe next time you will win! if this is still here ur server ownere is a leecher from ragezone!");
					cm.dispose();
				}
				else if (chance == 2) {
					cm.gainMeso(-fee);
					cm.sendNext("Tough luck... Maybe next time you will win! if this is still here ur server ownere is a leecher from ragezone!");
					cm.dispose();
				}
				else if (chance == 3) {
					cm.gainMeso(-fee);
					cm.sendNext("Tough luck... Maybe next time you will win! if this is still here ur server ownere is a leecher from ragezone!");
					cm.dispose();
				}
				else if (chance >= 4) {
					cm.gainMeso(fee * 2);
					cm.sendNext("#rCONGRATUMAGALATIONS#k! You have won! if this is still here ur server ownere is a leecher from ragezone!");
					cm.dispose();
				}
			}
		}
	}
}
Have fun!
EDIT : If someone could... Could they make like so when you have 1.05 billion mesos they can still gamble but they can't gamble 1.05 billion mesos?
 
Newbie Spellweaver
Joined
Jun 10, 2008
Messages
7
Reaction score
1
Lol, nice release. Slightly higher rates than I put in mine.
Might I also suggest adding in an @lottery for anyone that doesn't wanna have to find the npc? XP
 
Junior Spellweaver
Joined
Jul 6, 2008
Messages
180
Reaction score
0
what does this do?
Edit: something like lucky draw? allowing it the mesos u bet x 2?
 
Junior Spellweaver
Joined
Jul 6, 2008
Messages
180
Reaction score
0
thats what i guess but not sure whether issit so or not ..
 
Newbie Spellweaver
Joined
Jun 10, 2008
Messages
7
Reaction score
1
As you said in the end, you wanted people to be able to gamble when they had high amounts of mesos. I made my NPC give out the bronze, silver, and gold bags. Which can be traded in for 1m, 5m, and 10m. Which then, you can easily stop people from losing money by betting when they already have high amounts. The only sad part is that you have to set the amounts to bet for that.
 
Experienced Elementalist
Joined
Jul 18, 2008
Messages
232
Reaction score
0
hmm... i made bronze,silver, and gold bags working in my server and i made them droppable from monsters :/
Anyways I have a currency exchanger as well :p
 
Newbie Spellweaver
Joined
Jun 10, 2008
Messages
7
Reaction score
1
Lol, you could do it with any undropped item.
Like I also have a higher npc which gives out either 0, 1, 2, or 5 red envelopes, that are traded in for 100m each. XP
Anyways, you get the idea.
 
Experienced Elementalist
Joined
Jul 18, 2008
Messages
232
Reaction score
0
YOU STOLE MY CURRENCY NPC :(
That's the same type of currency my server uses =3
 
Newbie Spellweaver
Joined
Jun 10, 2008
Messages
7
Reaction score
1
Lol, I just got bored and coded it yesterday. XP
Anyways, I wish I could help, but I'm just beginning in Java, so I don't know all the commands
 
Supreme Arcanarch
Loyal Member
Joined
Jul 21, 2008
Messages
969
Reaction score
1
wth i see so many of if "this is still here ur server ownere is a leecher from ragezone!"

LOL
 
Custom Title Activated
Loyal Member
Joined
Apr 29, 2008
Messages
1,297
Reaction score
509
Lol.
Nice to see which server's owner is actually noob
Anyway nice release
 
&#12484;
Loyal Member
Joined
Apr 12, 2008
Messages
729
Reaction score
28
-cough- "if this is still here ur server ownere is a leecher from ragezone!" -cough-



I just ruined your anti leech! xD
 
Experienced Elementalist
Joined
Jul 8, 2008
Messages
246
Reaction score
0
EDIT : If someone could... Could they make like so when you have 1.05 billion mesos they can still gamble but they can't gamble 1.05 billion mesos?

Use This

EDITTED 3 TIMES SORRY LAST TIME I COPIED WRONG SCRIPT

Code:
/*
Base Script by Luke(Roamer in RaGEZONE) and GanstaX(StraightX in RaGEZONE) in CookieMS
Gambling NPC by MeGoesRawr of SpinMs
Please leave credits! If not.... You are a crazy mofo leecher and deserve to die!
*/
// creditz to fusion for fixing the above failed slightly


importPackage(net.sf.odinms.client);

var status = 0;
var fee;
var chance = Math.floor(Math.random()*4+1);

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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
	} else {
		if (mode == 0) {
			cm.sendOk("Okay... See ya later...");
			cm.dispose();
			return;
		}
		if (mode == 1)
			status++;
		else
			status--;
		if (status == 0) {
			cm.sendYesNo("Hello #h #! I am the Gambler NPC of #bENTER SERVER NAME HERE#k! Press Yes İf you would like to gamble mesos and try your chance to win x2 in return ");
		} else if (status == 1) {
			cm.sendGetText("How much money would you like to gamble? Please Type İt İn !");

		} else if (status == 2) {

			fee = cm.getText();
			cm.sendYesNo("Are you sure you want to gamble #r" + fee + "#k mesos?");

			} else if (cm.getMeso() < fee) {
				cm.sendOk("You don't have enough mesos! ");
				cm.dispose();

			} else if (cm.GetText() >= 1050000000) {
				cm.sendOk("Stupid noob, wtfux i tell you about betting 1.05bill mesos? You just dont Ducking listen do you");
				cm.dispose();

			} else if (cm.getMeso() >= 1050000000) {
				cm.sendOk("Just letting you know you got over 1.05bill mesos. Please remember not to try bet over that.");
				

			} else if (cm.getText() < 0) {
				cm.sendOk("You can't gamble less than 0 mesos... ");
				cm.dispose();

		} else {
				if (chance <= 1) {
					cm.gainMeso(-fee);
					cm.sendNext("Tough luck... Maybe next time you will win! ");
					cm.dispose();
				}
				else if (chance == 2) {
					cm.gainMeso(-fee);
					cm.sendNext("Tough luck... Maybe next time you will win! ");
					cm.dispose();
				}
				else if (chance == 3) {
					cm.gainMeso(-fee);
					cm.sendNext("Tough luck... Maybe next time you will win! ");
					cm.dispose();
				}
				else if (chance >= 4) {
					cm.gainMeso(fee * 2);
					cm.sendNext("#rCONGRATUMAGALATIONS#k! You have won! You Will now recieve x2 the mesos you first bet ");
					cm.dispose();
				}
			}
		}
	}
}
 
Last edited:
Legendary Battlemage
Loyal Member
Joined
Jul 26, 2008
Messages
694
Reaction score
31
hmm, dude, gambling npcs are great i mean they are
 
Experienced Elementalist
Joined
Jul 8, 2008
Messages
246
Reaction score
0
i suggest you replace your one with mine and give me credits
 
Banned
Banned
Joined
Aug 24, 2008
Messages
64
Reaction score
0
his works just fine, y should he replace his with urs and give u credits?
 
Status
Not open for further replies.
Back
Top