Teddy
SweStream.se
Hello i use this script from http://otland.net/f82/reputation-killing-monsters-players-47993/
and i got this error (and when i kill a monster its not die its stay at (0hp) no xp no corpse only a monster whitout hp and they dont move..)
can some help me
rep+
Code:
function onKill(cid, target)
-- Config --
local storage = 666 -- Storage value of the script.
local script =
{
name = getCreatureName(target), -- Do not edit.
how_check = getPlayerStorageValue(cid,999), -- Do not edit.
killed = getPlayerStorageValue(cid,storage), -- Do not edit.
skull_check = getCreatureSkullType(target) -- Do not edit.
}
local monsters =
{
["Rat"] = {points = 1},
["Demon"] = {points = 5},
["Ferumbras"] = {points = 100},
}
local points = monsters[script.name].points
local pointss = script.killed + points
local msg = "You have now ".. pointss .." points."
local msg_monster = "You have slain ".. script.name .." and you get ".. points .." reputation point." -- Standard message for killing monster you can edit this.
local tbl = monsters[script.name]
-- Script --
if(not tbl) then
return TRUE
end
if(tbl) and isMonster(target) == TRUE then
setPlayerStorageValue(cid, storage,script.killed + points)
doPlayerSendTextMessage(cid,22,msg_monster)
doPlayerSendTextMessage(cid,23,msg)
return TRUE
end
return TRUE
end
and i got this error (and when i kill a monster its not die its stay at (0hp) no xp no corpse only a monster whitout hp and they dont move..)
Code:
[23:15:45.176] [Error - CreatureScript Interface]
[23:15:45.176] data/creaturescripts/scripts/reputation from monsters.lua:onKill
[23:15:45.192] Description:
[23:15:45.192] ...creaturescripts/scripts/reputation from monsters.lua:16: attem
pt to index field '?' (a nil value)
[23:15:45.192] stack traceback:
[23:15:45.192] ...creaturescripts/scripts/reputation from monsters.lua:16: in f
unction <...creaturescripts/scripts/reputation from monsters.lua:1>
can some help me