function onKill(cid, target, damage, flags)
doPlayerAddItem(cid,1884,1)
doPlayerSendTextMessage(cid,21,"You just gained an item")
end
(cid,[COLOR="#FF0000"]1884[/COLOR],1)
Code:function onKill(cid, target, damage, flags) doPlayerAddItem(cid,1884,1) doPlayerSendTextMessage(cid,21,"You just gained an item") end
Just change the id of the item here
Code:(cid,[COLOR="#FF0000"]1884[/COLOR],1)
Rep will help me a lot![]()
<event type="kill" name="KR" event="script" value="killreward.lua"/>
registerCreatureEvent(cid, "KR")
local Cyko = {
Monster = "Demon",
Reward = 2160
}
function onKill(cid, target)
if (not isMonster(target)) then
return false
end
if getCreatureName(target) == Cyko.Monster then
doPlayerAddItem(cid, Cyko.Reward, 1)
end
return true
end
local Cyko = {
Monster = "Demon",
Monster2 = "Ferumbras",
Reward = 2160
}
function onKill(cid, target)
if (not isMonster(target)) then
return false
end
if getCreatureName(target) == Cyko.Monster and getCreatureName(target) == Cyko.Monster2 then
doPlayerAddItem(cid, Cyko.Reward, 1)
end
return true
end
local monster =
{
["Demon"] = {reward=2160,count=3}
}
function onKill(cid, target)
if (not isMonster(target)) then
return true
end
local v = monster[getCreatureName(target)]
if v then
doPlayerAddItem(cid, v.reward, v.count)
end
return true
end