Maxwel1
Legend Of Everything
i got problem with that script and i wish someone help me not like always no one helps.
i always try alot b4 asking for a problem but still no one answer so please any help
the errors:
[12/02/2009 19:36:40] Lua Script Error: [CreatureScript Interface]
[12/02/2009 19:36:40] data/creaturescripts/scripts/reward.luanPrepareDeath
Thanks
Yours: Lion
Code:
function onPrepareDeath(cid, killer)
--broadcastMessage(getCreatureName(killer).." killed "..getCreatureName(cid), 18)
onKill(killer, cid)
end
function onKill(cid, target)
if isPlayer(cid) == TRUE then
killer = getCreatureName(cid)
name = getCreatureName(target)
lvl = getPlayerLevel(target)
if lvl > 100 and lvl < 500 then
loot = 5807
elseif lvl > 499 and lvl < 1000 then
loot = 5806
elseif lvl > 999 then
loot = 5805
else
loot = 5807
end
item = doPlayerAddItem(cid, loot, 1)
doSetItemSpecialDescription(item,"It was awarded to "..getCreatureName(cid).." at level "..getPlayerLevel(cid).." for killing "..getCreatureName(target).." at level "..getPlayerLevel(target)..".")
doPlayerSendTextMessage(killer, 22, "You killed "..name..".")
end
end
i always try alot b4 asking for a problem but still no one answer so please any help
the errors:
[12/02/2009 19:36:40] Lua Script Error: [CreatureScript Interface]
[12/02/2009 19:36:40] data/creaturescripts/scripts/reward.luanPrepareDeath
Thanks
Yours: Lion