-
Notifications
You must be signed in to change notification settings - Fork 1
/
create_object.html
88 lines (72 loc) · 2.42 KB
/
create_object.html
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
<html>
<head>
<title>Create Object</title>
<link rel="stylesheet" type="text/css" href="common.css">
</head>
<body>
<form name="spawner" action="byond://?src=/* ref src */" method="get">
<input type="hidden" name="src" value="/* ref src */">
Type <input type="text" name="filter" value="" onkeypress="submitFirst(event)" style="width:350px"> <input type = "button" class="button" value = "Search" onclick = "updateSearch()" /><br>
Offset: <input type="text" name="offset" value="x,y,z" style="width:250px">
A <input type="radio" class ="radioButton" name="offset_type" value="absolute">
R <input type="radio" class ="radioButton" name="offset_type" value="relative" checked="checked"><br>
Number: <input type="text" name="object_count" value="1" style="width:30px">
Dir: <input type="text" name="object_dir" value="2" style="width:30px">
Name: <input type="text" name="object_name" value="" style="width:180px"><br>
Where:
<select name='object_where' style="width:320px">
<option value='onfloor'>On floor below own mob</option>
<!-- <option value='inhand'>In own mob's hand</option> -->
<option value='inmarked'>In marked object</option>
</select>
<br><br>
<select name="object_list" size="18" multiple style="width:98%"></select><br>
<input type="submit" class="button" value="Spawn">
</form>
<script language="JavaScript">
var old_search = "";
var object_list = document.spawner.object_list;
var object_paths = null /* object types */;
var objects = object_paths == null ? new Array() : object_paths.split(";");
document.spawner.filter.focus();
populateList(objects);
function populateList(from_list)
{
object_list.options.length = 0;
var i;
for (i in from_list)
{
var new_option = document.createElement("option");
new_option.value = from_list[i];
new_option.text = from_list[i];
object_list.options.add(new_option);
}
}
function updateSearch()
{
old_search = document.spawner.filter.value;
var filtered = new Array();
for(var i in objects)
{
if(objects[i].indexOf(old_search) < 0)
{
continue;
}
filtered.push(objects[i]);
}
populateList(filtered);
}
function submitFirst(event)
{
if (!object_list.options.length)
{
return false;
}
if (event.keyCode == 13 || event.which == 13)
{
object_list.options[0].selected = 'true';
}
}
</script>
</body>
</html>