Ir para conteúdo

SkyLigh

Lorde
  • Total de itens

    2183
  • Registro em

  • Última visita

  • Dias Ganhos

    23

Tudo que SkyLigh postou

  1. tente assim --[[ PERFECT UPGRADE SYSTEM 2.0 Criado por Oneshot É proibido a venda ou a cópia sem os devidos créditos desse script. ]]-- UpgradeHandler = { levels = { [1] = {90, false, false}, [2] = {80, false, false}, [3] = {70, false, false}, [4] = {60, true, false}, [5] = {40, true, true} }, broadcast = 8, attributes = { ["attack"] = 1, ["defense"] = 1, ["armor"] = 1 }, message = { console = "Trying to refine %s to level +%s with %s%% success rate.", success = "You have upgraded %s to level +%s", fail = "You have failed in upgrade of %s to level +%s", downgrade = "The upgrade level of %s has downgraded to +%s", erase = "The upgrade level of %s has been erased.", maxlevel = "The targeted %s is already on max upgrade level.", notupgradeable = "This item is not upgradeable.", broadcast = "The player %s was successful in upgrading %s to level +%s.\nCongratulations!!", invalidtool = "This is not a valid upgrade tool.", toolrange = "This upgrade tool can only be used in items with level between +%s and +%s" }, tools = { [8306] = {range = {0, 10}, info = {chance = 0, removeable = true}}, [8300] = {range = {0, 10}, info = {chance = 0, removeable = true}}, }, isEquipment = function(self) local weaponType = self:getItemWeaponType() return ((weaponType > 0 and weaponType < 7) or self.item.armor ~= 0) end, setItemName = function(self, name) return doItemSetAttribute(self.item.uid, "name", name) end, chance = function(self) local chances = {} chances.upgrade = (self.levels[self.item.level + 1][1] or 100) chances.downgrade = (self.item.level * 5) chances.erase = (self.item.level * 3) return chances end } function UpgradeHandler:new(item) local obj, ret = {} obj.item = {} obj.item.level = 0 obj.item.uid = item.uid for key, value in pairs(getItemInfo(item.itemid)) do obj.item[key] = value end ret = setmetatable(obj, {__index = function(self, index) if _G[index] then return (setmetatable({callback = _G[index]}, {__call = function(self, ...) return self.callback(item.uid, ...) end})) else return UpgradeHandler[index] end end}) if ret:isEquipment() then ret:update() return ret end return false end function UpgradeHandler:update() self.item.level = (tonumber(self:getItemName():match("%+(%d+)")) or 0) end function UpgradeHandler:refine(uid, item) if not self.item then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.notupgradeable) return "miss" end local tool = self.tools[item.itemid] if(tool == nil) then doPlayerSendTextMessage(uid, MESSAGE_EVENT_DEFAULT, self.message.invalidtool) return "miss" end if(self.item.level > #self.levels) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.maxlevel:format(self.item.name)) return "miss" end if(self.item.level < tool.range[1] or self.item.level >= tool.range[2]) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_RED, self.message.toolrange:format(unpack(tool.range))) return "miss" end local chance = (self:chance().upgrade + tool.info.chance) doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, self.message.console:format(self.item.name, (self.item.level + 1), math.min(100, chance))) if(tool.info.removeable == true) then doRemoveItem(item.uid, 1) end if chance * 100 > math.random(1, 10000) then doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_ORANGE, self.message.success:format(self.item.name, (self.item.level + 1))) if (self.item.level + 1) >= self.broadcast then doBroadcastMessage(self.message.broadcast:format(getCreatureName(uid), self.item.name, (self.item.level + 1))) end self:setItemName((self.item.level > 0 and self:getItemName():gsub("%+(%d+)", "+".. (self.item.level + 1)) or (self:getItemName() .." +1"))) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, (self.item.level > 0 and getItemAttribute(self.item.uid, key) or self.item[key]) + value) end end return "success" else if item.itemid == 8300 then if self.item.level < 0 then self:setItemName(self:getItemName():gsub("%+(%d+)", "")) for key, value in pairs(self.attributes) do if getItemAttribute(self.item.uid, key) ~= nil or self.item[key] ~= 0 then doItemSetAttribute(self.item.uid, key, getItemAttribute(self.item.uid, key) - self.item.level * value) end end end else doRemoveItem(self.item.uid, 1) end doPlayerSendTextMessage(uid, MESSAGE_STATUS_CONSOLE_BLUE, item.itemid == 8300 and "Your item level has been reseted." or "You have broken your item while trying to upgrade it.") end end
  2. Movido para seção de resolvidos.
  3. Tamanho: 400x200 Tema: Filmes (de sua escolha) Pedido: assinatura Tipografia: SEM TIPOGRAFIA
  4. Movido para seção de resolvidos.
  5. Movido para seção de resolvidos.
  6. Movido para seção de resolvidos.
  7. Movido para seção de resolvidos.
  8. O código é de sua autoria? caso contrario coloque os créditos ao dono.
  9. Nunca vai existir um produto grátis quando aparece é trial pra você testar 1 ou 2 dias ou você tem que chamar no minimo 10 pessoas para cê cadastrarem no site da tal empresa...
  10. lhe recomendo a server soft tem bons preços dê uma olhada lá
  11. não tem ideia de mais ou menos o tamanho? ou é o tamanho da imagem que você citou?
  12. Ficou muito legal a edição do wallpaper parabéns.
  13. Ficou bem legal os dois, mostra como estava o wallpaper antes da sua edição.
  14. vou vê cê consigo abrç
  15. Movido para seção de resolvidos.
  16. Vá em pasta do seu ot/data/creaturescripts/scripts e abre o seguinte arquivo GuildFragsKill.lua e poste o código que tem dentro aqui.
  17. Estou trazendo um script simples e muito legal, o que ele faz? O SCRIPT FUNCIONA DA SEGUINTE MANEIRA : O player clica no item ao clicar ele vai tê a chance de ganhar 3 items (Ou mais basta você adicionar). Então vamos configura-lo ao seu servidor, Vá em data/actions/scripts e crie um arquivo.lua chamada sorteio.lua e adicione o seguinte código dentro. function onUse(cid, item, fromPosition, itemEx, toPosition) local sorteio = {2160, 2159, 2157} --- items do sorteio local level = 100 --- level necessário para utilizar o item if getPlayerLevel(cid) >= level then if item.itemid == ID DO ITEM then ------ ID DO ITEM QUE VAI UTILIZAR doRemoveItem(item.uid,1) local sorteiostatus = getPlayerStorageValue(cid, 5967) doPlayerSendTextMessage(cid, 22 , "Parabéns você ganhou o item do sorteio") doPlayerAddItem(cid, sorteio[math.random(1, #sorteio)], 1) doSendMagicEffect(getThingPos(cid), 29) setPlayerStorageValue(cid, 5967 ,1) else doPlayerSendCancel(cid,'Somente levels 100+ conseguem abrir este bau.') end return true end end Apos isso vá em actions.xml e adicione a seguinte tag dentro. <action itemid="ID DO ITEM QUE VAI UTILIZAR" script="sorteio.lua"/> Lembre-se de configurar o script com suas escolhas, como os id's do item sorteado,o id do item que vai cê utilizado e etc... Qualquer dúvida só comentarem no tópico.
  18. Fica dando que a distro parou de funcionar? cê for estou com o mesmo problema troquei a distro e parou mais não cê essa é a verdadeira solução.
  19. OBS : EDITEI UM ERRO QUE HAVIA NA RENDER
  20. Na nota do warning está escrito : Alertado por criar uma segunda conta para auto reputar-se. Cê ele deu essa alerta deve tê verificado os ip's da conta não tenho permissão pra isso, o daniel está em viajem espere ele voltar ou um superior lhe responder.
  21. Movido para seção de resolvidos.
  22. Movido para seção de resolvidos.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...