Jordan_August
New Member
- Joined
- Jul 24, 2012
- Messages
- 122
- Reaction score
- 4
For the love of god could someone please hook me up with a kill reward script that actually works. i have tried every onkill/ondeath kill reward script on these forums and nothing works. yes they do reward the given id; However the killer a player with same ip never works. I need it to not give the kill reward to the person with the same ip. I am using 0.3.6 Please and Thank you in advance.
I have two different script that i have tried to modify over and over again and neither will work:
Script One:
and script two:
I have two different script that i have tried to modify over and over again and neither will work:
Script One:
Code:
local storage = 20233
local reward = {
item = 2159,
count = 1
}
function onKill(cid, target, flags, damage)
if isPlayer(target) then
if getPlayerIp(cid) ~= getPlayerIp(target) then
local frags = math.max(0, getPlayerStorageValue(cid, storage))
doCreatureSetStorage(cid, storage, frags+1)
if(frags >= 5000) then
doCreatureSetGuildEmblem(cid, EMBLEM_RED)
elseif(frags >= 1500) then
doCreatureSetGuildEmblem(cid, EMBLEM_BLUE)
elseif(frags >= 250) then
doCreatureSetGuildEmblem(cid, EMBLEM_GREEN)
end
doSendAnimatedText(getPlayerPosition(cid), "Frag!", TEXTCOLOR_RED)
else
doPlayerSendTextMessage(cid, 18, "You didn't get frag/reward because of killing a player with same ip.")
end
return true
end
and script two:
Code:
function onKill(cid, target, lastHit)
if cid ~= target and isPlayer(target) then
if getPlayerIp(cid) == getPlayerIp(target) then
doCreatureAddHealth(cid, -200)
doPlayerAddExperience(cid, -171352)
doCreatureAddMana(cid, -200)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'You have been punished for killing a player of the same IP.')
else
doPlayerAddItem(cid, 2159, 1)
setPlayerStorageValue(cid, 6776, getCreatureStorage(cid, 6776) + 1)
end
end
return true
end
Last edited: