Indenpedens
Banned User
Hello 
This is fragment of Sam's Old Backpack Quest namely loot a backpack from orc in Orc Fortress area
so go to data\creaturescripts\scripts and create file bp.lua and paste this
now in creaturescripts.xml paste
then data\monster\Orcs open orc.xml and add this under </flags>
notice: This area script is for 8.42 Orc fortess and 8.6+ Orc Fortess is a little bigger so u can edit area of looting
This is fragment of Sam's Old Backpack Quest namely loot a backpack from orc in Orc Fortress area
so go to data\creaturescripts\scripts and create file bp.lua and paste this
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
now in creaturescripts.xml paste
Code:
<event type="death" name="bp" event="script" value="bp.lua"/>
then data\monster\Orcs open orc.xml and add this under </flags>
Code:
<script>
<event name="bp"/>
</script>
notice: This area script is for 8.42 Orc fortess and 8.6+ Orc Fortess is a little bigger so u can edit area of looting
Last edited: