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!

Casino NPC #2

Newbie Spellweaver
Joined
Aug 22, 2008
Messages
6
Reaction score
0
Place into whatever NPC you want to use it for:
Code:
/*
	This file is part of the OdinMS Maple Story Server
    Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> 
                       Matthias Butz <matze@odinms.de>
                       Jan Christian Meyer <vimes@odinms.de>

    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 <http://www.gnu.org/licenses/>.


Casino NPC
Coded by Survival for Weedstory

*/

var status = 0;
var price = 5000000;
var scammed = 5000000;
var prize1 = 25000000;
var prize2 = 50000000;
var prize3 = 100000000;
var prize4 = 150000000;
                             

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

function action(mode, type, selection) {
	if (mode == -1) {
		cm.dispose();
        } else {
		if (cm.getMeso() <= price) {
			cm.sendOk("You don't have enough mesos to gamble!");
			cm.dispose();
			return;
		}
		if (mode == 0) {
			cm.sendOk("Whatever!");
			cm.dispose();
			return;
		}
		status++;
		if (status == 0) {
			cm.sendNext("Hello #d#h ##k!\r\nWould you like to gamble some of your mesos?");
		} else if (status == 1) {
			cm.sendSimple("Alright, here we go! \r\n#L0##dGamble Mesos ("+ price +" mesos)#k#l\r\n#L1##dNevermind...#k#l")
		} else if (status == 2) {
                     if (selection == 0) {
                                cm.gainMeso(-price);
                                var playernumber = Math.floor(Math.random()*1000+1); //Random number from 1 to 1000
				if (playernumber >= 0 && playernumber <= 100) {
                                    
                                    cm.sendOk("Congrats, #d#h ##k! You won "+ scammed +" mesos!\r\n\r\nOh, wait. Nevermind, I just scammed you for "+ scammed +" mesos, haha!~");
                                    cm.gainMeso(-scammed);
                                    winningplayer = cm.getChar().getName();
                                    cm.mapMessage(5, "[CASINO] "+ winningplayer +" just got scammed "+ scammed +" mesos! See, gambling is bad for you!~");
                                    cm.dispose();
				} else if(playernumber >= 200 && playernumber <= 210) {
                                    
                                    cm.sendOk("Congrats, #d#h ##k! You won "+ prize1 +" mesos!");
                                    cm.gainMeso(prize1);
                                    winningplayer = cm.getChar().getName();
                                    cm.mapMessage(5, "[CASINO] "+ winningplayer +" hit the jackpot ("+ prize1 +" mesos)! Don't spend it all in one place!~");
                                    cm.dispose();
				} else if(playernumber >= 400 && playernumber <= 410) {
                                    
                                    cm.sendOk("Congrats, #d#h ##k! You won "+ prize2 +" mesos!");
                                    cm.gainMeso(prize2);
                                    winningplayer = cm.getChar().getName();
                                    cm.mapMessage(5, "[CASINO] "+ winningplayer +" hit the jackpot ("+ prize2 +" mesos)! Don't spend it all in one place!~");
                                    cm.dispose();
				} else if(playernumber >= 600 && playernumber <= 610) {
                                    
                                    cm.sendOk("Congrats, #d#h ##k! You won "+ prize3 +" mesos!");
                                    cm.gainMeso(prize3);
                                    winningplayer = cm.getChar().getName();
                                    cm.mapMessage(5, "[CASINO] "+ winningplayer +" hit the jackpot ("+ prize3 +" mesos)! Don't spend it all in one place!~");
                                    cm.dispose();
				} else if(playernumber >= 800 && playernumber <= 810) {
                                    
                                    cm.sendOk("Congrats, #d#h ##k! You won "+ prize4 +" mesos!");
                                    cm.gainMeso(prize4);
                                    winningplayer = cm.getChar().getName();
                                    cm.mapMessage(5, "[CASINO] "+ winningplayer +" hit the jackpot ("+ prize4 +" mesos)! Don't spend it all in one place!~");
                                    cm.dispose();
				} else {
                                    cm.sendOk("Sorry, you didn't win anything this time. Please try again.")
                                    cm.dispose();
				}
                        } else if (selection == 1) {
                                cm.sendOk("I guess you have better things to spend your mesos on, hope to see you around these parts again!!");
				cm.dispose();
                        }
                }
        }
}

Features:
- Relatively low chance of winning.
- Better chance of getting scammed than winning, but still not a high chance.
- Displays map message for winners/scammed players.
*pokes screenshots*

Credits to Weaxer & OmgItsParm for the basis of why this was coded (aka they asked me to code it for them.) Released as Weaxer's original (which didn't work) was released, basically to give to those who wanted.
 

Attachments

You must be registered for see attachments list
Legendary Battlemage
Loyal Member
Joined
May 4, 2008
Messages
644
Reaction score
19
Re: [Release] Casino NPC v.2

You should change the V To Rev maybe because im a idiot and hard time, Kinda i just glance at things.
 
Last edited:
Newbie Spellweaver
Joined
Aug 22, 2008
Messages
6
Reaction score
0
Re: [Release] Casino NPC v.2

Dude stop putting V Whatever... That only applies for programs and applications not scripts or poop like this.

