[Release] Gamble Ice Tear NPC

Results 1 to 8 of 8
  1. #1
    Account Upgraded | Title Enabled! maplepuppet is offline
    MemberRank
    Nov 2008 Join Date
    New JerseyLocation
    905Posts

    [Release] Gamble Ice Tear NPC

    Ok so I use a Ice Tear event system and I made this npc. You can change the item they gamble to whatever you want, I really don't care. Here's the NPC.

    PHP Code:
    var status = -1;
    var 
    chance Math.floor(Math.random()*4+1);

    function 
    start() 

        
    status = -1
        
    action(100); 
    }

    function 
    action(modetypeselection) { 
        if (
    mode == 1
        
    status++; 
        else
        
    status--;
        if (
    status == -1) {
               
    cm.dispose();
                } else if (
    status == 0) {
                
    cm.sendYesNo("Would you like to gamble a #rIce Tear#k? #bDo not try to Gamble without an #rIce Tear#b or your character will become stuck. If this happens you need to type @dispose to unstick your character#k.");
            } else if (
    status == 1) {
                 if(
    cm.haveItem(4000415)) {
                    if (
    chance <= 1) {
                        
    cm.gainItem(4000415, -1);
                        
    cm.sendNext("#bTough luck... Maybe next time you will win! ");
                        
    cm.dispose();
                    }
                    else if (
    chance == 2) {
                        
    cm.gainItem(4000415, -1);
                        
    cm.sendNext("#bTough luck... Maybe next time you will win! ");
                        
    cm.dispose();
                    }
                    else if (
    chance == 3) {
                        
    cm.gainItem(4000415, -1);
                        
    cm.sendNext("#bTough luck... Maybe next time you will win! ");
                        
    cm.dispose();
                    }
                    else if (
    chance >= 4) {
                        
    cm.gainItem(40004151);
                        
    cm.sendNext("#rGood Job! You won!");
                        
    cm.dispose();
                } else {
                    
    cm.sendNext("You don't have an #rIce Tear#k");
                    
    cm.dispose();
                    }
                    
    cm.dispose();
                }
            }    
        } 
    FLAMES SHIELD OFF


  2. #2
    I can't leave this place RaptorJesus is offline
    MemberRank
    Apr 2008 Join Date
    1,923Posts

    Re: [Release] Gamble Ice Tear NPC

    Good release i guess.
    No one can match my gambling npc though ;-)

  3. #3
    Infraction Banned MrMysterious is offline
    MemberRank
    Dec 2008 Join Date
    In a treeLocation
    752Posts

    Re: [Release] Gamble Ice Tear NPC

    Both yours && Raptors scripts are terrible.
    Good job on this anyway

  4. #4
    Account Upgraded | Title Enabled! Shinykirby is offline
    MemberRank
    Apr 2008 Join Date
    297Posts

    Re: [Release] Gamble Ice Tear NPC

    -----
    Last edited by Shinykirby; 21-08-09 at 11:07 PM.

  5. #5
    I can't leave this place RaptorJesus is offline
    MemberRank
    Apr 2008 Join Date
    1,923Posts

    Re: [Release] Gamble Ice Tear NPC

    Quote Originally Posted by MrMysterious View Post
    Both yours && Raptors scripts are terrible.
    Good job on this anyway
    Oo, tough guy.
    Im not talking about the one i released =D

  6. #6
    Alpha Member Moogra is offline
    MemberRank
    Jul 2008 Join Date
    1,804Posts

    Re: [Release] Gamble Ice Tear NPC

    PHP Code:
    function start() { 
        
    cm.sendYesNo("Would you like to gamble a #rIce Tear#k?.");
    }

    function 
    action(modetypeselection) { 
        if (
    mode == 1) {
            if(
    cm.haveItem(4000415)) {
                if (
    Math.floor(Math.random()*4+1) == 4) {
                    
    cm.gainItem(40004151);
                    
    cm.sendOk("Good Job! You won!");
                } else {
                    
    cm.gainItem(4000415, -1);
                    
    cm.sendOk("Tough luck... Maybe next time you will win!");
                }
            } else
                
    cm.sendOk("You don't have an #rIce Tear#k");
        }
        
    cm.dispose();

    SHORTENED!

  7. #7
    warp(california, "home"); LameJacob is offline
    MemberRank
    Sep 2008 Join Date
    CaliforniaLocation
    537Posts

    Re: [Release] Gamble Ice Tear NPC

    Quote Originally Posted by Moogra View Post
    PHP Code:
    function start() { 
        
    cm.sendYesNo("Would you like to gamble a #rIce Tear#k?.");
    }

    function 
    action(modetypeselection) { 
        if (
    mode == 1) {
            if(
    cm.haveItem(4000415)) {
                if (
    Math.floor(Math.random()*4+1) == 4) {
                    
    cm.gainItem(40004151);
                    
    cm.sendOk("Good Job! You won!");
                } else {
                    
    cm.gainItem(4000415, -1);
                    
    cm.sendOk("Tough luck... Maybe next time you will win!");
                }
            } else
                
    cm.sendOk("You don't have an #rIce Tear#k");
        }
        
    cm.dispose();

    SHORTENED!
    Owned!~

  8. #8
    Alpha Member Moogra is offline
    MemberRank
    Jul 2008 Join Date
    1,804Posts

    Re: [Release] Gamble Ice Tear NPC

    Not really owned. That wasn't the purpose.



Advertisement