[Add-on] Chair Trader

Results 1 to 12 of 12
  1. #1
    Alpha Member Soulfist is offline
    Alpha MaleRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    [Add-on] Chair Trader


    RaGEZONE Recommends

    RaGEZONE Recommends

    Alright, this is a very simple simple release. You can edit the chair id's however you wish.

    PHP Code:
    /****************************************\
    *    Made by Soulfist for DominoStory    *
    \****************************************/

    chairs = [301000030100013010002301000330100043010005301000630100073010008,
    3010009301001030100113010012301001330100143010015301001630100173010018,
    3010019301002030100213010022301002330100243010025301002630100273010028,
    3010029301003030100313010032301003330100343010035301003630100373010038,
    3010039301004030100413010042301004330100443010045301004630100473010048,
    30100493010050];

    function 
    start() {
    var 
    talk "Welcome to DominoStory #g#h ##k, I sell chairs for\r\n 5 #i4030002#. Would you like to buy one?";
    for(var 
    0chairs.lengthi++) {
    talk += "\r\n#L"+"##i"+chairs[i]+"##l";
    cm.sendSimple(talk);
    }

    function 
    action(mts) {
    if (
    1) {
      
    cm.dispose();
        return;
        } else {
     
    status++;
    }
    if (
    status == 1) {
    if (
    cm.haveItem(40300025) {
    cm.sendOk("Enjoy your new #rChair#k!");
    cm.gainItem(chairs[s], 1);
    cm.gainItem(4030002, -5);
    cm.dispose();
    } else {
    cm.sendOk("You do not have enough #i4030002#");
    cm.dispose();
        }
      }

    Side Note: DominoStory, ignore that. its a server I do some side scripting for ;) .

    Also let me know if there are any errorz
    Last edited by Soulfist; 03-03-11 at 08:33 AM.


  2. #2
    Account Upgraded | Title Enabled! Sharky is offline
    True MemberRank
    Dec 2010 Join Date
    Ur Mom's Pants.Location
    927Posts

    Re: [Add-on] Chair Trader

    I already told you there were numerous errors, but you chose to only fix ONE error I told you about, and went to sleep -_- God help you.

  3. #3
    Account Upgraded | Title Enabled! NemesisToKill is offline
    True MemberRank
    Nov 2009 Join Date
    874Posts

    Re: [Add-on] Chair Trader

    This is your script a bit cleaner, and fixed.
    Btw, unless you're using wz edits this NPC will d/c as many ids within the range of 3010000 - 3010050 don't exist.

    PHP Code:
    /****************************************\
    *    Made by Soulfist for DominoStory    *
    \****************************************/

    chairs = Array();
    for (var 
    3010000;  3010051i++) {
        
    chairs.push(i);
    }

    function 
    start() {
        var 
    talk "Welcome to DominoStory #g#h ##k, I sell chairs for\r\n 5 #i4030002#. Would you like to buy one?";
        for(var 
    0chairs.lengthi++) 
            
    talk += "\r\n#L""##i"+chairs[i]+"##l";
        
    cm.sendSimple(talk);
    }

    function 
    action(mts) {
        
    cm.dispose();
        if (
    1) {
            return;
        }
        if (
    cm.haveItem(40300025)) {
            
    cm.sendOk("Enjoy your new #e#b#t"chairs[s] + "##k#n!");
            
    cm.gainItem(chairs[s], 1);
            
    cm.gainItem(4030002, -5);
        } else {
            
    cm.sendOk("You do not have enough #i4030002#");
        }


  4. #4
    Alpha Member XxОsirisxX is offline
    Alpha MaleRank
    Aug 2009 Join Date
    2,730Posts

    Re: [Add-on] Chair Trader

    Ohh the old Soulfist, releasing untested and not working stuff.

    You surely love to break the rules. Also, this have more than 3 errors. Not to mention that if I'm not wrong, most of those chairs id's not even exist.

    PHP Code:
    function start() {
        var 
    talk "Welcome to DominoStory #g#h ##k, I sell chairs for\r\n 5 #i4030002#. Would you like to buy one?";
        for(var 
    30100003010051talk += "\r\n#L" "##i" "##l\r\n"i++);
        
    cm.sendSimple(talk);
    }

    function 
    action(modetypeselection) {
        
    cm.dispose();
        if (
    mode 0)
            if (
    cm.haveItem(40300025)) {
                
    cm.sendOk("Enjoy your new #rChair#k!");
                
    cm.gainItem(selection1);
                
    cm.gainItem(4030002, -5);
            } else
                
    cm.sendOk("You do not have enough #i4030002#");


  5. #5
    Account Inactive Splizes is offline
    InactiveRank
    Feb 2011 Join Date
    27Posts

    Re: [Add-on] Chair Trader

    They also even go past 50 even though there are holes in between the chair's ids. For example:
    PHP Code:
      <imgdir name="3012011">
        <
    string name="name" value="Chocolate Fondue Chair" />
        <
    string name="desc" value="Yummy! Use this chair next to someone else who's also using it, and a mouth-watering chocolate fondue appears. Smack your lips and dream about treats as you recover 50 HP every 10 seconds. " />
      </
    imgdir

  6. #6
    Account Inactive xiiaoren92 is offline
    InactiveRank
    Dec 2010 Join Date
    316Posts

    Re: [Add-on] Chair Trader

    What version of this?

  7. #7
    Account Upgraded | Title Enabled! Choobed is offline
    True MemberRank
    Jul 2008 Join Date
    AustraliaLocation
    387Posts

    Re: [Add-on] Chair Trader

    Quote Originally Posted by xiiaoren92 View Post
    What version of this?
    I think it goes up to v.0.83, without the WZ edits.

    Quote Originally Posted by XxОsirisxX View Post
    Ohh the old Soulfist, releasing untested and not working stuff.

    You surely love to break the rules. Also, this have more than 3 errors. Not to mention that if I'm not wrong, most of those chairs id's not even exist.

    PHP Code:
    function start() {
        var 
    talk "Welcome to DominoStory #g#h ##k, I sell chairs for\r\n 5 #i4030002#. Would you like to buy one?";
        for(var 
    30100003010051talk += "\r\n#L" "##i" "##l\r\n"i++);
        
    cm.sendSimple(talk);
    }

    function 
    action(modetypeselection) {
        
    cm.dispose();
        if (
    mode 0)
            if (
    cm.haveItem(40300025)) {
                
    cm.sendOk("Enjoy your new #rChair#k!");
                
    cm.gainItem(selection1);
                
    cm.gainItem(4030002, -5);
            } else
                
    cm.sendOk("You do not have enough #i4030002#");

    You are a legend, Osiris.

  8. #8
    Alpha Member Soulfist is offline
    Alpha MaleRank
    Dec 2010 Join Date
    a hovelLocation
    1,835Posts

    Re: [Add-on] Chair Trader

    The chair ids wouldnt work, I already knew that some of the id's were non-existent. But some servers have some chairs that others dont and vica versa. Although I was lazy in fixing the errors and I did learn from Nemesis and Osiris's script. So thats good for me ;)

  9. #9
    Alpha Member XxОsirisxX is offline
    Alpha MaleRank
    Aug 2009 Join Date
    2,730Posts

    Re: [Add-on] Chair Trader

    Quote Originally Posted by Soulfist View Post
    The chair ids wouldnt work, I already knew that some of the id's were non-existent. But some servers have some chairs that others dont and vica versa. Although I was lazy in fixing the errors and I did learn from Nemesis and Osiris's script. So thats good for me ;)
    Nonexistent ID = Disconnection.

  10. #10
    Account Inactive lFatelHighDef is offline
    InactiveRank
    Feb 2011 Join Date
    330Posts

    Re: [Add-on] Chair Trader

    Spoiler:
    PHP Code:
                    var chairs = [4000313]; // for sake of different versions, input the IDs of the chairs you wish to sell HERE
            
    var name = ["Server Name"]; // input your server name here
            
    var item 4000313// the item you wish to take from the player
     
        
    function start() { 
            var 
    txt "Welcome to "+name+" #d#h ##k. I sell chairs for\r\n 5 #i"+item+"#. Please choose from the following list if you wish to buy one."
            for(var 
    0chairs.lengthi++) 
            
    txt += "\r\n#L" "##i" chairs[i] + "# - [ 5 #i"+item+"# ]#l";
            
    cm.sendSimple(txt);
        } 
        function 
    action(mts) { 
            if (
    1) { 
                
    cm.dispose(); 
                return; 
            } else { 
                
    status++; 
            } 
            if (
    status == 1) { 
            if (
    cm.haveItem(item5) { 
                
    cm.sendOk("Enjoy your new #i"+chairs[s]+"#!"); 
                
    cm.gainItem(chairs[s], 1); 
                
    cm.gainItem(item, -5); 
                
    cm.dispose(); 
            } else { 
                
    cm.sendOk("You do not have enough #i"+item+"#"); 
                
    cm.dispose(); 
            } 
        } 

    Idk It may work haha.
    Last edited by lFatelHighDef; 04-03-11 at 04:15 AM.

  11. #11
    Account Inactive FleshLight is offline
    InactiveRank
    Aug 2010 Join Date
    16Posts

    Re: [Add-on] Chair Trader

    What Version Is This For?, will it not work if it has ids of chairs from high versions?

  12. #12
    Account Inactive yorsforever is offline
    InactiveRank
    Dec 2010 Join Date
    at OctoLocation
    116Posts

    Re: [Add-on] Chair Trader

    Ah nice release ,
    It worked
    Keep on dude




Advertisement