summaryrefslogblamecommitdiff
path: root/npc/017-10/politics.txt
blob: 5a04eae890f75beea3751f86bb69ee37752302fb (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14













                                                              
                        



                                                
                                                             








                                                                                         


                              










                                                             
               













                                 
// TMW2 Scripts
// Author:
//    Jesusalva
// Description:
//    Town Administrator file, see npc/functions/politics.txt
// User variables:
//    #POL_APPLYWEEK = Week of last application
//    #POL_VOTEDAY = Day of last vote

017-10,54,35,0	script	Land Of Fire Office	NPC_POLITICS,{
do
{
    mesc ".:: "+l("Land Of Fire Townhall")+" ::.", 2;
    mesc l("Current Town Administrator: ")+$LOF_MAYOR$, 3;
    POL_TownInfo("LOF");
    mesc l("Application fee: @@ GP", .applytax);
    next;
    select
        l("Information"),
        rif(strcharinfo(0) == $LOF_MAYOR$, l("Manage Town")),
        rif(#POL_APPLYWEEK != gettimeparam(GETTIME_WEEKDAY), l("Apply for the office!")),
        l("View Candidate List and cast a vote"),
        l("[Quit]");

    switch (@menu) {
        case 1:
            POL_Information();
            break;
        case 2:
            POL_Manage("LOF");
            break;
        case 3:
            // array_push might be too sensible for getd/setd
            if (Zeny < .applytax)
                break;
            Zeny-=.applytax;
            $LOF_MONEY+=.applytax;
            #POL_APPLYWEEK=gettimeparam(GETTIME_WEEKDAY);
            array_push($LOF_CANDIDATE$, strcharinfo(0));
            array_push($LOF_VOTES, 0);
            mesc l("Application successful!"), 3;
            next;
            break;
        case 4:
            POL_Candidate("LOF");
            break;
        default:
            close;
    }
} while (true);
end;

OnInit:
    .applytax=50;
    .distance=4;
    end;
}