nefinoo
Carnage.flv
Is there a way to cancel all the loot of all the monsters, and through a script do a custom loot for all or some specific monsters?
I am using Canary Repository
I am using Canary Repository
SolvedAugust 9 -> August 21.
I think instead change some loot, enter on each file and change name/id you will do it 10x faster than Want a script to overpass the loot for X monsters and give another loot.
If is not existing a solution,is different,but there is like i dont want to change some lines, lol.
Data/Monsters, use studio code search each monster, change id, ctrl+s , 1 Monster approx 30s if you know names/id if each items, remember , of you add, 3000 chance and you have X3 loot, = 9000 chance to loot this item.
Solved
function onKill(cid, target, lastHit)
local items = {{8300,10},{8305,5},{8306,5}} -- Item ID / Chance to loot
local exmonster = {"Rat","Bug"} -- Monsters that doesn't loot this item
local teste = 0
if isMonster(target) then
for i=1,#exmonster do
if getCreatureName(target) == exmonster[i] then
teste = 1
end
end
if teste == 0 then
for i=1,#items do
rand = math.random(1,100000)
if (items[i][2]) >= rand then
doPlayerAddItem(cid,items[i][1])
doPlayerSendTextMessage(cid, 25,"You found ".. getItemNameById(items[i][1])..".")
end
end
end
end
return true
end
<event type="kill" name="allMonstersLoot" event="script" value="allmonstersloot.lua"/>
registerCreatureEvent(cid, "allMonstersLoot")