antiblock
Cyphriun
  • Chatbox

    Did you check out our Discord? https://discord.gg/FFdvMjk9xA
    You don't have permission to chat.
    Load More
Sign in to follow this  
SINOLOGY

Alterar Lua Drop Sistema

2 posts in this topic

Tenho este sistema a funcionar por ID do mob da tabela mob_proto.
Seria possível alterar para pegar no locale_name da tabela mob_proto em vez do ID?

 

dofile("/usr/home/game/share/locale/germany/droplist.lua")


function drop(self)
if dropList[self].typ == "limit" then
if dropList[self].min_level == nil or dropList[self].max_level == nil then return end
if dropList[self].min_level > pc.level or dropList[self].max_level < pc.level then return end
local chance,count
table.foreach(dropList[self].dropps, function(i)
if dropList[self].dropps[i][3] ~= nil then
chance = dropList[self].dropps[i][3]
else
chance = 100
end
if dropList[self].dropps[i][2] ~= nil then
count = dropList[self].dropps[i][2]
else
count = 1
end
if math.random(1, 100) < chance then
game.drop_item_with_ownership(dropList[self].dropps[i][1], count)
end
end)
elseif dropList[self].typ == "drop" then
local chance,count
table.foreach(dropList[self].dropps, function(i)
if dropList[self].dropps[i][3] ~= nil then
chance = dropList[self].dropps[i][3]
else
chance = 100
end
if dropList[self].dropps[i][2] ~= nil then
count = dropList[self].dropps[i][2]
else
count = 1
end
if math.random(1, 100) < chance then
game.drop_item_with_ownership(dropList[self].dropps[i][1], count)
end
end)
else
return
end
end

 

Share this post


Link to post
Share on other sites
antiblock
https://arwen2.global/

Tópico Fechado e Movido para a Lixeira do Forum.

 

Cumprimentos.

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this