blob: 2da97e2e3412d2d9a4f1502f8f16f879c300907b (
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
|
// Evol functions.
// Authors:
// 4144
// Travolta
// Description:
// Build in functions.
function script menuimage {
return getarg(0) + "|" + getarg(1);
}
function script mesn {
if (getargcount() > 0)
{
.@s$ = "[" + getarg(0) + "]";
}
else
{
.@s$ = "[" + strnpcinfo(1) + "]";
}
mes .@s$;
return;
}
function script mesq {
mes "\"" + getarg(0)+ "\"";
return;
}
function script g {
return Sex == 0 ? getarg(0) : getarg(1);
}
function script col {
.@color = getarg(1);
if (.@color < 0) .@color = 0;
if (.@color > 9) .@color = 9;
return "##" + .@color + getarg(0) + "##0";
}
function script adddefaultskills {
skill NV_BASIC, 9, 0;
return;
}
function script str {
return "" + getarg(0);
}
function script addremovemapmask {
setmapmask getarg(0), (getmapmask(getarg(0)) | (getarg(1) + getarg(2))) ^ getarg(2);
return;
}
// remove spaces at the start and end of string and return result
function script strip {
.@s$ = getarg(0);
if (.@s$ == "")
return "";
.@start = 0;
.@end = getstrlen(.@s$) - 1;
for (.@i = .@start; .@i < .@end; .@i++)
{
if (charat(.@s$, .@i) != " ")
break;
else
.@start++;
}
for (.@i = .@end; .@i >= .@start; .@i--)
{
if (charat(.@s$, .@i) != " ")
break;
else
.@end--;
}
return substr(.@s$, .@start, .@end);
}
function script narrator {
mes "";
mes l("[Narrator]");
for (.@i = 0; .@i < getargcount(); .@i++)
{
mes col(getarg(.@i), 9);
next;
}
return;
}
function script speech {
mes "";
mesn;
for (.@i = 0; .@i < getargcount(); .@i++)
{
mesq getarg(.@i);
next;
}
return;
}
|