[Release] Gambling NPC-Better~

Page 1 of 3 123 LastLast
Results 1 to 15 of 45
  1. #1
    RaGEZONE = FLaMEZONE thisisakevin is offline
    MemberRank
    Jul 2008 Join Date
    284Posts

    [Release] Gambling NPC-Better~

    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?


  2. #2
    Apprentice Gravay is offline
    MemberRank
    Jun 2008 Join Date
    24Posts

    Re: [Release] Gambling NPC-Better~

    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

  3. #3
    Account Upgraded | Title Enabled! shadowerr is offline
    MemberRank
    Jul 2008 Join Date
    Somewhere on earthLocation
    448Posts

    Re: [Release] Gambling NPC-Better~

    what does this do?
    Edit: something like lucky draw? allowing it the mesos u bet x 2?

  4. #4
    RaGEZONE = FLaMEZONE thisisakevin is offline
    MemberRank
    Jul 2008 Join Date
    284Posts

    Re: [Release] Gambling NPC-Better~

    Quote Originally Posted by shadowerr View Post
    what does this do?
    o_o Are you serious?
    Put in the mesos you want to gamble...
    If you win ... you gain mesos x 2
    if you lose... you lose mesos you put in

  5. #5
    Account Upgraded | Title Enabled! shadowerr is offline
    MemberRank
    Jul 2008 Join Date
    Somewhere on earthLocation
    448Posts

    Re: [Release] Gambling NPC-Better~

    thats what i guess but not sure whether issit so or not ..

  6. #6
    Apprentice Gravay is offline
    MemberRank
    Jun 2008 Join Date
    24Posts

    Re: [Release] Gambling NPC-Better~

    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.

  7. #7
    RaGEZONE = FLaMEZONE thisisakevin is offline
    MemberRank
    Jul 2008 Join Date
    284Posts

    Re: [Release] Gambling NPC-Better~

    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

  8. #8
    Apprentice Gravay is offline
    MemberRank
    Jun 2008 Join Date
    24Posts

    Re: [Release] Gambling NPC-Better~

    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.

  9. #9
    RaGEZONE = FLaMEZONE thisisakevin is offline
    MemberRank
    Jul 2008 Join Date
    284Posts

    Re: [Release] Gambling NPC-Better~

    YOU STOLE MY CURRENCY NPC :(
    That's the same type of currency my server uses =3

  10. #10
    Apprentice Gravay is offline
    MemberRank
    Jun 2008 Join Date
    24Posts

    Re: [Release] Gambling NPC-Better~

    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

  11. #11
    Account Upgraded | Title Enabled! chuayaowei is offline
    MemberRank
    Jul 2008 Join Date
    SingaporeLocation
    1,410Posts

    Re: [Release] Gambling NPC-Better~

    wth i see so many of if "this is still here ur server ownere is a leecher from ragezone!"

    LOL

  12. #12
    Omega ihatehaxor is offline
    MemberRank
    Apr 2008 Join Date
    JerseyLocation
    5,461Posts

    Re: [Release] Gambling NPC-Better~

    put some pics please

  13. #13
    Gamma Xerixe is offline
    MemberRank
    Apr 2008 Join Date
    MalaysiaLocation
    3,605Posts

    Re: [Release] Gambling NPC-Better~

    Lol.
    Nice to see which server's owner is actually noob
    Anyway nice release

  14. #14
    mikethemak is offline
    MemberRank
    Apr 2008 Join Date
    Ragezone Spam SectionLocation
    1,019Posts

    Re: [Release] Gambling NPC-Better~

    -cough- "if this is still here ur server ownere is a leecher from ragezone!" -cough-



    I just ruined your anti leech! xD

  15. #15
    Account Upgraded | Title Enabled! Shadow26 is offline
    MemberRank
    Jun 2008 Join Date
    CrimsonhoodLocation
    424Posts

    Re: [Release] Gambling NPC-Better~

    Nice job on making the win ratio fair.



Page 1 of 3 123 LastLast

Advertisement