-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscripts.xml
208 lines (208 loc) · 7.42 KB
/
scripts.xml
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
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<scriptSet>
<scripts>
<description>reload command</description>
<script>game.reload(ch,args);
// nothing.</script>
<vnum>0</vnum>
</scripts>
<scripts>
<description>look command</description>
<script>var loc = ch.getLocation();
var dirs = new Array( "north", "south", "east", "west", "up", "down" );
title = "{1" + loc.getName() + " {5[{0 ";
for( b = 0; b < dirs.length; b++ ) {
if( loc.getExit(dirs[b]) != null ) {
title = title + dirs[b] + " ";
}
}
title = title + "{5]{0";
ch.writeln(title); 
ch.writeln("{4" + loc.getDescription() + "{0"); 
people = loc.people.toArray();
for( a = 0; a < people.length; a++) {
if( people[a].equals(ch) ) {
continue;
} else {
ch.writeln(people[a].getDescription() + " is here.");
}
}
objects = loc.contents.toArray();
for( a = 0; a < objects.length; a++) {
ch.writeln(objects[a].getDescription() + " is here.");
}
</script>
<vnum>1</vnum>
</scripts>
<scripts>
<description>script 2</description>
<script>// script 2</script>
<vnum>2</vnum>
</scripts>
<scripts>
<description>blank script</description>
<script>ch.write('how did you get this to run');
</script>
<vnum>3</vnum>
</scripts>
<scripts>
<description>moves a char</description>
<script>a = ch.getLocation();
b = command.getName();
if( a.getExit(b) == null ) {
ch.writeln("You cannot move that direction");
} else {
x = a.getNewX(b);
y = a.getNewY(b);
z = a.getNewZ(b);
game.moveChar(ch,a,a.getParent().getRoom(x,y,z));
game.interpret(ch,"look");
}</script>
<vnum>5</vnum>
</scripts>
<scripts>
<description>example trigger</description>
<script>// example trigger</script>
<vnum>10</vnum>
</scripts>
<scripts>
<description>examine command</description>
<script>ch.writeln(ch.getLocation().getName()); 
ch.writeln(ch.getLocation().getDescription()); ch.writeln("you looked at a room");</script>
<vnum>100</vnum>
</scripts>
<scripts>
<description>kill command</description>
<script>ch.writeln(ch.getLocation().getName()); 
ch.writeln(ch.getLocation().getDescription()); ch.writeln("you looked at a room");</script>
<vnum>101</vnum>
</scripts>
<scripts>
<description>qwerty command</description>
<script>ch.writeln(ch.getLocation().getName()); 
ch.writeln(ch.getLocation().getDescription()); ch.writeln("you looked at a room with a reloaded script (thrice).");</script>
<vnum>104</vnum>
</scripts>
<scripts>
<description>test create command</description>
<script>// this command does nothing.</script>
<vnum>105</vnum>
</scripts>
<scripts>
<description>test create command</description>
<script>// this command does nothing.(2)</script>
<vnum>106</vnum>
</scripts>
<scripts>
<description>Quit Command</description>
<script>ch.writeln("You quit.");
ch.quit();
</script>
<vnum>107</vnum>
</scripts>
<scripts>
<description>Shutdown Command</description>
<script>main.shutDown("Shutdown by user.");
</script>
<vnum>108</vnum>
</scripts>
<scripts>
<description>Lists commands</description>
<script>commands = game.commands.toArray();
for( a = 0; a < commands.length; a++) {
ch.writeln(commands[a].getName() + " : " + commands[a].getUsage());
}
ch.writeln("commands: " + commands.length);

</script>
<vnum>109</vnum>
</scripts>
<scripts>
<description>blank 2</description>
<script>// blank 2</script>
<vnum>110</vnum>
</scripts>
<scripts>
<description>script 2</description>
<script>// script 2</script>
<vnum>111</vnum>
</scripts>
<scripts>
<description>script 2</description>
<script>// script 2</script>
<vnum>112</vnum>
</scripts>
<scripts>
<description>Load Command</description>
<script>myargs = args.split(" ");
mob = game.getWorldService().findActor(parseInt(myargs[0]));
mob.setLocation(ch.getLocation());
ch.getLocation().addActor(mob);
ch.writeln(mob.getName() + " added to room " + ch.getLocation().getName() );


</script>
<vnum>113</vnum>
</scripts>
<scripts>
<description>Say Command</description>
<script>ch.writeln("You say {3'{0" + args + "{3'{0");
people = ch.getLocation().people.toArray();
for( a = 0; a < people.length; a++) {
if( ch.equals(people[a]) )
continue;

people[a].writeln("\n\r" + ch.getName() + " says {3'{0" + args + "{3'{0");
}



</script>
<vnum>114</vnum>
</scripts>
<scripts>
<description>who command</description>
<script>people = game.players.toArray();
ch.writeln(" {4Players Online{0 ");
ch.writeln("{3----------------------{0");
for( a = 0; a < people.length; a++) {
ch.writeln(people[a].getName());
}
ch.writeln("Total players found: " + people.length);
</script>
<vnum>115</vnum>
</scripts>
<scripts>
<description>color command</description>
<script>ch.writeln("\033[01;30mCOLOR\033[0m - \033[30mCOLOR\033[0m");
ch.writeln("\033[01;31mCOLOR\033[0m - \033[31mCOLOR\033[0m");
ch.writeln("\033[01;32mCOLOR\033[0m - \033[32mCOLOR\033[0m");
ch.writeln("\033[01;33mCOLOR\033[0m - \033[33mCOLOR\033[0m");
ch.writeln("\033[01;34mCOLOR\033[0m - \033[34mCOLOR\033[0m");
ch.writeln("\033[01;35mCOLOR\033[0m - \033[35mCOLOR\033[0m");
ch.writeln("\033[01;36mCOLOR\033[0m - \033[36mCOLOR\033[0m");
ch.writeln("\033[01;37mCOLOR\033[0m - \033[37mCOLOR\033[0m");
ch.writeln("\033[01;38mCOLOR\033[0m - \033[38mCOLOR\033[0m");
ch.writeln("\033[01;39mCOLOR\033[0m - \033[39mCOLOR\033[0m");
ch.writeln("\033[01;40mCOLOR\033[0m - \033[40mCOLOR\033[0m");
ch.writeln("\033[01;41mCOLOR\033[0m - \033[41mCOLOR\033[0m");
ch.writeln("\033[01;42mCOLOR\033[0m - \033[42mCOLOR\033[0m");
ch.writeln("\033[01;43mCOLOR\033[0m - \033[43mCOLOR\033[0m");
ch.writeln("\033[01;44mCOLOR\033[0m - \033[44mCOLOR\033[0m");
ch.writeln("\033[01;45mCOLOR\033[0m - \033[45mCOLOR\033[0m");
ch.writeln("\033[01;46mCOLOR\033[0m - \033[46mCOLOR\033[0m");
ch.writeln("\033[01;47mCOLOR\033[0m - \033[47mCOLOR\033[0m");


</script>
<vnum>116</vnum>
</scripts>
<scripts>
<description>new script</description>
<script>// this is a new script</script>
<vnum>117</vnum>
</scripts>
<scripts>
<vnum>118</vnum>
</scripts>
</scriptSet>