Random Scroll NPC

Results 1 to 11 of 11
  1. #1
    Apprentice Deejai is offline
    MemberRank
    Nov 2009 Join Date
    10Posts

    Random Scroll NPC

    Here's a script I made, similar to Gacha, it gives out a random scroll from the list in exchange for an item. Replace 4031013 with your own item id and replace or add to any of the preset scrolls in the list. Use on any NPC. Im not a pro so don't complain saying "oh wow this is easy" or "this has been already made" etc., I just thought I'd share this script if anyone was looking for something similar. It IS tested and does work.

    PHP Code:
    /*
        This file is part of the OdinMS Maple Story Server
        Copyright (C) 2008 Patrick Huy <patrick.huy@frz.cc> 
                           Matthias Butz <matze@odinms.de>
                           Jan Christian Meyer <vimes@odinms.de>

        This program is free software: you can redistribute it and/or modify
        it under the terms of the GNU Affero General Public License version 3
        as published by the Free Software Foundation. You may not use, modify
        or distribute this program under any other version of the
        GNU Affero General Public License.

        This program is distributed in the hope that it will be useful,
        but WITHOUT ANY WARRANTY; without even the implied warranty of
        MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
        GNU Affero General Public License for more details.

        You should have received a copy of the GNU Affero General Public License
        along with this program.  If not, see <http://www.gnu.org/licenses/>.
    */

    scroll = ["2044700""2044701""2044702""2340000""2049100""2041016""2040317""2043301""2041022""2041004""2040516""2040513""2043001""2040701""2043701""2041021""2040300""2040207""2040818""2040024""2040515""2040817""2040804"]
    var 
    status 0;
    var 
    scrolling scroll[Math.floor(Math.random()*scroll.length)]


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

    function 
    action(modetypeselection) {
        if (
    mode == -1) {
            
    cm.dispose();
        } else {
            if (
    status >= && mode == 0) {
                
    cm.sendOk("Alright, see you next time.");
                
    cm.dispose();
                return;
            }
            if (
    mode == 1)
                
    status++;
            else
                
    status--;
            if (
    status == 0) {
                
    cm.sendNext("I am Gordon the Scrollmaker.");
            } else if (
    status == 1) {
                if (
    cm.haveItem(4031013)) {
                    
    cm.sendYesNo("I can make you a random scroll for #b1#k Marble. Would you like to try your luck?");
                } else {
                    
    cm.sendOk("You do not have enough Marbles.")
                    
    cm.dispose();
                }
            } else if (
    status == 2) {
                
    cm.gainItem(scrolling1);
                
    cm.gainItem(4031013, -1);
                
    cm.dispose();
            }
        }

    Last edited by Deejai; 03-11-09 at 08:54 PM.


  2. #2
    NO PLEASE I CAN'T ShEtY is offline
    MemberRank
    Sep 2009 Join Date
    398Posts

    Re: Random Scroll NPC

    Hmm, not much of a variety of scrolls there.
    But it works, that's good. Good job.

  3. #3
    Kaotic Owner resinate is offline
    MemberRank
    Oct 2005 Join Date
    no mans landLocation
    2,376Posts

    Re: Random Scroll NPC

    thanks for amazing system, using this on my events LOL

  4. #4
    Thanks. Be sure to edit:
    Quote Originally Posted by Deejai View Post
    Im not a pro so don't complain saying "this has been already made" etc.,
    Proness has nothing to do with
    "this has been already made"
    Posted via Mobile Device

  5. #5
    offonline King Grub is offline
    MemberRank
    Aug 2009 Join Date
    Spring fieldLocation
    3,303Posts

    Re: Random Scroll NPC

    Quote Originally Posted by HenesysFag! View Post
    Thanks. Be sure to edit:
    Proness has nothing to do with
    "this has been already made"
    Posted via Mobile Device
    Whats ''#Proness#'' about then? I mean your such a pro dude. Tell us your secrets.

  6. #6

    Re: Random Scroll NPC

    Quote Originally Posted by PirateOwh View Post
    Whats ''#Proness#'' about then? I mean your such a pro dude. Tell us your secrets.
    Can you "#shut the fuck up#" a little? I mean your such a failure.

  7. #7
    NO PLEASE I CAN'T ShEtY is offline
    MemberRank
    Sep 2009 Join Date
    398Posts

    Re: Random Scroll NPC

    HenesysFag, I lol @ your 105% pie chart (:

  8. #8
    offonline King Grub is offline
    MemberRank
    Aug 2009 Join Date
    Spring fieldLocation
    3,303Posts

    Re: Random Scroll NPC

    Quote Originally Posted by HenesysFag! View Post
    Can you "#shut the fuck up#" a little? I mean your such a failure.
    Thanks hun<3

  9. #9
    bleh.... Shawn is offline
    MemberRank
    Oct 2008 Join Date
    Mississauga, CaLocation
    5,904Posts

    Re: Random Scroll NPC

    Good release. This is similar to my scroll NPC I made, except for the random factor. Mine is similar to Gaga in v73 I think.

    No... the NPC hasn't been released xD

  10. #10
    Infraction Banned waijooben is offline
    MemberRank
    Sep 2009 Join Date
    mity dump trukLocation
    35Posts

    Re: Random Scroll NPC

    Emilyx3 made this.

  11. #11
    Apprentice Deejai is offline
    MemberRank
    Nov 2009 Join Date
    10Posts

    Re: Random Scroll NPC

    Quote Originally Posted by waijooben View Post
    Emilyx3 made this.
    I made _this_ script, she may have already made the same type of script, just releasing what I made.



Advertisement