| Version 83 | 700x | 400x | 4x |


    Duncan's Coder/Dev App

    Share
    avatar
    duncandude
    Coder
    Coder

    Posts : 10
    Join date : 2010-11-10
    Age : 24
    Location : Canada

    Duncan's Coder/Dev App

    Post by duncandude on Fri Nov 19, 2010 12:48 pm

    Hey, What's up?

    Duncan here. I am thinking that i should make some sort of Application Considering i didn't make one at all. So...... Here is my fail sauce Application In A Minute.

    Name: Duncan

    Experience: I believe you already know how much experience I have but around 2 year's or so.

    Age: I am 17 year's young and still looking for that special someone.

    Example: I am not really sure what i should put here but.. i guess the NPC i already gave you should do.


    // Fixed and Improved by Duncan

    importPackage(Packages.server);

    var status = 0;

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

    function action(mode, type, selection) {

    if (mode == -1) {
    cm.dispose();
    }
    else {
    if (status >= 2 && mode == 0) {
    cm.sendOk("Goodbye");
    cm.dispose();
    return;
    }

    if (mode == 1) {
    status++;
    }
    else {
    status--;
    }

    if (status == 0) {
    if(cm.getPlayer().getDonatorPoints() >= 0) {
    cm.sendNext("I am HellyMS Donator Points Exchanger");
    } else {
    cm.sendOk("You will have to donate to use me!");
    }
    } else if (status == 1) {
    if (cm.getDonatorPoints() > 0) {
    cm.sendSimple("#e#rPlease pick what you wish to exchange. \r\nPlease choose#b\r\n#L0#10 White Scrolls + 10 Chaos Scrolls for 2 Donator points#l\r\n#L1#3 Dragon Stones For 1 Donator Point!#l\r\n#L2#999 AP + a Rebirth For 5 Donator Points!#l\r\n#L3#100 Green Tickets#l\r\n#L4#10 Donator's Gachapon Tickets! For 5 Donator Points!#l\r\n#L5#Bandanas!#l\r\n#L6#Accessories#l");
    } else {
    cm.sendOk("You have no donator points");
    cm.dispose();
    }
    } else if (status == 2) {
    if (selection == 0) {
    cm.sendSimple("Are you sure you want to do the trade?\r\n#L7#Yes#1\r\n#L8#No#1");
    } else if (selection == 1) {
    cm.sendSimple("Are you sure you want to do the trade?\r\n#L9#Yes#1\r\n#L10#No#1");
    } else if (selection == 2) {
    cm.sendOk("We are working on it");
    cm.dispose();
    } else if (selection == 3) {
    cm.sendSimple("Are you sure you want to do the trade?\r\n#L13#Yes#1\r\n#L14#No#1");
    } else if (selection == 4) {
    cm.sendSimple("Are you sure you want to do the trade?\r\n#L15#Yes#1\r\n#L16#No#1");
    } else if (selection == 5) {
    cm.sendSimple("#e#rPlease pick what you wish to exchange. \r\n#L17#Maple Bandana White\r\n + 500 All stats and 100 Weapon att!\r\nfor 10 Donator Points\r\n#L18#Maple Bandana Yellow\r\n + 1500 All stats and 250 Weapon att!\r\nfor 20 Donator Points\r\n#L19#Maple Bandana Red\r\n + 3000 All stats and 350 Weapon attack!\r\nfor 30 Donator Points\r\n#L20#Maple Bandana Blue\r\n + 5000 All stats and 500 Weapon atatck!\r\n for 40 Donator points\r\n$L21#Genesis Bandana\r\n + 10000 All stats and 750 Weapon attack!\r\n for 50 Donator points");
    } else if (selection == 6) {
    cm.sendSimple("#e#rPlease pick what you wish to have. \r\n#L22#Glitter Gloves With 750 Wep ATT + 750 Magic ATT!\r\n For 35 Donator Points!#l\r\n#L23#Goddess Wristband With 500 Wep ATT + 500 Magic ATT!\r\n For 15 Donator Points!#L24#Grey Work Gloves With 250 Wep ATT + 250 Magic ATT!\r\n For 10 Donator Points!\r\n#L25#Watermelon Icecream Bar With 3000 Wep ATT + 3000 Magic ATT!\r\n For 60 Donator Points!");
    }
    } else if (status == 3) {
    if (selection == 7) {
    if (cm.getDonatorPoints() > 1) {
    cm.setDonatorPoints(-2);
    cm.gainItem(2049100, 10);
    cm.gainItem(2340000, 10);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    }else if (selection == Cool {
    cm.sendOk("Come back soon!");
    cm.dispose();
    } else if (selection == 9) {
    if (cm.getDonatorPoints() > 0) {
    cm.setDonatorPoints(-1);
    cm.gainItem(2041200, 3);
    cm.dipose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 10) {
    cm.sendOk("Come back soon!");
    cm.dispose();
    } else if (selection == 12) {
    cm.sendOk("Come back soon!");
    cm.dispose();
    } else if (selection == 13) {
    if (cm.getDonatorPoints() > 4) {
    cm.setDonatorPoints(-5);
    cm.gainItem(4031544, 100);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 14) {
    cm.sendOk("Come back soon!");
    cm.dispose();
    } else if (selection == 15) {
    if (cm.getDonatorPoints() > 4) {
    cm.setDonatorPoints(-5);
    cm.gainItem(522020, 10);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 16) {
    cm.sendOk("Come back soon!");
    cm.dispose();
    } else if (selection == 17) {
    if (cm.getDonatorPoints() > 9) {
    cm.setDonatorPoints(-10);
    cm.gainItem(1002515, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002515, "str", 500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002515, "dex", 500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002515, "int", 500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002515, "luk", 500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002515, "watk", 100);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 18) {
    if (cm.getDonatorPoints() > 19) {
    cm.setDonatorPoints(-20);
    cm.gainItem(1002516, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "str", 1500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "dex", 1500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "int", 1500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "luk", 1500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "watk", 250);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 19) {
    if (cm.getDonatorPoints() > 29) {
    cm.setDonatorPoints(-30);
    cm.gainItem(1002517, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002517, "str", 3000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002517, "dex", 3000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002517, "int", 3000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002517, "luk", 3000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002517, "watk", 350);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 20) {
    if (cm.getDonatorPoints() > 39) {
    cm.setDonatorPoints(-40);
    cm.gainItem(1002518, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "str", 5000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "dex", 5000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "int", 5000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "luk", 5000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "watk", 500);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 21) {
    if (cm.getDonatorPoints() > 49) {
    cm.setDonatorPoints(-50);
    cm.gainItem(1002519, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "str", 10000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "dex", 10000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "int", 10000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "luk", 10000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1002516, "watk", 750);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 22) {
    if (cm.getDonatorPoints() > 34) {
    cm.setDonatorPoints(-35);
    cm.gainItem(1082230, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1082230, "watk", 750);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1082230, "matk", 750);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 23) {
    if (cm.getDonatorPoints() > 14) {
    cm.setDonatorPoints(-15);
    cm.gainItem(1082232, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1082232, "watk", 500);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1082232, "matk", 500);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 24) {
    if (cm.getDonatorPoints() > 9) {
    cm.setDonatorPoints(-10);
    cm.gainItem(1082150, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1082150, "watk", 250);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1082150, "matk", 250);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    } else if (selection == 25) {
    if (cm.getDonatorPoints() > 59) {
    cm.setDonatorPoints(-60);
    cm.gainItem(1012073, 1);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1012073, "watk", 3000);
    Packages.server.MapleInventoryManipulator.editEquipById(cm.getPlayer(), 1, 1012073, "matk", 3000);
    cm.dispose();
    } else {
    cm.sendOk("Sorry not enough donator points");
    cm.dispose();
    }
    }
    }
    }
    }


    Wish Me Luck!?!?!?!??!!!??

    Link
    Coder
    Coder

    Posts : 18
    Join date : 2010-10-22

    Re: Duncan's Coder/Dev App

    Post by Link on Fri Nov 19, 2010 8:42 pm

    Buddy, thats alot of text. You should learn arrays. Well atleast it works, I guess.
    Congratulations.

    (Yes, I'm still here, just watching)
    avatar
    Tranquility
    Moderator
    Moderator

    Posts : 37
    Join date : 2010-10-26
    Age : 23
    Location : Behind You.

    Re: Duncan's Coder/Dev App

    Post by Tranquility on Sat Nov 20, 2010 1:30 am

    Never heard about Arrays ? LOOL
    Nice job though xD
    avatar
    Alphapierce
    Newbie
    Newbie

    Posts : 14
    Join date : 2010-11-09

    Re: Duncan's Coder/Dev App

    Post by Alphapierce on Sat Nov 20, 2010 7:52 am

    Hey DunCan remember me? I am EpicCloudz!
    avatar
    duncandude
    Coder
    Coder

    Posts : 10
    Join date : 2010-11-10
    Age : 24
    Location : Canada

    Arrayz

    Post by duncandude on Sat Nov 20, 2010 8:52 am

    I personaly dont like Arrays. i always mess something up doing them so i perfer to do it long and have no error's the first time thro.

    Link
    Coder
    Coder

    Posts : 18
    Join date : 2010-10-22

    Re: Duncan's Coder/Dev App

    Post by Link on Sat Nov 20, 2010 5:48 pm

    Its still unsafe. If player doesn't have an inventory slot free he/she will not gain that item.
    Try using canHold.

    Sponsored content

    Re: Duncan's Coder/Dev App

    Post by Sponsored content


      Current date/time is Fri Nov 24, 2017 3:19 pm