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
|
// TMW scripts.
// Authors:
// Jesusalva
// Hocus
// Description:
// Controls rebirth logic
// RebirthBonus ()
function script RebirthBonus {
if (PCBONUS & PCB_ATKBONUS) {
bonus bAtk, 25;
}
if (PCBONUS & PCB_MATKBONUS) {
bonus bMatk, 25;
}
if (PCBONUS & PCB_DEFBONUS) {
bonus bDef, 20;
}
if (PCBONUS & PCB_MDEFBONUS) {
bonus bMdef, 10;
}
if (PCBONUS & PCB_EVDBONUS) {
bonus bFlee, 20;
}
if (PCBONUS & PCB_HITBONUS) {
bonus bHit, 25;
}
if (PCBONUS & PCB_CRITBONUS) {
bonus bCritical, 5;
}
if (PCBONUS & PCB_DOUBLEATK) {
bonus bDoubleAddRate, 5;
}
if (PCBONUS & PCB_ALLSTATS) {
bonus bAllStats, 1;
}
if (PCBONUS & PCB_HPBONUS) {
bonus bMaxHP, 500;
}
if (PCBONUS & PCB_MPBONUS) {
bonus bMaxSP, 200;
}
if (PCBONUS & PCB_ASPDBONUS) {
bonus bAspd, 10;
}
if (PCBONUS & PCB_WSPDBONUS) {
bonus bSpeedAddRate, 5;
}
if (PCBONUS & PCB_WEIGHTBONUS) {
bonus bAddMaxWeight, 1000;
}
if (PCBONUS & PCB_EXPBONUS) {
bonus2 bExpAddRace, RC_All, 10;
}
if (PCBONUS & PCB_NOKNOCKBACK) {
bonus bNoKnockback, 1;
}
return;
}
// RebirthPrompt ()
function script RebirthPrompt {
setnpcdialogtitle l("Rebirth Trait Selection");
mesc l("Please select a trait.");
mesc l("This choice CANNOT be undone later."), 1;
menuint
l("Cancel"), 0,
rif(!(PCBONUS & PCB_ATKBONUS), l("Atk +25")), PCB_ATKBONUS,
rif(!(PCBONUS & PCB_MATKBONUS), l("Matk +25")), PCB_MATKBONUS,
rif(!(PCBONUS & PCB_DEFBONUS), l("Def +20")), PCB_DEFBONUS,
rif(!(PCBONUS & PCB_MDEFBONUS), l("MDEF +10")), PCB_MDEFBONUS,
rif(!(PCBONUS & PCB_EVDBONUS), l("Evasion +20")), PCB_EVDBONUS,
rif(!(PCBONUS & PCB_HITBONUS), l("Accuracy +25")), PCB_HITBONUS,
rif(!(PCBONUS & PCB_CRITBONUS), l("Crit +5%")), PCB_CRITBONUS,
rif(!(PCBONUS & PCB_DOUBLEATK), l("Double Attack +5%")), PCB_DOUBLEATK,
rif(!(PCBONUS & PCB_ALLSTATS), l("All Stats +1")), PCB_ALLSTATS,
rif(!(PCBONUS & PCB_HPBONUS), l("HP +500")), PCB_HPBONUS,
rif(!(PCBONUS & PCB_MPBONUS), l("MP +200")), PCB_MPBONUS,
rif(!(PCBONUS & PCB_ASPDBONUS), l("Atk. Speed +10")), PCB_ASPDBONUS,
rif(!(PCBONUS & PCB_WSPDBONUS), l("Walk +5%")), PCB_WSPDBONUS,
rif(!(PCBONUS & PCB_WEIGHTBONUS), l("Max Weight +1kg")), PCB_WEIGHTBONUS,
//rif(!(PCBONUS & PCB_EXPBONUS), l("EXP Gain +10%")), PCB_EXPBONUS,
rif(!(PCBONUS & PCB_NOKNOCKBACK), l("Knockback Immunity")), PCB_NOKNOCKBACK;
if (@menuret == 0) return;
PCBONUS=PCBONUS|@menuret;
REBIRTH+=1;
resetlvl(3); // TODO: This makes little to no sense at rEvolt
setnpcdialogtitle l("Rebirth Race Selection");
mesc l("Do you want to change your race?");
mesc l("This can only be reverted at rebirth! Beware!");
next;
if (askyesno() == ASK_NO) return;
BarberChangeRace();
return;
}
|