Forum
Scripts
Need scripts!
Need scripts!
5 replies
1

With lua, this would mean parsing some
spawnitem. Note that the coordinates need to be in tiles.parse("spawnitem 35 25 25")
parse("spawnitem 41 25 26")
brofistmsia, read this. Lua will more easy for you. 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
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
function totable(t,match)
local cmd = {}
if not match then
match = "[^%s]+"
else
match = "[^"..match.."]+"
end
for word in string.gmatch(t,match) do
table.insert(cmd,word)
end
return cmd
end
addhook("say","_say")
function _say(id,txt)
local p = totable(txt)
local cmd = tostring(p[1])
if cmd:lower() == "!weapons" then -- use !weapons spawn weapon
xx = player(id,"tiley")
xy = player(id,"tilex")
parse("spawnitem 35 "..xy.." "..xx)
parse("spawnitem 41 "..xy.." "..xx)
return 1
end
if cmd:lower() == "!altoequip" then -- use !weapons equip!
parse("equip "..id.." 35")
parse("equip "..id.." 41")
return 1
end
end
1

Offline