Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] Custom Mini-Jobs/Crazy Claw Machine

Status
Not open for further replies.
Joined
Apr 12, 2008
Messages
997
Reaction score
612
A Brief, description...

I will re-add the mini jobs when they are fixed up a bit

Fisherman: You must have a fishing pole, you can place it in a custom shop (I sugest the weapon shop in Lith) and then talk to Vikin, he will teleport you to the custom map full of fish, your users then kill the fishies and collect treasure chests at a certain rate, once your player has 100 of them, he can turn it in for scrolls

Policeman: Same Concept of Fisherman, except the players kill "Goon" looking guys for Bronze Meso bags (i think thats what it was) and recives scrolls for Claw/Dagger Attack 30%

Butcher: Same as the Policeman, except in Henesys and you kill cows and chickens for the king of maple, you get 30% bow/xbow scrolls.

These are all to spice up the server and to create less "Grinding" on lowish rate servers such as mine.

Download: Wait till i fix some stuff

Ok, now for the claw machine.
A good friend of mine Zedd worked on this claw machine for ImagineMS, but since he got Nexon'ed he said that i can claim i guess "Rights" to it.

Anyways, i encourge all of you who feel that their server will become less "Unique" release some npcs or custom coding, because im pretty sure thats what OdinMS was all about.

Its pretty self Explanatory....
PHP:
/*
    Claw Machine
    Designed as Zeds Roulette Box for prizes
    NPC ID: 9201067
    Location: Wherever Zed Spawns It
*/

/* Takes Item:
    4031325 - Secret Coca-Cola Liquid
*/

/* Current Item List: 
    Stormcaster Gloves, Sirius Cape, Pink Adventuerer Cape, Purple Adventurer Cape, Black Strap Shoes, Violet Snowshoes, Facestompers, Crystal Illbi,
    Onyx Apple, Bosshunter Greaves, Bosshunter Boots, Bosshunter Helm, Bosshunter Faceguard, Bosshunter Gi,
    Bosshunter Armor, Infinity Circlet, Crystal Leaf Earrings, Gachapon Ticket. Lord Pirate's Hat, Spiegelmann Necklace, Mark of the Beta, Astral Blade,
    Cosmic Scepter, Crescent Moon, Heavenly Messenger, Celestial Staff, Andromeda Bow, Void Hunter, Black Hole, Nebula Dagger, Black Phoenix Shield, Dark Shard Earrings,
    Zeta Cape, Antellion Miter, Neva, Tiger's Fang, Winkel, Sword Earrings, Shield Earrings, Admin's Congrats, Cokeplay Shield, Versalmas Hat, Maplemas Hat
*/

var allitems = Array(1082223, 1102145, 1102041, 1102042, 1072262, 1072238, 1072344, 2070016, 2022179,
                        1072342, 1072345, 1072343, 1072346, 1002739, 1002750, 1052149, 1052152, 1052148, 1052151, 1002676,
                        1032048, 5220000, 1002571, 1002572, 1002573, 1002574, 1122007, 1002419, 1302079, 1322059, 1442060,
                        1382053, 1452052, 1462046, 1472062, 1332064, 1332065, 1092052, 1032049, 1102146, 1002675, 1472064,
                        1402045, 1452053, 1032030, 1032031, 2022118, 1092035, 1002716, 1002717, 5000030, 1092042, 2022123);

var selitems = Array();

// The ItemID of the item needed to get a prize 
var prizeItem = 5220020; 

var status = 0;

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


