matthew4321
Mapper
- Joined
- Jan 19, 2011
- Messages
- 91
- Reaction score
- 4
Code:
local chance = 200 -- 1% * rateLoot
local t, r = {
{ {x=32876, y=31707, z=2}, {x=32985, y=31807, z=6} },
{ {x=32886, y=31727, z=8}, {x=32993, y=31806, z=9} },
{ {x=32891, y=31751, z=7}, {x=32990, y=31796, z=7} },
{ {x=32905, y=31797, z=7}, {x=32978, y=31804, z=7} },
{ {x=32951, y=31714, z=7}, {x=32987, y=31750, z=7} },
{ {x=32972, y=31704, z=7}, {x=32987, y=31713, z=7} },
{ {x=32889, y=31749, z=7}, {x=32893, y=31753, z=7} },
{ {x=32908, y=31749, z=7}, {x=32912, y=31750, z=7} },
{ {x=32929, y=31749, z=7}, {x=32933, y=31750, z=7} },
{ {x=32889, y=31770, z=7}, {x=32890, y=31774, z=7} },
{ {x=32889, y=31793, z=7}, {x=32893, y=31797, z=7} },
{ {x=32903, y=31802, z=7}, {x=32907, y=31806, z=7} },
{ {x=32937, y=31805, z=7}, {x=32941, y=31806, z=7} },
{ {x=32974, y=31805, z=7}, {x=32978, y=31806, z=7} }
}, getConfigValue('rateLoot')
function onDeath(cid, corpse)
if math.random(100000) <= chance * r and isInArray({cid, nil}, getCreatureMaster(cid)) then
local p = getThingPos(cid)
for i = 1, #t do
if isInRange(p, t[i][1], t[i][2]) then
doAddContainerItem(corpse.uid, 3960)
break
end
end
end
return true
end
could someone please convert this to tfs 1.2 thanks in advance