1) Not a dude.
2) One and only time I have ever released anything on RageZone.
3) Changed because let's nitpick!~ Whee.
 
Legendary Battlemage
Loyal Member
Joined
Dec 7, 2007
Messages
622
Reaction score
11
Re: [Release] Casino NPC #2

Giro what is it with and you and the V's just let it be lol and someone else released this in weaxer section they posted it there
 
Legendary Battlemage
Loyal Member
Joined
Apr 8, 2008
Messages
668
Reaction score
12
Re: [Release] Casino NPC #2

Nice kenna

Giro what is it with and you and the V's just let it be lol and someone else released this in weaxer section they posted it there

!Survival was the one that released it in "Weaxers" thread.
 
Legendary Battlemage
Loyal Member
Joined
May 4, 2008
Messages
644
Reaction score
19
Re: [Release] Casino NPC #2

Because im mentally challenged, Plus my eyes are a bit dumb.
 
Last edited:
You've got my respect!
Joined
Apr 8, 2008
Messages
508
Reaction score
147
Re: [Release] Casino NPC v.2

Dude stop putting V Whatever... That only applies for programs and applications not scripts or poop like this.
Stop spamming this in threads, cause you are horribly wrong.
Also how would it confuse people?
 
Mythic Archon
Loyal Member
Joined
Apr 10, 2008
Messages
758
Reaction score
0
Re: [Release] Casino NPC #2

This npc is useful, it's fun to have and only a complete idiot would get confused by this.
 
Newbie Spellweaver
Joined
Aug 22, 2008
Messages
6
Reaction score
0
Re: [Release] Casino NPC #2

Giro what is it with and you and the V's just let it be lol and someone else released this in weaxer section they posted it there

That was me. And then a mod deleted the whole thread for w/e reason. So Parm suggested I just release it outright. So here you are.
 
Λκαяυz føяeνeя
Loyal Member
Joined
Jun 28, 2008
Messages
1,950
Reaction score
73
Re: [Release] Casino NPC #2

This npc is useful, it's fun to have and only a complete idiot would get confused by this.

Thats exactly why im adding it.
And who ever actully does it more than once..
It'll send a notice example. my ign is Admin and i did it twice the notice will say
[GAMBLE] I Admin am a complete dumass who lost 1b for being a dumass. :)
 
Burn the land,
Loyal Member
Joined
Aug 7, 2008
Messages
1,903
Reaction score
17
Re: [Release] Casino NPC #2

!Survival - Casino NPC #2 - RaGEZONE Forums

Rofl, this NPC made me laugh, im gonna use it those :D
nice release
 
Legendary Battlemage
Loyal Member
Joined
Apr 8, 2008
Messages
668
Reaction score
12
Re: [Release] Casino NPC #2

This NPC is Ducking addicting.....

When kenna/weaxer added it on WeedStory, I was like playin around with it for like an hour.

This NPC's EPIC!
 
Supreme Arcanarch
Loyal Member
Joined
Jul 21, 2008
Messages
969
Reaction score
1
Re: [Release] Casino NPC #2

Haha. I loved this. I keep gambling lol.
 
Legendary Battlemage
Loyal Member
Joined
Dec 7, 2007
Messages
622
Reaction score
11
Re: [Release] Casino NPC #2

Yea i love this script everyones like hogging it since white scrolls cost alot lol
 
Experienced Elementalist
Joined
Apr 18, 2008
Messages
294
Reaction score
3
Re: [Release] Casino NPC #2

this is funny adding it to server :p
 
Newbie Spellweaver
Joined
Jun 1, 2008
Messages
91
Reaction score
0
Re: [Release] Casino NPC #2

Wow this is alot of fun xD Good job.
 
Junior Spellweaver
Joined
Jul 5, 2008
Messages
131
Reaction score
0
Re: [Release] Casino NPC #2

Suggestions:
Make it more player friendly

So solution:
Use icons like meso icon instead of mesos

E.g.\r\n#f[REWARD ICON DIRECTORY]#\r\n #f[MESO ICON DIRECTORY]# xxxx
where xxx is mesos earned
(I forgot where reward or meso icon was located, look it up wz)

plus add colours like #b #r #g and etc.
 
Newbie Spellweaver
Joined
Aug 22, 2008
Messages
6
Reaction score
0
Re: [Release] Casino NPC #2

Suggestions:
Make it more player friendly

So solution:
Use icons like meso icon instead of mesos

E.g.\r\n#f[REWARD ICON DIRECTORY]#\r\n #f[MESO ICON DIRECTORY]# xxxx
where xxx is mesos earned
(I forgot where reward or meso icon was located, look it up wz)

plus add colours like #b #r #g and etc.

If you want to add that, then add it. And it does use colors. If you want it to use more or different colors, then change it. lol.
 
IHF
Joined
Apr 7, 2008
Messages
312
Reaction score
0
Re: [Release] Casino NPC #2

Nice release lol btw can we make the message boardcast to the whole world instead of map ? and i dont think the scamming message appears when i have been scam o.o
 
Experienced Elementalist
Joined
Apr 18, 2008
Messages
294
Reaction score
3
Re: [Release] Casino NPC #2

@playhard ive been trying to find out just cant find it ._.
 
Back
Top