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
|
// The Mana World scripts.
// Author:
// Micksha
// Jesusalva
// Description:
// The Manatree.
// THIS IS A PLACEHOLDER!
012-3-3,39,33,0 script Mana Tree? NPC_MANATREE,{
function mtRebirth;
function mtConvert;
mesc l("Magic is all around.");
next;
mesc l("You just must listen to it, and feel it deep inside.");
next;
if (#ADD_LVL > 30) mtConvert();
if (BaseLevel >= 99) mtRebirth();
mesc l("Now go, search for the unknown.");
close;
function mtRebirth {
/* TODO: When player reaches level cap he can do a quest (should be one that
requires quite some time to fullfill and collect items etc.). It also is a quest
that ends in his death (kind of a "last fight" situation where he goes into a
monster investead area and fights until he dies). They then goes to afterlife and
talk with a godlike figure and can choose either to stay death and get name
engraved in eternal hall of heroes or be reborn with some benefits (can choose
other races, has some boni or traits he can choose from and depending on how many
monsters he killed before he died he gets some equippment, too, the more monster
the better).
The quest itself might even happen at the afterworld.
*/
mesc l("Do you want to rebirth?"), 1;
mesc l("(Base Level will go to 1 and exp bar will be zero-ed)");
mesc l("(Will be able to change race and chose a trait)");
mesc l("You'll keep %s your equipment, magic, quest progression, craft recipes, money, and other levels. Only the base level is reset.", b(l("ALL")));
next;
if (askyesno() == ASK_NO) return;
RebirthPrompt();
return;
}
function mtConvert {
mesc l("You have %s account conversion points to spend.", fnum(#ADD_LVL)), 1;
mesc l("Please select your focus");
.@focus = select("Strength:Agility:Vitality:Intelligence:Dexterity:Luck:Do not assign");
if (.@focus > 6) return;
mesc l("Please select your sub focus");
.@subfo = select("Strength:Agility:Vitality:Intelligence:Dexterity:Luck");
mesc l("Please select your main activity");
.@activ = select("Foraging, Mining, Fishing:Cooking, Brewing, Forging:Hunting");
mesc l("Please select your main magic element");
.@elem = select("Fire:Water:Nature:Harmony:Combat:Support");
// NEXT_(1) / 20 = one "step" is 5% of the level 1 req (roughly)
// One point is 30 convert exp, and applied to everything
.@pt = #ADD_LVL/30;
#ADD_LVL -= .@pt * 30;
// Basic levels
EXP_STR+=(.@focus == 1 ? 3:1) * (.@subfo == 1 ? 2:1) * .@pt * NEXT_Str(1) / 20;
EXP_AGI+=(.@focus == 2 ? 3:1) * (.@subfo == 2 ? 2:1) * .@pt * NEXT_Agi(1) / 20;
EXP_VIT+=(.@focus == 3 ? 3:1) * (.@subfo == 3 ? 2:1) * .@pt * NEXT_Vit(1) / 20;
EXP_INT+=(.@focus == 4 ? 3:1) * (.@subfo == 4 ? 2:1) * .@pt * NEXT_Int(1) / 20;
EXP_DEX+=(.@focus == 5 ? 3:1) * (.@subfo == 5 ? 2:1) * .@pt * NEXT_Dex(1) / 20;
EXP_LUK+=(.@focus == 6 ? 3:1) * (.@subfo == 6 ? 2:1) * .@pt * NEXT_Luk(1) / 20;
// Classes
EXP_FORA+=(.@activ == 1 ? 2:1) * .@pt * NEXT_Fora(1) / rand2(22,24);
EXP_MINE+=(.@activ == 1 ? 2:1) * .@pt * NEXT_Mine(1) / rand2(22,24);
EXP_FISH+=(.@activ == 1 ? 2:1) * .@pt * NEXT_Fish(1) / rand2(22,24);
EXP_COOK+=(.@activ == 2 ? 2:1) * .@pt * NEXT_Cook(1) / rand2(20,22);
EXP_FORG+=(.@activ == 2 ? 2:1) * .@pt * NEXT_Forg(1) / rand2(20,22);
EXP_HUNT+=(.@activ == 3 ? 2:1) * .@pt * NEXT_Hunt(1) / 20;
// Elements
EXP_MF+=(.@elem == 1 ? 3:1) * .@pt * NEXT_Mf(1) / rand2(24, 28);
EXP_MW+=(.@elem == 2 ? 3:1) * .@pt * NEXT_Mw(1) / rand2(24, 28);
EXP_MN+=(.@elem == 3 ? 3:1) * .@pt * NEXT_Mn(1) / rand2(24, 28);
EXP_MH+=(.@elem == 4 ? 3:1) * .@pt * NEXT_Mh(1) / rand2(24, 28);
EXP_MC+=(.@elem == 5 ? 3:1) * .@pt * NEXT_Mc(1) / rand2(24, 28);
EXP_MS+=(.@elem == 6 ? 3:1) * .@pt * NEXT_Ms(1) / rand2(24, 28);
// TODO: Handle level up
mes "";
return;
}
OnInit:
.distance = 2;
end;
}
|