[12:21:51] Lua: Adding function 'mypos' to hook 'movetile'
[12:21:51] Lua: Adding function 'mypos2' to hook 'move' [12:21:51] initialising...
[12:21:52] Lua: Adding function 'adminCommands' to hook 'say'
[12:21:52] LUA ERROR: sys/lua/cs2dtibia/items.lua:615: '}' expected (to close '{' at line 604) near 'speed'[12:21:52] U.S.G.N.: Sending serverlist ADD-request... [12:21:52] U.S.G.N.: Server added to serverlist [12:21:52] U.S.G.N.: Ping/State 'playing'
[12:22:32] Server Shutdown
[12:22:32] U.S.G.N.: Sending serverlist DELETE-request...
[12:22:32] U.S.G.N.: Server removed from serverlist [12:22:32] ----- Disconnected -----
[12:22:33] M-NET: received unexpected msg (47, 94.132.37.90:49295)
[12:22:33] U.S.G.N.: Ping/State 'idle' (61 ms)
[12:22:34] M-NET: received unexpected msg (59, 120.28.227.28:1352)
It's my items.lua
More
ITEMS = {
[0] = {
name = ""
},
[1] = {
name = "apple",
article = "an",
desc = "No visible worms.",
r = 255, g = 0, b = 0,
action = "eat",
food = function() return math.random(10,20) end,
fimage = "gfx/weiwen/apple.png",
func = eat,
},
[625] = {
name = "heal apple",
article = "an",
desc = "+100hp.",
r = 255, g = 255, b = 0,
action = "eat",
food = function() return math.random(100,100) end,
fimage = "gfx/weiwen/apple.png",
func = eat,
},
[2] = {
name = "torch",
plural = "torches",
desc = "Allows you to see clearly in the dark.",
r = 191, g = 213, b = 128,
action = "hold",
slot = 8,
fimage = "gfx/weiwen/torch.png",
eimage = "gfx/sprites/flare3.bmp",
escalex = 3,
escaley = 3,
blend = 1,
static = 1,
func = equip,
},
[3] = {
name = "hourglass",
plural = "hourglasses",
article = "an",
r = 180, g = 180, b = 180,
action = {"wear","check time"},
slot = 8,
func = {equip, function(id) msg2(id,ITEMS[3].desc) end},
},
[4] = {
name = "cheese",
desc = "A solid food prepared from the pressed curd of milk.",
r = 255, g = 255, b = 0,
action = "eat",
food = function() return math.random(10,20) end,
fimage = "gfx/weiwen/cheese.png",
func = eat,
},
[5] = {
name = "pizza",
desc = "Italian open pie made of thin bread dough spread with a spiced mixture of tomato sauce and cheese.",
action = "eat",
food = function() return math.random(25,50) end,
fimage = "gfx/weiwen/pizza.png",
func = eat,
},
[100] = {
name = "ember rune",
desc = "You may only use it once.",
r = 128, g = 0, b = 0,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a fireball rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 64, 15, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 100 64 255 128 0;")
parse("effect \"colorsmoke\" " .. pos .. " 75 64 255 0 0")
destroyitem(id, itemslot, equip)
end,equip},
},
[101] = {
name = "water gun rune",
desc = "You may only use it once.",
r = 128, g = 128, b = 255,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a waterball rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 64, 15, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 100 64 255 255 255")
parse("effect \"colorsmoke\" " .. pos .. " 75 64 128 128 255")
destroyitem(id, itemslot, equip)
end,equip},
},
[102] = {
name = "healing rune",
desc = "You may only use it once.",
r = 128, g = 255, b = 255,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a healing rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 32, -30, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 5 5 128 255 255")
radiussound("materials/glass2.wav", player(id,"x"), player(id,"y"))
destroyitem(id, itemslot, equip)
end,equip},
},
[103] = {
name = "thundershock rune",
desc = "An electrical attack that may paralyze the foe.",
r = 255, g = 255, b = 0,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a thundershock rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 64, 15, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 100 64 255 255 0")
parse("effect \"colorsmoke\" " .. pos .. " 75 64 255 255 255")
destroyitem(id, itemslot, equip)
end,equip},
},
[104] = {
name = "flamethrower rune",
desc = "You may only use it once.",
r = 185, g = 25, b = 25,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a firewave rune.", player(id,"x"), player(id,"y"))
parse("equip " .. id .. " 46")
parse("setweapon " .. id .. " 46")
timer(1000, "parse", "strip " .. id .. " 46")
destroyitem(id, itemslot, equip)
end,equip},
},
[105] = {
name = "teleport rune",
desc = "You may only use it once.",
r = 255, g = 255, b = 255,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id, itemslot, itemid, equip)
radiusmsg(player(id,"name") .. " is casting a teleport rune.", player(id,"x"), player(id,"y"))
timer(1500, "ITEMS[105].teleport", id .. ';' .. player(id, 'health') .. ';' .. itemslot .. ';' .. equip)
end,equip},
teleport = function(p)
local id, health, itemslot, equip = p:split(';')
if player(id, 'health') == health then
radiusmsg(player(id,"name") .. " completed casting a teleport rune.", player(id,"x"), player(id,"y"))
parse("effect \"colorsmoke\" " .. player(id,"x") .. " " .. player(id,"y") .. " 5 5 255 255 255")
local pos = PLAYERS[id].Spawn[1] .. " " .. PLAYERS[id].Spawn[2]
parse("effect \"colorsmoke\" " .. pos .. " 5 5 255 255 255")
parse("setpos " .. id .. " " .. pos)
radiussound("materials/glass2.wav", player(id,"x"), player(id,"y"))
destroyitem(id, itemslot, equip)
else
radiusmsg(player(id,"name") .. " failed to cast a teleport rune.", player(id,"x"), player(id,"y"))
end
end,
},
[106] = {
name = "poison fog rune",
desc = "You may only use it once.",
r = 128, g = 128, b = 0,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id, itemslot, itemid, equip)
radiusmsg(player(id,"name") .. " casts a poison fog rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 64, 15, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 100 96 128 128 0")
destroyitem(id, itemslot, equip)
end,equip},
},
[200] = {
name = "white bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 255, g = 255, b = 255,
},
[201] = {
name = "pink bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 255, g = 128, b = 255,
},
[202] = {
name = "green bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 192, b = 0,
},
[203] = {
name = "blue bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 0, g = 128, b = 192,
},
[204] = {
name = "dark red bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 0, b = 0,
},
[205] = {
name = "light green bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 255, b = 128,
},
[206] = {
name = "light blue bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 128, b = 255,
},
[207] = {
name = "yellow bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 255, g = 255, b = 0,
},
[208] = {
name = "orange bed",
article = "an",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 255, g = 128, b = 0,
},
[209] = {
name = "brown bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 64, b = 0,
},
[210] = {
name = "white chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
r = 255, g = 255, b = 255,
rot = 0,
heal = 3,
action = "rotate|South",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-209)%4)+210; itemactions(id,itemslot) end,
},
[211] = {
name = "white chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
r = 255, g = 255, b = 255,
rot = 90,
heal = 3,
action = "rotate|West",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-209)%4)+210; itemactions(id,itemslot) end,
},
[212] = {
name = "white chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
rot = 180,
heal = 3,
r = 255, g = 255, b = 255,
action = "rotate|North",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-209)%4)+210; itemactions(id,itemslot) end,
},
[213] = {
name = "white chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
rot = 270,
heal = 3,
r = 255, g = 255, b = 255,
action = "rotate|East",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-209)%4)+210; itemactions(id,itemslot) end,
},
[214] = {
name = "brown chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
r = 169, g = 106, b = 44,
rot = 0,
heal = 3,
action = "rotate|South",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-213)%4)+214; itemactions(id,itemslot) end,
},
[215] = {
name = "brown chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
r = 169, g = 106, b = 44,
rot = 90,
heal = 3,
action = "rotate|West",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-213)%4)+214; itemactions(id,itemslot) end,
},
[216] = {
name = "brown chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
rot = 180,
heal = 3,
r = 169, g = 106, b = 44,
action = "rotate|North",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-213)%4)+214; itemactions(id,itemslot) end,
},
[217] = {
name = "brown chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
rot = 270,
heal = 3,
r = 169, g = 106, b = 44,
action = "rotate|East",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-213)%4)+214; itemactions(id,itemslot) end,
},
[218] = {
name = "white table",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/table.png",
r = 255, g = 255, b = 255,
},
[219] = {
name = "brown table",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/table.png",
r = 169, g = 106, b = 44,
},
[220] = {
name = "pikachu doll",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/pokemon/25.png",
},
[221] = {
name = "bulbasaur doll",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/pokemon/1.png",
},
[222] = {
name = "charmander doll",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/pokemon/4.png",
},
[223] = {
name = "squirtle doll",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/pokemon/7.png",
},
[230] = {
name = "coin",
desc = "Heads or tails?",
r = 255, g = 200, b = 0,
action = "flip",
fimage = "gfx/weiwen/circle.png",
func = function(id,itemslot,itemid)
if PLAYERS[id].tmp.exhaust.use then
return
end
PLAYERS[id].tmp.exhaust.use = true
timer(CONFIG.EXHAUST.USE, rem.useExhaust, id)
radiusmsg(player(id,"name") .. " flips a coin. " .. ((math.random(2) == 1) and "Heads!" or "Tails!"), player(id,"x"), player(id,"y"))
end,
},
[231] = {
name = "dice",
desc = "1d6.",
r = 255, g = 192, b = 128,
action = "roll",
fimage = "gfx/weiwen/table.png",
fscalex = 0.5,
fscaley = 0.5,
func = function(id,itemslot,itemid)
if PLAYERS[id].tmp.exhaust.use then
return
end
PLAYERS[id].tmp.exhaust.use = true
timer(CONFIG.EXHAUST.USE, rem.useExhaust, id)
radiusmsg(player(id,"name") .. " rolls a " .. math.random(1, 6) .. ".", player(id,"x"), playerw(id,"y"))
end,
},
[300] = {
name = "leather helmet",
desc = "Protect yourself from headshots!",
r = 128, g = 64, b = 0,
action = "equip",
slot = 1,
eimage = "gfx/weiwen/helmet.png",
fimage = "gfx/weiwen/helmet.png",
def = 0.05,
speed = -1,
func = equip,
},
[301] = {
name = "leather torso",
desc = "A few holes here and there, but still usable.",
r = 128, g = 64, b = 0,
action = "equip",
slot = 2,
eimage = "gfx/weiwen/armour.png",
fimage = "gfx/weiwen/farmour.png",
def = 0.1,
speed = -1,
func = equip,
},
[302] = {
name = "leather legs",
plural = "pairs of leather legs",
article = "a pair of",
desc = "A few holes here and there, but still usable.",
r = 128, g = 64, b = 0,
action = "equip",
slot = 5,
fimage = "gfx/weiwen/legs.png",
def = 0.07,
speed = 1,
func = equip,
},
[303] = {
name = "leather boots",
plural = "pairs of leather boots",
article = "a pair of",
desc = "Waterproof.",
r = 128, g = 64, b = 0,
action = "equip",
slot = 6,
fimage = "gfx/weiwen/boots.png",
speed = 2,
func = equip,
},
[307] = {
name = "wooden crossbow",
desc = "It requires you to hold it with two hands.",
r = 128, g = 64, b = 0,
action = "equip",
slot = 3,
twohand = true,
eimage = "gfx/weiwen/bow.png",
fimage = "gfx/weiwen/bow.png",
offsety = 9,
equip = 34,
atk = 0.1,
speed = -2.5,
func = equip,
},
[320] = {
name = "bronze helmet",
r = 200, g = 100, b = 0,
action = "equip",
slot = 1,
eimage = "gfx/weiwen/helmet.png",
fimage = "gfx/weiwen/helmet.png",
def = 0.15,
speed = -1.3,
level = 15,
func = equip,
},
[321] = {
name = "bronze armour",
r = 200, g = 100, b = 0,
action = "equip",
slot = 2,
eimage = "gfx/weiwen/armour.png",
fimage = "gfx/weiwen/farmour.png",
def = 0.3,
speed = -1.3,
level = 15,
func = equip,
},
[322] = {
name = "bronze leggings",
plural = "pairs of bronze leggings",
article = "a pair of",
r = 200, g = 100, b = 0,
action = "equip",
slot = 5,
fimage = "gfx/weiwen/legs.png",
def = 0.2,
speed = -0.4,
level = 15,
func = equip,
},
[323] = {
name = "bronze boots",
plural = "pairs of bronze boots",
article = "a pair of",
r = 200, g = 100, b = 0,
action = "equip",
slot = 6,
fimage = "gfx/weiwen/boots.png",
def = 0.15,
speed = -0.4,
level = 15,
func = equip,
},
[400] = {
name = "brown horse",
desc = "You move faster with it, but are unable to attack with it. Your defence is also reduced significantly.",
r = 162, g = 107, b = 0,
action = "ride",
slot = 7,
ground = true,
fimage = "gfx/weiwen/horse.png",
eimage = "gfx/weiwen/horse.png",
speed = 20,
def = -0.5,
level = 10,
func = equip,
},
[1001] = {
name = "USP[lvl 1]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/usp_k.bmp",
offsety = 9,
equip = 1,
atk = 0.05,
speed = -2.4,
func = equip,
},
[1002] = {
name = "Glock[lvl 1]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/glock_k.bmp",
offsety = 9,
equip = 2,
atk = 0.06,
speed = -2.4,
func = equip,
},
[1003] = {
name = "Deagle[lvl 5]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/deagle_k.bmp",
offsety = 9,
equip = 3,
atk = 0.08
speed = -2.2,
func = equip,
level = 5,
},
[1003] = {
name = "Five-Seven[lvl 7]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/fiveseven_k.bmp",
offsety = 9,
equip = 3,
atk = 0.06,
func = equip,
level = 7,
},
[1004] = {
name = "UMP45[lvl 11]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/ump_k.bmp",
offsety = 9,
equip = 3,
atk = 0.05
speed = -2.5,
func = equip,
level = 11,
},
[1005] = {
name = "MP5[lvl 11]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/mp5_k.bmp",
offsety = 9,
equip = 3,
atk = 0.04
speed = -2.4,
func = equip,
level = 11,
},
[1006] = {
name = "TMP[lvl 11]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/tmp_k.bmp",
offsety = 9,
equip = 3,
atk = 0.02
func = equip,
level = 11,
speed = -2.2,
},
[1007] = {
name = "M4A1[lvl 17]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/m4a1_k.bmp",
offsety = 9,
equip = 3,
atk = 0.04
speed = -2.3,
func = equip,
level = 17,
},
[1008] = {
name = "AK-47[lvl 17]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/ak47_k.bmp",
offsety = 9,
equip = 3,
atk = 0.04
func = equip,
level = 17,
},
[1006] = {
name = "Galil[lvl 16]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/galil_k.bmp",
offsety = 9,
equip = 3,
atk = 0.01
speed = -2.3,
func = equip,
level = 16,
},
[1337] = {
name = 'money',
article = 'some',
r = 0, g = 150, b = 0,
fimage = 'gfx/weiwen/money.png',
}
}
for k, v in pairs(ITEMS) do
v.article = v.article or "a"
v.plural = v.plural or v.name .. "s"
v.action = type(v.action) == "table" and v.action or {v.action}
v.func = type(v.func) == "table" and v.func or {v.func}
end
[0] = {
name = ""
},
[1] = {
name = "apple",
article = "an",
desc = "No visible worms.",
r = 255, g = 0, b = 0,
action = "eat",
food = function() return math.random(10,20) end,
fimage = "gfx/weiwen/apple.png",
func = eat,
},
[625] = {
name = "heal apple",
article = "an",
desc = "+100hp.",
r = 255, g = 255, b = 0,
action = "eat",
food = function() return math.random(100,100) end,
fimage = "gfx/weiwen/apple.png",
func = eat,
},
[2] = {
name = "torch",
plural = "torches",
desc = "Allows you to see clearly in the dark.",
r = 191, g = 213, b = 128,
action = "hold",
slot = 8,
fimage = "gfx/weiwen/torch.png",
eimage = "gfx/sprites/flare3.bmp",
escalex = 3,
escaley = 3,
blend = 1,
static = 1,
func = equip,
},
[3] = {
name = "hourglass",
plural = "hourglasses",
article = "an",
r = 180, g = 180, b = 180,
action = {"wear","check time"},
slot = 8,
func = {equip, function(id) msg2(id,ITEMS[3].desc) end},
},
[4] = {
name = "cheese",
desc = "A solid food prepared from the pressed curd of milk.",
r = 255, g = 255, b = 0,
action = "eat",
food = function() return math.random(10,20) end,
fimage = "gfx/weiwen/cheese.png",
func = eat,
},
[5] = {
name = "pizza",
desc = "Italian open pie made of thin bread dough spread with a spiced mixture of tomato sauce and cheese.",
action = "eat",
food = function() return math.random(25,50) end,
fimage = "gfx/weiwen/pizza.png",
func = eat,
},
[100] = {
name = "ember rune",
desc = "You may only use it once.",
r = 128, g = 0, b = 0,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a fireball rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 64, 15, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 100 64 255 128 0;")
parse("effect \"colorsmoke\" " .. pos .. " 75 64 255 0 0")
destroyitem(id, itemslot, equip)
end,equip},
},
[101] = {
name = "water gun rune",
desc = "You may only use it once.",
r = 128, g = 128, b = 255,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a waterball rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 64, 15, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 100 64 255 255 255")
parse("effect \"colorsmoke\" " .. pos .. " 75 64 128 128 255")
destroyitem(id, itemslot, equip)
end,equip},
},
[102] = {
name = "healing rune",
desc = "You may only use it once.",
r = 128, g = 255, b = 255,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a healing rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 32, -30, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 5 5 128 255 255")
radiussound("materials/glass2.wav", player(id,"x"), player(id,"y"))
destroyitem(id, itemslot, equip)
end,equip},
},
[103] = {
name = "thundershock rune",
desc = "An electrical attack that may paralyze the foe.",
r = 255, g = 255, b = 0,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a thundershock rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 64, 15, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 100 64 255 255 0")
parse("effect \"colorsmoke\" " .. pos .. " 75 64 255 255 255")
destroyitem(id, itemslot, equip)
end,equip},
},
[104] = {
name = "flamethrower rune",
desc = "You may only use it once.",
r = 185, g = 25, b = 25,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id,itemslot,itemid,equip)
radiusmsg(player(id,"name") .. " casts a firewave rune.", player(id,"x"), player(id,"y"))
parse("equip " .. id .. " 46")
parse("setweapon " .. id .. " 46")
timer(1000, "parse", "strip " .. id .. " 46")
destroyitem(id, itemslot, equip)
end,equip},
},
[105] = {
name = "teleport rune",
desc = "You may only use it once.",
r = 255, g = 255, b = 255,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id, itemslot, itemid, equip)
radiusmsg(player(id,"name") .. " is casting a teleport rune.", player(id,"x"), player(id,"y"))
timer(1500, "ITEMS[105].teleport", id .. ';' .. player(id, 'health') .. ';' .. itemslot .. ';' .. equip)
end,equip},
teleport = function(p)
local id, health, itemslot, equip = p:split(';')
if player(id, 'health') == health then
radiusmsg(player(id,"name") .. " completed casting a teleport rune.", player(id,"x"), player(id,"y"))
parse("effect \"colorsmoke\" " .. player(id,"x") .. " " .. player(id,"y") .. " 5 5 255 255 255")
local pos = PLAYERS[id].Spawn[1] .. " " .. PLAYERS[id].Spawn[2]
parse("effect \"colorsmoke\" " .. pos .. " 5 5 255 255 255")
parse("setpos " .. id .. " " .. pos)
radiussound("materials/glass2.wav", player(id,"x"), player(id,"y"))
destroyitem(id, itemslot, equip)
else
radiusmsg(player(id,"name") .. " failed to cast a teleport rune.", player(id,"x"), player(id,"y"))
end
end,
},
[106] = {
name = "poison fog rune",
desc = "You may only use it once.",
r = 128, g = 128, b = 0,
action = {"cast","hold"},
slot = 9,
fimage = "gfx/weiwen/rune.png",
func = {function(id, itemslot, itemid, equip)
radiusmsg(player(id,"name") .. " casts a poison fog rune.", player(id,"x"), player(id,"y"))
explosion(player(id, "x"), player(id,"y"), 64, 15, id)
local pos = player(id,"x") .. " " .. player(id,"y")
parse("effect \"colorsmoke\" " .. pos .. " 100 96 128 128 0")
destroyitem(id, itemslot, equip)
end,equip},
},
[200] = {
name = "white bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 255, g = 255, b = 255,
},
[201] = {
name = "pink bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 255, g = 128, b = 255,
},
[202] = {
name = "green bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 192, b = 0,
},
[203] = {
name = "blue bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 0, g = 128, b = 192,
},
[204] = {
name = "dark red bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 0, b = 0,
},
[205] = {
name = "light green bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 255, b = 128,
},
[206] = {
name = "light blue bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 128, b = 255,
},
[207] = {
name = "yellow bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 255, g = 255, b = 0,
},
[208] = {
name = "orange bed",
article = "an",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 255, g = 128, b = 0,
},
[209] = {
name = "brown bed",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/bed.png",
offsety = 16,
heal = 5,
r = 128, g = 64, b = 0,
},
[210] = {
name = "white chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
r = 255, g = 255, b = 255,
rot = 0,
heal = 3,
action = "rotate|South",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-209)%4)+210; itemactions(id,itemslot) end,
},
[211] = {
name = "white chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
r = 255, g = 255, b = 255,
rot = 90,
heal = 3,
action = "rotate|West",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-209)%4)+210; itemactions(id,itemslot) end,
},
[212] = {
name = "white chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
rot = 180,
heal = 3,
r = 255, g = 255, b = 255,
action = "rotate|North",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-209)%4)+210; itemactions(id,itemslot) end,
},
[213] = {
name = "white chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
rot = 270,
heal = 3,
r = 255, g = 255, b = 255,
action = "rotate|East",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-209)%4)+210; itemactions(id,itemslot) end,
},
[214] = {
name = "brown chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
r = 169, g = 106, b = 44,
rot = 0,
heal = 3,
action = "rotate|South",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-213)%4)+214; itemactions(id,itemslot) end,
},
[215] = {
name = "brown chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
r = 169, g = 106, b = 44,
rot = 90,
heal = 3,
action = "rotate|West",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-213)%4)+214; itemactions(id,itemslot) end,
},
[216] = {
name = "brown chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
rot = 180,
heal = 3,
r = 169, g = 106, b = 44,
action = "rotate|North",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-213)%4)+214; itemactions(id,itemslot) end,
},
[217] = {
name = "brown chair",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/chair.png",
rot = 270,
heal = 3,
r = 169, g = 106, b = 44,
action = "rotate|East",
func = function(id,itemslot,itemid) PLAYERS[id].Inventory[itemslot] = ((itemid-213)%4)+214; itemactions(id,itemslot) end,
},
[218] = {
name = "white table",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/table.png",
r = 255, g = 255, b = 255,
},
[219] = {
name = "brown table",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/table.png",
r = 169, g = 106, b = 44,
},
[220] = {
name = "pikachu doll",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/pokemon/25.png",
},
[221] = {
name = "bulbasaur doll",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/pokemon/1.png",
},
[222] = {
name = "charmander doll",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/pokemon/4.png",
},
[223] = {
name = "squirtle doll",
desc = "Used to furnish your house.",
fimage = "gfx/weiwen/pokemon/7.png",
},
[230] = {
name = "coin",
desc = "Heads or tails?",
r = 255, g = 200, b = 0,
action = "flip",
fimage = "gfx/weiwen/circle.png",
func = function(id,itemslot,itemid)
if PLAYERS[id].tmp.exhaust.use then
return
end
PLAYERS[id].tmp.exhaust.use = true
timer(CONFIG.EXHAUST.USE, rem.useExhaust, id)
radiusmsg(player(id,"name") .. " flips a coin. " .. ((math.random(2) == 1) and "Heads!" or "Tails!"), player(id,"x"), player(id,"y"))
end,
},
[231] = {
name = "dice",
desc = "1d6.",
r = 255, g = 192, b = 128,
action = "roll",
fimage = "gfx/weiwen/table.png",
fscalex = 0.5,
fscaley = 0.5,
func = function(id,itemslot,itemid)
if PLAYERS[id].tmp.exhaust.use then
return
end
PLAYERS[id].tmp.exhaust.use = true
timer(CONFIG.EXHAUST.USE, rem.useExhaust, id)
radiusmsg(player(id,"name") .. " rolls a " .. math.random(1, 6) .. ".", player(id,"x"), playerw(id,"y"))
end,
},
[300] = {
name = "leather helmet",
desc = "Protect yourself from headshots!",
r = 128, g = 64, b = 0,
action = "equip",
slot = 1,
eimage = "gfx/weiwen/helmet.png",
fimage = "gfx/weiwen/helmet.png",
def = 0.05,
speed = -1,
func = equip,
},
[301] = {
name = "leather torso",
desc = "A few holes here and there, but still usable.",
r = 128, g = 64, b = 0,
action = "equip",
slot = 2,
eimage = "gfx/weiwen/armour.png",
fimage = "gfx/weiwen/farmour.png",
def = 0.1,
speed = -1,
func = equip,
},
[302] = {
name = "leather legs",
plural = "pairs of leather legs",
article = "a pair of",
desc = "A few holes here and there, but still usable.",
r = 128, g = 64, b = 0,
action = "equip",
slot = 5,
fimage = "gfx/weiwen/legs.png",
def = 0.07,
speed = 1,
func = equip,
},
[303] = {
name = "leather boots",
plural = "pairs of leather boots",
article = "a pair of",
desc = "Waterproof.",
r = 128, g = 64, b = 0,
action = "equip",
slot = 6,
fimage = "gfx/weiwen/boots.png",
speed = 2,
func = equip,
},
[307] = {
name = "wooden crossbow",
desc = "It requires you to hold it with two hands.",
r = 128, g = 64, b = 0,
action = "equip",
slot = 3,
twohand = true,
eimage = "gfx/weiwen/bow.png",
fimage = "gfx/weiwen/bow.png",
offsety = 9,
equip = 34,
atk = 0.1,
speed = -2.5,
func = equip,
},
[320] = {
name = "bronze helmet",
r = 200, g = 100, b = 0,
action = "equip",
slot = 1,
eimage = "gfx/weiwen/helmet.png",
fimage = "gfx/weiwen/helmet.png",
def = 0.15,
speed = -1.3,
level = 15,
func = equip,
},
[321] = {
name = "bronze armour",
r = 200, g = 100, b = 0,
action = "equip",
slot = 2,
eimage = "gfx/weiwen/armour.png",
fimage = "gfx/weiwen/farmour.png",
def = 0.3,
speed = -1.3,
level = 15,
func = equip,
},
[322] = {
name = "bronze leggings",
plural = "pairs of bronze leggings",
article = "a pair of",
r = 200, g = 100, b = 0,
action = "equip",
slot = 5,
fimage = "gfx/weiwen/legs.png",
def = 0.2,
speed = -0.4,
level = 15,
func = equip,
},
[323] = {
name = "bronze boots",
plural = "pairs of bronze boots",
article = "a pair of",
r = 200, g = 100, b = 0,
action = "equip",
slot = 6,
fimage = "gfx/weiwen/boots.png",
def = 0.15,
speed = -0.4,
level = 15,
func = equip,
},
[400] = {
name = "brown horse",
desc = "You move faster with it, but are unable to attack with it. Your defence is also reduced significantly.",
r = 162, g = 107, b = 0,
action = "ride",
slot = 7,
ground = true,
fimage = "gfx/weiwen/horse.png",
eimage = "gfx/weiwen/horse.png",
speed = 20,
def = -0.5,
level = 10,
func = equip,
},
[1001] = {
name = "USP[lvl 1]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/usp_k.bmp",
offsety = 9,
equip = 1,
atk = 0.05,
speed = -2.4,
func = equip,
},
[1002] = {
name = "Glock[lvl 1]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/glock_k.bmp",
offsety = 9,
equip = 2,
atk = 0.06,
speed = -2.4,
func = equip,
},
[1003] = {
name = "Deagle[lvl 5]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/deagle_k.bmp",
offsety = 9,
equip = 3,
atk = 0.08
speed = -2.2,
func = equip,
level = 5,
},
[1003] = {
name = "Five-Seven[lvl 7]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/fiveseven_k.bmp",
offsety = 9,
equip = 3,
atk = 0.06,
func = equip,
level = 7,
},
[1004] = {
name = "UMP45[lvl 11]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/ump_k.bmp",
offsety = 9,
equip = 3,
atk = 0.05
speed = -2.5,
func = equip,
level = 11,
},
[1005] = {
name = "MP5[lvl 11]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/mp5_k.bmp",
offsety = 9,
equip = 3,
atk = 0.04
speed = -2.4,
func = equip,
level = 11,
},
[1006] = {
name = "TMP[lvl 11]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/tmp_k.bmp",
offsety = 9,
equip = 3,
atk = 0.02
func = equip,
level = 11,
speed = -2.2,
},
[1007] = {
name = "M4A1[lvl 17]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/m4a1_k.bmp",
offsety = 9,
equip = 3,
atk = 0.04
speed = -2.3,
func = equip,
level = 17,
},
[1008] = {
name = "AK-47[lvl 17]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/ak47_k.bmp",
offsety = 9,
equip = 3,
atk = 0.04
func = equip,
level = 17,
},
[1006] = {
name = "Galil[lvl 16]",
desc = "",
r = 0, g = 0, b = 0,
action = "equip",
slot = 3,
twohand = true,
fimage = "gfx/weapons/galil_k.bmp",
offsety = 9,
equip = 3,
atk = 0.01
speed = -2.3,
func = equip,
level = 16,
},
[1337] = {
name = 'money',
article = 'some',
r = 0, g = 150, b = 0,
fimage = 'gfx/weiwen/money.png',
}
}
for k, v in pairs(ITEMS) do
v.article = v.article or "a"
v.plural = v.plural or v.name .. "s"
v.action = type(v.action) == "table" and v.action or {v.action}
v.func = type(v.func) == "table" and v.func or {v.func}
end
How to repair it?
// After i removed speed in new items:
LUA ERROR: sys/lua/cs2dtibia/items.lua:615: '}' expected (to close '{' at line 604) near 'func'
edited 1×, last 22.04.11 10:55:15 am