function action(mode, type, selection) {
    
    if(mode <= 0) {
        cm.dispose();
    } else {
    
        if(mode == 1)
            status++;
        else
            status--;
        
        
        if(status == 0) {                // Introduction
            //cm.sendNext("Welcome to the roulette wheel. Here you will be given a random selection of prizes with the chance at winning one of them. If you do not like the selection you can always click #rEnd Chat#k and click me again for a new selection of prizes.\r\n\r\nTo use me you must first obtain a\r\n#v " + prizeItem + "# #d#t" + prizeItem + "##k from a boss"); 
            cm.sendNext("#e[#n#dAs you are progressing down your current path you catch a glimpse of what would appear to be an odd machine. The machine consists of many levers and gears and you wonder what its purpose could be. To the left of the machine you notice a sign.#k#e]#n");
        
        } else if(status == 1) {        // Rules of the machine
            status = 2;
            cm.sendNext("#e[#n#dThe sign is old and worn by the weather, however you are able to make out what it says quite clearly.#k#e]#n.\r\n\r\n#eThe Sign Reads#n\r\n#e#bClaw Machine#k#n\r\n#rUsage#k - To use this machine you must be in the posession of a #r#t" + prizeItem + "##k. They can be obtained through boss drops or as prizes from GMs.\r\n\r\n#rRules#k - This machine will show you six items that are randomly selected from its item compartment. These items are potential items that you can win as a prize.  You will only win one item from the machine at a time. Once you place the #r#t" + prizeItem + "##k into the machine, the machine will select your prize. If you do not like the potential prize choices you can always press \"#eEnd Chat#n\" and get a new random selection of items.\r\n\r\n#eRequired:#n #v" + prizeItem + "##r#t" + prizeItem + "##k (x1)");
        
        } else if(status == 3) {        // Item Display
            var output = "";
            
            for(i = 0; i < selitems.length; i++) {
                if(i % 2 == 0) 
                    output += "\t#v" + selitems[i] + "#\t#k#z" + selitems[i] + "##k\r\n";
                else
                    output += "\t#v" + selitems[i] + "#\t#b#z" + selitems[i] + "##k\r\n";
            }
        
            cm.sendYesNo("#e[#n#dYou press your face up to the glass and peer inside the machine. Six items are displayed in front of you, tantalizing you with their prescense.#k#e]#n\r\n\r\n#eItem Selection#n\r\n" + output + "\r\nWould you like to give it a shot to win one of the displayed items?");
        
        } else if(status == 4) {        // Item Check (prizeItem)
            
            if(!cm.haveItem(prizeItem)) {
                status = 20;
                cm.sendOk("#e[#n#dYou reach into your pocket but alas realize that you do not have a #t" + prizeItem + "# to spare. Your face slumps off the machine as you turn in despair. The items have eluded you this time, but perhaps a brighter future awaits you.#k#e]#n");
            } else {
                cm.sendNext("#e[#n#dYou reach into your pocket and emerge your hand with a #t" + prizeItem + "# for the machine. You place it into the machine and in an instant a flash of light blinds you. You face jerks away from the machine only to be left with the sounds of gears clanking and whirring inside the machine...#k#e]#n");
            }
        
        } else if(status == 5) {
            var reward = selitems[Math.floor(Math.random() * selitems.length)];
            cm.gainItem(prizeItem, -1);
            cm.gainItem(reward, 1);
            cm.sendNext("#e[#n#dThe noise of the machine has stopped as your vision starts to come back into a soft focus. You notice a small door on the machine has opened up with a small object glimmering inside of it. You reach your hand inside the small door...#k#e]#n\r\n\r\n#eYou have gained a #b#t" + reward + "##k.");
            
        } else {
            cm.dispose();
        }
    
    }
}



/* Populates the selected items array with six unique items from the allitems array */
function getItems() {
        
    while(selitems.length < 6) {
        var item = allitems[Math.floor(Math.random() * allitems.length)];
        
        if(!hasItem(item)) {
            selitems.push(item);
        }
    }
}

function listItems() {

    var em = cm.getEventManager("SlimeRush");
    
    for(i = 0; i < selitems.length; i++) {
        em.getChannelServer().broadcastPacket( 
                net.sf.odinms.tools.MaplePacketCreator.serverNotice(6, "[ Debuggin Something] " + selitems[i]));
    }

}


/* Determines if an item already exists in the selected items array */
function hasItem(id) {

    for(i = 0; i < selitems.length; i++) {
        if(selitems[i] == id)
            return true;
    }
    
    return false;
}

If anyone wishes to reach me for help or anything, go to irc.euirc.net, im always in #odin-source along with Zedd, Rob (The guy who made player shops), and Matttthhhhhias.

I will continue adding custom npcs/jobs/php scripts here.
Enjoy
 
Last edited:
Experienced Elementalist
Joined
Aug 29, 2008
Messages
204
Reaction score
0
Thanks for contributing.This is like a mini Gachapon by looking at the script.
Too bad I won't get to test it >.>
 
Last edited:
Legendary Battlemage
Joined
May 23, 2008
Messages
628
Reaction score
4
I still don't really understand the mini-jobs lol... Anyways nice job :p
 
Newbie Spellweaver
Joined
Mar 13, 2007
Messages
45
Reaction score
0
holy poop sounds sickk. sorry cant test yet. need to re-inject all my sqls. o.o my database got fregged up nicely. will test thou. btw, just inject and rdy to go?
 
Supreme Arcanarch
Loyal Member
Joined
Jul 21, 2008
Messages
969
Reaction score
1
ahhs. I cannot get the claw machine to work. Nothing happens when i click
 
Newbie Spellweaver
Joined
Aug 7, 2008
Messages
28
Reaction score
0
hey since u r really good with codes can u help me with a project?
my chatbox
thx
 
Newbie Spellweaver
Joined
Mar 13, 2007
Messages
45
Reaction score
0
Basically, you might need to change the drops on the mobs to make them drop the special items

so what ur saying i have to go into every monster thingy and change or just drop ur xmls into da mob.wz? and btw. will they affect other mob drops?
 
Status
Not open for further replies.
Back
Top