summaryrefslogblamecommitdiff
path: root/npc/003-2/estard.txt
blob: 023a6163deb6e69c9c13502ccefdb9229e00a77a (plain) (tree)
1
2
3
4
5
6
7
8
9




                              


                                                       
 


                
 
                                            

                           
                             




                                                                                                                                       

                                                                                          




                                     
                                                                                                                          



                                            
                                      






                                                                                                                            




























                                                                                                                                                                              

                                                
                                                                                                      
                                                          



               





                                                                                



                                    
                                                             
         
                                  


              
                                            

                                                                                                                            




                                  
                                

                      



                             

                      
                         





                
                                  


                                                       


                                            
           
 
                  
                  

        
// TMW-2 Scripts.
// Author:
//    Jesusalva
// Description:
//    Manages party and guild.
// General_Janus
//  0 - Allows Party Creation
//  1 - Allows Guild Creation, Party is already allowed

// Evol scripts.
// Author:
//    Reid

003-2,32,34,0	script	Estard	NPC_PLAYER,{

    function create_party {
        .@party_price = 7500;

        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("Creating a party has some advantages, it's a pretty good choice!"),
            l("I remember when I created my first party, we were amazed to share some experience with a small group of adventurer..."),
            l("Oh! And our party chat was really entertaining, I do highly recommend you to share this fun as well."),
            lg("The cost to create a party is @@ GP, are you interested?",
               "The cost to create a party is @@ GP, are you interested?", .@party_price);

        if (askyesno() == 1)
        {
            if (Zeny < .@party_price)
            {
                speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You don't have enough money, bring me @@ GP.", .@party_price);
            }
            else
            {
                Zeny = Zeny - .@party_price;
                setq General_Janus, 1;
                skill NV_BASIC, 7, 0;

                speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Awesome, come back if you ever want to create a larger group!");
            }
        }
    }


    function create_guild {
        .@guild_price = 100000;

        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("Creating a guild is not for the faint of heart. You cannot share experience or drops."),
            l("But it is a massive organization, recognized by everyone. Guilds train with other guilds, for huge profits."),
            l("It is often easier to get invited by someone, but if you want to create it, you're free to. Remember guilds also have a player limit."),
            l("Just like parties, you can create from Social menu, but there is a catch: I will give you a document, which allows you to create ONE GUILD."),
            l("Shall you disband your guild for whatever reason, you'll need to pay again. No refunds. No complaining."),
            l("The cost to create a guild is @@ GP.", .@guild_price);

        if (askyesno() == 1)
        {
            if (Zeny < .@guild_price)
            {
                speech S_FIRST_BLANK_LINE | S_LAST_NEXT, l("You don't have enough money, bring me @@ GP or join an already existing one.", .@guild_price);
            }
            else
            {
                inventoryplace Emperium, 1;
                Zeny = Zeny - .@guild_price;
                getitem Emperium, 1;

                speech(S_FIRST_BLANK_LINE | S_LAST_NEXT, l("Awesome, here is the certificate! Choose guild name wisely, because there are no refunds, even if you lose it!"));
            }
        }
    }

    function explain_service {
        speech S_FIRST_BLANK_LINE | S_LAST_NEXT,
            l("Welcome to the Town Hall. I am @@, officer in charge of public associations.", .name$),
            l("We offer party and guild certifications.");
        return;
    }


    mesn;
    mesq lg("Welcome miss.", "Good day sir.");

    if (getcharid(2) > 0)
        mesq l("You are part of the \"@@\" guild.", getguildname(getcharid(2)));
    next;

    do
    {
        // Beta users by-pass check.
        if (getskilllv(NV_BASIC) > 6 && !getq(General_Janus))
        {
            setq General_Janus, 1;
        }

        select
            l("What service do you offer?"),
            rif(!getq(General_Janus), l("I would like to create a party.")),
            rif(getq(General_Janus) && getcharid(2) <= 0 && countitem(Emperium) == 0, l("I would like to create a guild.")),
            menuaction(l("Quit"));

        switch (@menu)
        {
            case 1:
                explain_service;
                break;
            case 2:
                create_party;
                break;
            case 3:
                create_guild;
                break;
        }
    } while (@menu != 4);

    closedialog;
    goodbye;
    close;

OnInit:
    .@npcId = getnpcid(0, .name$);
    setunitdata(.@npcId, UDT_HEADTOP, BowlerHat);
    setunitdata(.@npcId, UDT_HEADMIDDLE, CreasedShirt);
    setunitdata(.@npcId, UDT_HEADBOTTOM, JeansChaps);
    setunitdata(.@npcId, UDT_WEAPON, 1800);
    setunitdata(.@npcId, UDT_HAIRSTYLE, 26);
    setunitdata(.@npcId, UDT_HAIRCOLOR, 0);
    npcsit;

    .sex = G_MALE;
    .distance = 4;
    end;
}