summaryrefslogtreecommitdiff
path: root/world/map/npc/commands/valentine.txt
blob: 426847c68fee675a23a81e268ed2eac278e3db55 (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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
-|script|@givelvlplz|32767
{
    end;

OnValentine:
    if (#VALENTINE20_INDEX > 0)
        goto L_AlreadyDone;
    message strcharinfo(0), "Valentine Event is already over.";
    end;
    //goto L_Register;

L_AlreadyDone:
    message strcharinfo(0), "You are already registered for Valentine Event.";
    // Handle exp ports
    if (strcharinfo(0) == "dangerDuck")
        getexp 818051, 0;
    if (strcharinfo(0) == "Rill")
        getexp 488725, 0;
    if (strcharinfo(0) == "Blue Sky")
        getexp 518399, 0;
    if (strcharinfo(0) == "+seeds")
        getexp 373416, 0;
    if (strcharinfo(0) == "karen123")
        getexp 627846, 0;
    if (strcharinfo(0) == "luanaf")
        getexp 540955, 0;
    if (strcharinfo(0) == "Cirno9")
        getexp 3241, 0;
    if (strcharinfo(0) == "mifritscher")
        getexp 19723, 0;
    if (strcharinfo(0) == "Jesusalva")
        getexp 79880, 0;
    message strcharinfo(0), "Rewards have already been claimed.";
    set #VALENTINE20_INDEX, 0;
    end;

L_Register:
    set @ml_login$, "";
    set @ml_char$, "";
    mes "##1You can only port one char level per person!##0";
    mes "##1Are you sure you want to port level "+BaseLevel+" for Valentine?##0";
    next;
    mes ".:: MOUBOOTAUR LEGENDS DATA ::.";
    mes "What is your login name?";
    mes "(Please leave the field blank to cancel. Case-sensitive.)";
    input @ml_login$;
    if (@ml_login$ == "")
        goto L_Abort;
    mes "";
    mes ".:: MOUBOOTAUR LEGENDS DATA ::.";
    mes "What is your char name?";
    mes "(The char name must be on the account login you've provided earlier. Case-sensitive.)";
    input @ml_char$;
    if (@ml_char$ == "")
        goto L_Abort;
    next;
    if (strcharinfo(0) == @ml_char$)
        goto L_Warning;
    goto L_Review;

L_Warning:
    mes "##1##BWARNING##b##0";
    mes "Make sure you are inserting your data ##BOn Moubootaur Legends Server##b.";
    mes "";
    mes "##BIf you provide invalid data, you will need to contact a GM.##0";
    next;
    goto L_Review;

L_Review:
    mes "";
    mes ".:: Data Review ::.";
    mes "ML Login: "+@ml_login$;
    mes "ML Char: "+@ml_char$;
    mes "Level: "+BaseLevel;
    mes "";
    mes "Is the data correct?";
    mes "##1##BThis cannot be changed later.##0";
    next;
    menu
        "Actually, can I start over?", L_Register,
        "Yes, this is how I login on ML and my char name", L_Save,
        "I'm not sure. Sorry.", L_Abort;

L_Save:
    set @rank, 0;
    set @loop, 0;
    goto L_Search;

L_Search:
    if ($VALENTINE20_LVL[@loop] == 0)
        goto L_Finished;
    set @loop, @loop + 1;
    goto L_Search;

L_Finished:
    mes "";
    set #VALENTINE20_INDEX, @loop+1; // 0 is a valid index
    set $VALENTINE20_LOGIN$[@loop], @ml_login$;
    set $VALENTINE20_NAME$[@loop], @ml_char$;
    set $VALENTINE20_LVL[@loop], BaseLevel;
    goto L_Abort;

L_Abort:
    mes "";
    set @ml_login$, "";
    set @ml_char$, "";
    set @loop, 0;
    set @rank, 0;
    close;

OnReport:
    if (GM < 60 && GM < G_SYSOP) end;
    goto L_Report;

L_Report:
    set @rank, 0;
    set @loop, 0;
    mes "ID - Login / Char - Level";
    mes "-------------------------";
    goto L_ShowNextRecord;

L_ShowNextRecord:
    if ($VALENTINE20_LVL[@loop] == 0)
        goto L_Close;
    mes (@loop + 1) + " - " + $VALENTINE20_LOGIN$[@loop] + " / " + $VALENTINE20_NAME$[@loop] + " - Lv. " + $VALENTINE20_LVL[@loop];
    set @loop, @loop + 1;
    if ((@loop % 10) == 0 && $VALENTINE20_LVL[@loop] > 0)
        goto L_NextShowNextRecord;
    goto L_ShowNextRecord;

L_NextShowNextRecord:
    next;
    goto L_ShowNextRecord;

L_Close:
    close;

OnInit:
    registercmd chr(ATCMD_SYMBOL) + "givelvlplz", strnpcinfo(0) + "::OnValentine";
    registercmd chr(ATCMD_SYMBOL) + "valentine2020", strnpcinfo(0) + "::OnValentine";
    registercmd chr(ATCMD_SYMBOL) + "moubootaurs", strnpcinfo(0) + "::OnReport";
    end;
}