Tenho um scripting (mais precisamente um mod) de elo que recebe de acordo com seu frag. Queria saber se uma alma bondosa poderia me ajudar a adicionar bônus de acordo com o titulo que a pessoa tem.
Exemplo: Titulo Calamidade +5 de ML
Titulo Lord Demônio +10 de ML
e etc
Segue o mod:
Citar<?xml version = "1.0" encoding = "UTF-8"?>
<mod name = "Military Ranks" version = "1.0" author = "Teckman" enabled = "yes">
<config name = "ranks"><![CDATA[
titles = {
[5] = "F",
[10] = "E",
[15] = "D",
[20] = "C",
[30] = "C+",
[40] = "C++",
[55] = "B",
[70] = "B+",
[90] = "B++",
[110] = "A",
[150] = "A+",
[200] = "A++",
[300] = "S",
[350] = "SS",
[400] = "SSS",
[500] = "Nacional",
[600] = "Continental",
[700] = "Mundial",
[800] = "Catastrofe",
[900] = "Demon Lord",
[950] = "Great Demon Lord",
[1000] = "Ragnarok"
}
fragsStorage = 600
]]></config>
<event type = "look" name = "ranksLook" event = "script"><![CDATA[
domodlib("ranks")
function onLook(cid, thing, position, lookDistance)
if(isPlayer(thing.uid)) then
local rank = {rank = "Insignificante", frags = 0}
for k, v in pairs(titles) do
if(math.max(0, getPlayerStorageValue(thing.uid, fragsStorage)) > k - 1) then
if(k - 1 > rank.frags) then
rank.rank, rank.frags = v, k - 1
end
end
end
doPlayerSetSpecialDescription(thing.uid, "\n Rank: " .. rank.rank)
end
return true
end
]]></event>
<event type = "kill" name = "ranksKill" event = "script"><![CDATA[
domodlib("ranks")
function onKill(cid, target)
if(isPlayer(target)) then
setPlayerStorageValue(cid, fragsStorage, math.max(0, getPlayerStorageValue(cid, fragsStorage) + 1))
if(titles[getPlayerStorageValue(cid, fragsStorage)]) then
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You advanced to rank: " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. ". Congratulations " .. titles[getPlayerStorageValue(cid, fragsStorage)] .. "!")
end
end
return true
end
]]></event>
<event type = "login" name = "ranksLogin" event = "script"><![CDATA[
function onLogin(cid)
registerCreatureEvent(cid, "ranksKill")
registerCreatureEvent(cid, "ranksLook")
return true
end
]]></event>
</mod>