summaryrefslogtreecommitdiff
path: root/npc/functions/clear_vars.txt
blob: 35c05a4cd735ea3061ea0e6ff91824350a46a58e (plain) (blame)
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
function	script	ClearVariables	{
    if(@login_event != 1) goto L_Deprecated;

    if(#BankAccount >= 0) return;
    if (Zeny >= -#BankAccount) {
        Zeny = Zeny + #BankAccount;
        #BankAccount = 0;
    }

    // Partial fix
    #BankAccount = #BankAccount + Zeny;
    Zeny = 0;
    return;
}


function	script	ClearGlobalVars	{
    $@loop = 5;
    goto L_FluffyClear;

L_FluffyClear:
    if ($@loop == 12)
        goto L_IlliaClear;

    $Record_Fluffy_Name$[$@loop] = "";
    $Record_Fluffy_Date$[$@loop] = "";
    $Record_Fluffy_Kills[$@loop] = 0;

    $@loop = $@loop + 1;
    goto L_FluffyClear;


L_IlliaClear:
    $@loop = 0;
    goto L_IlliaLoop;

L_IlliaLoop:
    if ($Illia_Win_Records$[$@loop] == "")
        goto L_EventClear;

    $Illia_Win_Records$[$@loop] = "";

    $@loop = $@loop + 1;
    goto L_IlliaLoop;

L_EventClear:
    $@loop = 0;

    $CandyOpsComplete = 0;

    $Easter_2010_Npc_State1 = 0;
    $Easter_2010_Npc_State2 = 0;
    $Easter_2010_Egg_Loc_State1 = 0;
    $Easter_2010_Egg_Loc_State2 = 0;
    $Easter_2010_Egg_Loc_State3 = 0;
    $Easter_2010_Egg_Loc_State4 = 0;
    $Easter_2010_Egg_Loc_State5 = 0;

    $hween10 = 0;
    $hween10_tondel = 0;
    $hween10_mmallow = 0;
    $hween10_jelskul = 0;
    $hween10_canpump = 0;

    $Golbenez_Inn_Cost = 0;

    $hween16 = 0;
    $hween16_tondel = 0;
    $hween16_mmallow = 0;
    $hween16_jelskul = 0;
    $hween16_canpump = 0;

    $state = 0;
    return;
}