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
|
// TMW2 scripts.
// Author:
// Jesusalva
// Description:
// Pinkie Cave Tree is part of Legendary Weapons
025-2-4,39,33,0 script Mana Tree NPC_MANATREE,{
function manatreeOff;
function manatreeAgain;
function manatreeAegis;
setpcblock(PCBLOCK_HARD, true);
mesc l("A tree glows in this dark cave, surrounded by mana lanes.");
next;
mesc l("This might be the place of a great secret, but yet, all you can do is stare.");
next;
if (getq(FortressQuest_ManaTree) < 2) manatreeOff();
else if ($AEGIS_HOLDER$ == "" && @manacool < gettimetick(2)) manatreeAegis();
else manatreeAgain();
setpcblock(PCBLOCK_HARD, false);
closeclientdialog;
close;
function manatreeOff {
mesc l("...for now.");
next;
return;
}
function manatreeAgain {
.@t = getq3(FortressQuest_ManaTree);
if (.@t > gettimeparam(GETTIME_DAYOFMONTH)) {
mesc l("...for now.");
next;
return;
}
// Can be obtained every 3 days
inventoryplace Manapple, 1;
mesc l("The tree generously offer you one of its fruits.");
mesc l("You gladly accept it. But probably better not disturb it for a few days.");
// If you pledged for Barbara's life, 2 days cooldown, else 3d
if (BARBARA_STATE == 3)
setq3 FortressQuest_ManaTree, gettimeparam(GETTIME_DAYOFMONTH)+2;
else
setq3 FortressQuest_ManaTree, gettimeparam(GETTIME_DAYOFMONTH)+3;
getitem Manapple, 1;
next;
return;
}
function manatreeAegis {
mesc l("For which player do you wish to pray?");
next;
input .@prayer$;
if (.@prayer$ == strcharinfo(0)) {
mesc l("The tree doesn't likes your selfishness.");
percentheal -20, -50;
return;
}
if (.@prayer$ == "") {
mesc l("...Alright then.");
return;
}
@manacool=gettimetick(2)+30;
.@cid=getcharid(3, .@prayer$);
if (.@cid < 1) {
mesc l("Did you just make up that someone?");
return;
}
02524_Tree_BlackBox(.@prayer$, .@cid);
@manacool+=150;
return;
}
OnInit:
.sex = G_OTHER;
.distance = 2;
end;
}
|