• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Lua Frag Reward problem

dunnish

New Member
Joined
Jun 18, 2009
Messages
277
Solutions
1
Reaction score
3
Hello!

im trying to build an war ot with some bots from geisor.
and frag reward from noobwar.eu like if you kill someone you will get rewarded with marijuana.
but the problem is that the botters also get the same reward when they shuddent.
frag reward script.
Code:
function onKill(cid, target, lastHit)
local items = {5953}
       if isPlayer(cid) and isPlayer(target) and getPlayerLevel(target) >= 13 then
               for _, item in ipairs(items) do
                        if(cid ~= 59432) then
                       doPlayerAddItem(cid, item, 1)
                       doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Congratulations! You killed " .. getCreatureName(target) .. ".")
                       end
              end
end
      return true
end

death script.

Code:
local reward = {
    item = 5953, --ITEM ID!
    count = 1 -- How many?
}
function onDeath(cid, corpse, deathList)
    for i = 1, #deathList do
        if isPlayer(deathList[i]) and getPlayerIp(cid) ~= getPlayerIp(deathList[i]) then
            doPlayerAddItem(deathList[i], reward.item, reward.count)
        end
    end
    return true
end



if i misst something just tell me.
thx for help.
 
What are botters? If they are monsters, I can't see why they would be getting rewarded in the scripts you posted.

I can however see that if a player kills a "botter" and the botter has that onDeath script registered, the player will get rewarded for killing said botter.
 
Back
Top