[RELEASE]Another 2 more useless npc i guess.

Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    Valued Member yijiedevil is offline
    MemberRank
    Jul 2008 Join Date
    Singapore (:Location
    145Posts

    [RELEASE]Another 2 more useless npc i guess.

    It's just way too bored, because i only know how to script NPC. so i've editted the KIN and made a gambling npc(using golden maple leaf and win items + NX) ok waste no time.
    PHP Code:
    /*
    NX GAMBLING NPC
    EDITTED BY xia0didi-x3
    Ragezone(yijie_devil)
    */

    importPackage(net.sf.odinms.client);

    var 
    status 0;

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

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.dispose();
        } else {
            if (
    mode == 0) {
                
    cm.sendOk("Okays, i'll see you again later!");
                
    cm.dispose();
                return;
            }
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
                
    cm.sendNext("Hi! Do you want to try your luck #dGambling#k with your Golden Maple Leaf?");
            } else if (
    status == 1) {
                
    fee cm.haveItem(40003131);
                
    cm.sendYesNo("Are you sure you want to gamble with your Golden Maple Leaf?");
            } else if (
    status == 2) {
                if (
    cm.haveItem(4000313) < 1) {
                    
    cm.sendOk("You don't have the Golden Maple Leaf! Please Get One Before Coming!");
                    
    cm.dispose();
                } else {
                switch(
    Math.floor(Math.random()*20+1)) { 
                    case 
    2
                    case 
    4
                    case 
    6
                    case 
    7
                    case 
    9
                    case 
    11
                    case 
    13
                    case 
    15
                    case 
    17:
                    
    cm.gainItem(4000313, -1);
                    
    cm.sendNext("What a bad Luck! Try Again Later!");
                    
    cm.dispose();
                                break; 
            case 
    5:
            case 
    20:
                            
    cm.modifyNX(10001);
                    
    cm.gainItem(4000313, -1); 
                            
    cm.sendNext("#rCongratulations#k! You have won some prizes!"); 
                                
    cm.dispose();
                    break;
            case 
    3:
                    case 
    8:
                            
    cm.modifyNX(50001);
                    
    cm.gainItem(4000313, -1); 
                                
    cm.sendNext("#rCongratulations#k! You have won some prizes!"); 
                                
    cm.dispose();
                    break;
            case 
    1:
                    case 
    10
                    
    cm.gainItem(4000313, -1);
                                
    cm.modifyNX(250001); 
                                
    cm.sendNext("#rCongratulations#k! You have won some prizes!"); 
                                
    cm.dispose();
                    break; 
                    case 
    12
                    
    cm.gainItem(4000313, -1);
                                
    cm.modifyNX(5001); 
                                
    cm.sendNext("#rCongratulations#k! You have won some prizes!"); 
                                
    cm.dispose();
                    break; 
                    case 
    14
                    
    cm.gainItem(4000313, -1);
                                
    cm.modifyNX(100001); 
                                
    cm.sendNext("#rCongratulations#k! You have won some prizes!"); 
                                
    cm.dispose();
                    break; 
                    case 
    16
                    
    cm.gainItem(4000313, -1);
                                
    cm.gainItem(40003131); 
                                
    cm.sendNext("#rCongratulations#k! You have won some prizes!"); 
                                
    cm.dispose();
                    break; 
                    case 
    18
                    
    cm.gainItem(4000313, -1);
                                
    cm.gainItem(10025151); 
                                
    cm.sendNext("#rCongratulations#k! You have won some prizes!"); 
                                
    cm.dispose();
                    break; 
                    case 
    19
                    
    cm.gainItem(4000313, -1);
                                
    cm.gainItem(10026981); 
                                
    cm.sendNext("#rCongratulations#k! You have won some prizes!"); 
                                
    cm.dispose();
                    break;

                    }
                }
            }
        }

    And the kin script.
    PHP Code:
    /*    KIN
        HAIR , FACE , EYE , COLOR , SKIN CHANGER
        SCRIPT EDITTED BY xia0didi-x3
                         RAGEZONE yijie_devil
    */
    var status 0;
    var 
    beauty 0;
    var 
    haircolor = Array();
    var 
    skin = Array(01234);
    var 
    guyshair = Array(30040300503006030**** 30120301303014030150301603017030180301903020030210302203023030240302503026030270302803029030300303103032030330303403035030360303703040030410304203043030440304503046030470304803049030510305203053030540305503056030570305803059030600306103062030630306403065030660307003071030720307803070903080030810308203073030760);
    var 
    galshair = Array(31**** 31150311603117031180311903120031210312203123031240312503126031270312803129031300313103132031330313403135031410314203144031450314603147031480314903151031520315303154031550315603157031580315903160031610316203163031640316503167031680316903170031710317203173031740317503176031770317903180031810);
    var 
    hairnew = Array();
    var 
    guysface = Array(20000200012000220003200042000520006200072000820009200102001120012200132001420016200172001820019200202002120022200232002420026);
    var 
    galsface =Array(2100021001210022100321004210052100621007210082100921010210112101221013210142101621017210182101921020210222102421025);
    var 
    facenew = Array();
    var 
    colors = Array();

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

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.dispose();
        } else {
            if (
    mode == && status == 0) {
                
    cm.dispose();
                return;
            }
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
                
    cm.sendSimple("Hey there! \r\nNeeded some change for you #reyes#k, #ghair#k and #dskin#k? Please select your choice!:)\r\n#L0#Skin#l\r\n#L1#Guys' Hairstyles#l\r\n#L2#Gals' Hairstyles#l\r\n#L3#Hair Color#l\r\n#L4#Guys' Faces#l\r\n#L5#Gals' Faces#l\r\n#L6#Eye Color#l");
            
            } else if (
    status == 1) {
                if (
    selection == 0) {
                    
    beauty 1;
                    
    cm.sendStyle("Which skin do you prefer?"skin);
                } else if (
    selection == 1) {
                    if(
    cm.getChar().getGender() == 0) {
                    
    beauty 2;
                    
    hairnew = Array();
                    for(var 
    0guyshair.lengthi++) {
                    
    hairnew.push(guyshair[i] + parseInt(cm.getChar().getHair() % 10));
                }
                    
    cm.sendStyle("Which hair do you like?"hairnew);
                } else {
                    
    cm.sendOk("You are not a #dGuy#k! Please Choose the #rGals'#k Hairstyles!");
                }
                } else if (
    selection == 2) {
                    if(
    cm.getChar().getGender() == 1) {
                    
    beauty 3;
                    
    hairnew = Array();
                    for(var 
    0galshair.lengthi++) {
                    
    hairnew.push(galshair[i] + parseInt(cm.getChar().getHair() % 10));
                }
                    
    cm.sendStyle("Which hair do you like?"hairnew);
                } else {
                    
    cm.sendOk("You are not a #dGal#k! Please Choose the #rGuys'#k Hairstyles!");
                }
                } else if (
    selection == 3) {
                    
    beauty 4;
                    
    haircolor = Array();
                    var 
    current parseInt(cm.getChar().getHair()/10)*10;
                    for(var 
    08i++) {
                        
    haircolor.push(current i);
                    }
                    
    cm.sendStyle("Which hair colour suits you the most?"haircolor);
                } else if (
    selection == 4) {
                    if(
    cm.getChar().getGender() == 0) {
                    
    beauty 5;
                    
    facenew = Array();
                    for(var 
    0guysface.lengthi++) {
                        
    facenew.push(guysface[i] + cm.getChar().getFace() % 1000 - (cm.getChar().getFace() % 100));
                    }
                    
    cm.sendStyle("Which face do you like it?"facenew);
                } else {
                    
    cm.sendOk("You are not a #dGuy#k! Please Choose the #rGals'#k Faces!");
                }
                } else if (
    selection == 5) {
                    if(
    cm.getChar().getGender() == 1) {
                    
    beauty 6;
                    
    facenew = Array();
                    for(var 
    0galsface.lengthi++) {
                        
    facenew.push(galsface[i] + cm.getChar().getFace() % 1000 - (cm.getChar().getFace() % 100));
                    }
                    
    cm.sendStyle("Which face do you like it?"facenew);
                } else {
                    
    cm.sendOk("You are not a #dGal#k! Please Choose the #rGuys'#k Faces!");
                }
                } else if (
    selection == 6) {
                    
    beauty 7;
                    var 
    current cm.getChar().getFace() % 100 20000;
                    
    colors = Array();
                    
    colors = Array(current current + **** current 200current 300current +400current 500current 600current 700current 800);
                    
    cm.sendStyle("Which eye colour do you like?"colors);
                }
            }
            else if (
    status == 2){
                
    cm.dispose();
                if (
    beauty == 1){
                    
    cm.setSkin(skin[selection]);
                }
                if (
    beauty == 2){
                    
    cm.setHair(hairnew[selection]);
                }
                if (
    beauty == 3){
                    
    cm.setHair(hairnew[selection]);
                }
                if (
    beauty == 4){
                    
    cm.setHair(haircolor[selection]);
                }
                if (
    beauty == 5){
                    
    cm.setFace(facenew[selection]);
                }
                if (
    beauty == 6){
                    
    cm.setFace(facenew[selection]);
                }
                if (
    beauty == 7){
                    
    cm.setFace(colors[selection]);
                }
            }
        }

    what all this kin does is just checking gender for female and male. no f-king homos now... (:
    Enjoy


    Editted : Credits to thisisakevin for the gambling script, but i just re-editted it :D
    Editted : Changed the whole Gambling NPC script, to make it shorter and easily read. Thanks MrMysterious for teaching. (: Well i've changed the winning chances rate higher (: Enjoy!
    Last edited by yijiedevil; 09-01-09 at 01:05 PM.


  2. #2
    Account Upgraded | Title Enabled! Shoot is offline
    MemberRank
    Jan 2009 Join Date
    417Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    how much you want to bet someone will come here and tell you that you can make teh code shorter.


    btw nice release

  3. #3
    Enthusiast iiPoke is offline
    MemberRank
    Dec 2008 Join Date
    In my serverLocation
    41Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    Nice :)

  4. #4
    Account Upgraded | Title Enabled! AzuS is offline
    MemberRank
    Jul 2008 Join Date
    871Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    ><! Looks like another script from someplace and replaced with different words xP!

  5. #5
    Account Upgraded | Title Enabled! zzlawlzz is offline
    MemberRank
    Oct 2008 Join Date
    401Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    make the code shorter is llllloooonnnnggggg (not say i can code)
    my head hurt from reading it

  6. #6
    Valued Member yijiedevil is offline
    MemberRank
    Jul 2008 Join Date
    Singapore (:Location
    145Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    i just used the npc script in those repacks and then edit them :P so, credits can be given for the REPACK right? [: Hahas.

  7. #7
    Mother effin' clouds SaintsIan is offline
    MemberRank
    Apr 2008 Join Date
    fyrechat.netLocation
    2,809Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    Lol your gambling NPC looks like one released with 4 chances except you increased it to 20 :O

  8. #8
    Valued Member yijiedevil is offline
    MemberRank
    Jul 2008 Join Date
    Singapore (:Location
    145Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    LOLOL, i'm a BEGINNER for scripting omg ! ;P teach me then . how to make it shorter
    edits : oh ya the gambling NPC ' i forget whose was it. x.x ' brb let me find that thread out

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

    Re: [RELEASE]Another 2 more useless npc i guess.

    PHP Code:
    /*
    NX GAMBLING NPC
    EDITTED BY xia0didi-x3
    Ragezone(yijie_devil)
    */

    var status;

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

    function 
    action(MadebyMrMysterious) {
        if (
    mode == 1)
            
    status++;
        else {
            if (
    mode == 0)
                
    cm.sendOk("Okays, i'll see you again later!");
                
    cm.dispose();
                return;
        }
        
        if (
    status == 0)
            
    cm.sendNext("Hi! Do you want to try your luck #dGambling#k with your Golden Maple Leaf?");
        else if (
    status == 1)
            
    cm.sendYesNo("Are you sure you want to gamble with your Golden Maple Leaf?");
        else if (
    status == 2)
            if (!
    cm.haveItem(4000313))
                
    cm.sendOk("You don't have the Golden Maple Leaf! Please Get One Before Coming!");
            else {
                switch (
    Math.floor(Math.random()*20+1)) {
                    case 
    1:
                    case 
    2:
                    case 
    3:
                    case 
    4:
                    case 
    6:
                    case 
    7:
                    case 
    9:
                    case 
    11:
                    case 
    13:
                    case 
    15:
                    case 
    17:
                    case 
    20:
                        
    cm.sendNext("What a bad Luck! Try Again Later!");
                        break;
                    case 
    5:
                        
    cm.modifyNX(10001);
                        
    cm.sendNext("#rCongratulations#k! You have won some prizes!");
                        break;
                    case 
    8:
                        
    cm.modifyNX(50001);
                        
    cm.sendNext("#rCongratulations#k! You have won some prizes!");
                        break;
                    case 
    10:
                        
    cm.modifyNX(250001);
                        
    cm.sendNext("#rCongratulations#k! You have won some prizes!");
                        break;
                    case 
    12:
                        
    cm.modifyNX(5001);
                        
    cm.sendNext("#rCongratulations#k! You have won some prizes!");
                        break;
                    case 
    14:
                        
    cm.modifyNX(100001);
                        
    cm.sendNext("#rCongratulations#k! You have won some prizes!");
                        break;
                    case 
    16:
                        
    cm.gainItem(40003131);
                        
    cm.sendNext("#rCongratulations#k! You have won some prizes!");
                        break;
                    case 
    18:
                        
    cm.gainItem(10025151);
                        
    cm.sendNext("#rCongratulations#k! You have won some prizes!");
                        break;
                    case 
    19:
                        
    cm.gainItem(10026981);
                        
    cm.sendNext("#rCongratulations#k! You have won some prizes!");
                        break;
                    default:
                        
    cm.sendNext("error error error :)");
                }
                            
    cm.gainItem(4000313, -1); 
                
    cm.dispose();
            }
        } 

  10. #10
    Valued Member yijiedevil is offline
    MemberRank
    Jul 2008 Join Date
    Singapore (:Location
    145Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    switch the math.floor to case ? (: okays thanks MrMysterious, will try it for the next npc :D

  11. #11
    Novice ScreamoMosh is offline
    MemberRank
    Jan 2009 Join Date
    3Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    How do you put thsese NPC's in!!!

  12. #12
    Account Upgraded | Title Enabled! maplepuppet is offline
    MemberRank
    Nov 2008 Join Date
    New JerseyLocation
    905Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    Quote Originally Posted by SaintsIan View Post
    Lol your gambling NPC looks like one released with 4 chances except you increased it to 20 :O
    And he made it Golden Leaves instead, if you'd have looked closer.

  13. #13
    Valued Member yijiedevil is offline
    MemberRank
    Jul 2008 Join Date
    Singapore (:Location
    145Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    How do you put thsese NPC's in!!!
    Copy paste it into repack>scripts>npc then find your npc id and edit and paste it in.

    Quote: Originally Posted by SaintsIan
    Lol your gambling NPC looks like one released with 4 chances except you increased it to 20 :O
    And he made it Golden Leaves instead, if you'd have looked closer
    Yeah i changed it to Golden Maple Leaves & lremove the cm.getText <<< using Maple Golden Leaves will make the whole gambling fail lololol

  14. #14
    Enthusiast 텐시유메# is offline
    MemberRank
    Jan 2009 Join Date
    Beer MountainLocation
    25Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    yep. useless.

  15. #15
    Account Upgraded | Title Enabled! maplesaif is offline
    MemberRank
    Jun 2008 Join Date
    Uae-DubaiLocation
    539Posts

    Re: [RELEASE]Another 2 more useless npc i guess.

    where can get maple leaf drops for all maple monster!?



Page 1 of 2 12 LastLast

Advertisement