Hello. I'm new on this forum but i enjoyed it. I think u can help me cuz there are many good scripters
I'v got problem with my NoobWar server.
When i do fire fields and die on them server gives me item. Pls solve this bug! ;D
fragrewards.lua
Also check my skull.lua When i die on fire field server doesn't count frag but maybe its wrong anyway.
skulls.lua
BUT WHERE ARE MY SKULLS ;D? I SEE ONLY GUILD EMBLEMS. If you want i can give you IP and u can test it. I'll be online on 9 PM (polish time)
ALSO I GOT ERROR : Invalid password
Ok i created acc, now i login on it and choose account manager and this error appears. I use sha1 enc.
I'v got problem with my NoobWar server.
When i do fire fields and die on them server gives me item. Pls solve this bug! ;D
fragrewards.lua
Lua:
function onDeath(cid, corpse, deathList)
local reward = {
item = 11197,
count = 1
}
for i = 1, #deathList do
if isPlayer(cid) and isPlayer(deathList[i]) then
if getPlayerIp(cid) ~= getPlayerIp(deathList[i]) then
if getPlayerItemCount(deathList[i], reward.item) > 0 then
local item = getPlayerItemById(deathList[i], true, reward.item)
if item.type >= ITEMCOUNT_MAX then
doPlayerAddItem(deathList[i], reward.item, reward.count)
doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
else
doTransformItem(item.uid, reward.item, item.type + 1)
doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
end
else
doPlayerAddItem(deathList[i], reward.item, reward.count)
doCreatureSetStorage(deathList[i], 20233, getPlayerStorageValue(deathList[i], 20233)+1)
doSendAnimatedText(getPlayerPosition(deathList[i]), "Frag!", TEXTCOLOR_RED)
end
else
doPlayerSendTextMessage(deathList[i], 18, "You didn't get frag/reward because of killing a player with same ip.")
end
return true
end
Also check my skull.lua When i die on fire field server doesn't count frag but maybe its wrong anyway.
skulls.lua
Lua:
local storage = 20233
local reward = {
item = 11197,
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
end
if getPlayerItemCount(cid, reward.item) > 0 then
local item = getPlayerItemById(cid, true, reward.item)
if item.type >= 100 then
doPlayerAddItem(cid, reward.item, reward.count)
else
doTransformItem(item.uid, reward.item, item.type + 1)
end
else
doPlayerAddItem(cid, reward.item, reward.count)
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
BUT WHERE ARE MY SKULLS ;D? I SEE ONLY GUILD EMBLEMS. If you want i can give you IP and u can test it. I'll be online on 9 PM (polish time)
ALSO I GOT ERROR : Invalid password
Ok i created acc, now i login on it and choose account manager and this error appears. I use sha1 enc.
Last edited by a moderator: