viewing paste Unknown #12036 | Athena

Posted on the
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
Example of outter NPC starts Mini-Dungeon:
Initialize Quest Variable to 7 when quest accepted.
Port into given location based on day of the week.
 
Maaain_Map,x,y,direction        script  Weekly Event Host::host_test    NPC_ID,{
        mes "[Weekly Quest Host]";
        mes "Greetings, please ask.";
        mes "{I am here to...}";
        menu "Battle Foes",battle,"Turn In Markers",prize,"Nevermind",-;
        mes "[Weekly Quest Host]";
        mes "Well, another day young adventurer... another day.";
        close;
 
battle: // warp to zone based on day
        mes "[Weekly Quest Host]";
        // Check the day
        if (p.hasItem(item_of_day))==1) goto fail;
        mes "Take care!";
        p.warp(zone_of_day);
        close;
 
        fail:
                mes"[Weekly Quest Host]";
                mes"You have this Day's Marker already.";
                close;
 
 
prize:
         mes "[Weekly Quest Host]";
         // Check the day
         if (p.hasItem(Mon) && p.hasItem(Tue) && ... ) goto win;
         mes "Hmm... something is not quite right...";
         close;
       
         win:
                mes "[Weekly Quest Host]";
                mes "Congratulations!";
                next;
                p.withdrawItem(Mon)//repeat for all days
                p.giveItem(Prize0//calculate prize from random table?
                mes "[Weekly Quest Host]";
                mes "Take care!";
                close;
 
 
 
 
}
 
 
 
Example of NPC inside Mini-Dungeon:
(Cloned to Each Day of the Week)
 
Monday_Map,x,y,direction        script  Weekly Quest Paige::inside_test NPC_ID,{
        mes "[Paige Mortimer]";
        mes "Ah, let me pull up your file.";
        if (p.hasItem(Monday_Item)==1) goto complete; // player has done this days challenge
        mes "Looks like you have not completed your Monday challenge."; // if not...
        next;
        mes "[Paige Mortimer]";
        mes "What say you?"; // ask if ready
        menu "I am here to fight!",fight,"Please take me out!",-;
        mes "Well, goodbye."; // not ready? outted.
        p.warp(Home);
        close;
 
fight: // ready
        mes "[Paige Mortimer]";
        mes "Well then, let me summon the competitor!";
        map.summon(Monday); // summon mob
        next;
        mes "[Paige Mortimer]";
        mes "Goodluck!";
        close;
 
 
 
complete:
        mes "You have already completed this dungeon.";
        p.warp(Home);
        close;
}
Viewed 340 times, submitted by kayli.