straher
???
- Joined
- Mar 23, 2010
- Messages
- 255
- Reaction score
- 3
mam taki oto fragreward, ale ten pierun nie chce dzialac
wpis do creatureevents.xml jest
+ po co ten storydż:
powinno zwracac ilosc zabitych
Lua:
function onDeath(cid, corpse, deathList)
local reward = {
item = 5944,
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)
doPlayerAddItem(cid, 2151, 1)
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)
doPlayerAddItem(cid, 2151, 1)
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
end
end
return true
end
wpis do creatureevents.xml jest
+ po co ten storydż:
Lua:
function onLook(cid, thing, position, lookDistance)
if isPlayer(thing.uid) then
doPlayerSetSpecialDescription(thing.uid, ". \n Frags: "..math.max(0, getPlayerStorageValue(thing.uid, 20233)))
end
return true
end
powinno zwracac ilosc zabitych
Last edited: