Ir para conteúdo

SkyLigh

Lorde
  • Total de itens

    2183
  • Registro em

  • Última visita

  • Dias Ganhos

    23

Tudo que SkyLigh postou

  1. SkyLigh

    Level do fishing

    apenas removi a variável que é escolhido o level
  2. SkyLigh

    Level do fishing

    local fishing = { ["Magikarp"] = {skill = 0, level = -2}, --["Qwilfish"] = {skill = 18, level = 3}, --["Remoraid"] = {skill = 16, level = 2}, ["Staryu"] = {skill = 22, level = 6}, ["Tentacool"] = {skill = 20, level = 7}, ["Goldeen"] = {skill = 17, level = 5}, ["Krabby"] = {skill = 14, level = 2}, ["Horsea"] = {skill = 16, level = 3}, ["Poliwag"] = {skill = 15, level = 2}, --["Marill"] = {skill = 21, level = 3}, --["Azumarill"] = {skill = 37, level = 16}, ["Kingler"] = {skill = 35, level = 14}, ["Seaking"] = {skill = 28, level = 11}, ["Starmie"] = {skill = 49, level = 20}, --["Chinchou"] = {skill = 23, level = 6}, ["Poliwhirl"] = {skill = 27, level = 9}, ["Seadra"] = {skill = 41, level = 15}, --["Lanturn"] = {skill = 38, level = 14}, --["Octillery"] = {skill = 30, level = 9}, --["Corsola"] = {skill = 46, level = 16}, } local storage = 15458 local bonus = 1 local function doFish(cid, pos, ppos, chance, interval, number) if not isCreature(cid) then return false end if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then return false end if getPlayerStorageValue(cid, storage) ~= number then return false end doSendMagicEffect(pos, CONST_ME_LOSEENERGY) local peixe = 0 local playerpos = getClosestFreeTile(cid, getThingPos(cid)) local level = 1 local fishes = {} local randomfish = "" if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus) end for a, b in pairs (fishing) do if getPlayerSkillLevel(cid, 6) >= b.skill then table.insert(fishes, a) end end if math.random(1, 100) <= chance then if getPlayerSkillLevel(cid, 6) < limite and math.random(1, 100) <= 30 then --30 = 30% chance de add fishing doPlayerAddSkillTry(cid, 6, bonus) end randomfish = fishes[math.random(#fishes)] level = getPlayerSkillLevel(cid, 6) / 3 level = level + getPlayerLevel(cid) / 5 level = math.random(level * 0.6, level) level = level + fishing[randomfish].level peixe = doSummonCreature(randomfish, playerpos) if level <= 0 then level = math.random(getPlayerLevel(cid)) end if not isCreature(peixe) then addEvent(doFish, interval, cid, pos, ppos, chance, interval, number) return true end setWildPokemonLevel(peixe, level) doSetMonsterPassive(peixe) doWildAttackPlayer(peixe, cid) if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 173) doChallengeCreature(getCreatureSummons(cid)[1], peixe) else doSendMagicEffect(getThingPos(cid), 173) doChallengeCreature(cid, peixe) end return true end addEvent(doFish, interval, cid, pos, ppos, chance, interval, number) return true end local waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825} function onUse(cid, item, fromPos, itemEx, toPos) if getPlayerGroupId(cid) == 11 then return true end local checkPos = toPos checkPos.stackpos = 0 if getTileThingByPos(checkPos).itemid <= 0 then doPlayerSendCancel(cid, '!') return true end if not isInArray(waters, getTileInfo(toPos).itemid) then return true end if (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) and not canFishWhileSurfingOrFlying then doPlayerSendCancel(cid, "Você não pode pescar enquanto está surfando ou voando.") return true end if isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then doPlayerSendCancel(cid, "Você não pode pescar enquanto estiver surfando ou voando acima da água.") return true end if getTileInfo(getThingPos(getCreatureSummons(cid)[1] or cid)).protection then doPlayerSendCancel(cid, "Você não pode pescar pokémons se você ou seu pokémon está em zona de protecção.") return true end if not tonumber(getPlayerStorageValue(cid, storage)) then local test = io.open("data/sendtobrun123.txt", "a+") local read = "" if test then read = test:read("*all") test:close() end read = read.."\n[fishing.lua] "..getCreatureName(cid).." - "..getPlayerStorageValue(cid, storage).."" local reopen = io.open("data/sendtobrun123.txt", "w") reopen:write(read) reopen:close() setPlayerStorageValue(cid, storage, 1) end setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage) + 1) if getPlayerStorageValue(cid, storage) >= 800 then setPlayerStorageValue(cid, storage, 1) end local delay = 3500 - getPlayerSkillLevel(cid, 6) * 25 local chance = 10 + getPlayerSkillLevel(cid, 6) / 2.5 doFish(cid, toPos, getThingPos(cid), chance, delay, getPlayerStorageValue(cid, storage)) return true end
  3. Tamanho: 1000x276 (Logo site) Tema: Naruto Pedido: Logo para o site Tipografia: Naruto Shinobi Online(Fonte do naruto) O fundo seria transparente da logo?
  4. --[[ 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 veja agora
  5. function onKill(cid, target, lasthit) local questcreatures = { ["dwarf"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15000, killsrequired = 100, raceName = "dwarfs"}, ["dwarf soldier"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15001, killsrequired = 100, raceName = "dwarfs"}, ["dwarf guard"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15002, killsrequired = 100, raceName = "dwarfs"}, ["dwarf geomancer"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15003, killsrequired = 100, raceName = "dwarfs"}, ["dwarf emperor"] = {questStarted = 1510, questStorage = 65000, creatureStorage = 15004, killsrequired = 100, raceName = "dwarfs"}, ["goblin"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15007, killsrequired = 150, raceName = "goblins"}, ["goblin assassin"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15008, killsrequired = 150, raceName = "goblins"}, ["goblin leader"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15009, killsrequired = 150, raceName = "goblins"}, ["goblin scavenger"] = {questStarted = 1511, questStorage = 65001, creatureStorage = 15010, killsrequired = 150, raceName = "goblins"}, ["rotworm"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15011, killsrequired = 300, raceName = "rotworms"}, ["carrion worm"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15012, killsrequired = 300, raceName = "rotworms"}, ["rotworm queen"] = {questStarted = 1512, questStorage = 65002, creatureStorage = 15067, killsrequired = 300, raceName = "rotworms"}, ["cyclops"] = {questStarted = 1513, questStorage = 65003, creatureStorage = 15013, killsrequired = 500, raceName = "cyclops"}, ["cyclops Smith"] = {questStarted = 1513, questStorage = 65003, creatureStorage = 15014, killsrequired = 500, raceName = "cyclops"}, ["cyclops drone"] = {questStarted = 1513, questStorage = 65003, creatureStorage = 15015, killsrequired = 500, raceName = "cyclops"}, ["crocodile"] = {questStarted = 1514, questStorage = 65004, creatureStorage = 15016, killsrequired = 300, raceName = "crocodiles"}, ["tarantula"] = {questStarted = 1515, questStorage = 65005, creatureStorage = 15017, killsrequired = 300, raceName = "tarantulas"}, ["amazon"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15018, killsrequired = 150, raceName = "amazons or valkirias"}, ["valkyrie"] = {questStarted = 1516, questStorage = 65006, creatureStorage = 15005, killsrequired = 150, raceName = "amazons or valkirias"}, ["stone golem"] = {questStarted = 1517, questStorage = 65007, creatureStorage = 15019, killsrequired = 200, raceName = "Stone golems"}, ["vampire"] = {questStarted = 1518, questStorage = 65008, creatureStorage = 15020, killsrequired = 300, raceName = "vampires"}, ["Infernalist"] = {questStarted = 1519, questStorage = 65009, creatureStorage = 15021, killsrequired = 1000, raceName = "Infernalists"}, ["Infernalist vip"] = {questStarted = 1519, questStorage = 65009, creatureStorage = 15043, killsrequired = 1000, raceName = "Infernalists"}, ["quara predator scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15022, killsrequired = 300, raceName = "quaras Scout"}, ["quara constrictor scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15023, killsrequired = 300, raceName = "quaras Scout"}, ["quara hydromancer scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15024, killsrequired = 300, raceName = "quaras Scout"}, ["quara mantassin scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15025, killsrequired = 300, raceName = "quaras Scout"}, ["quara pincher scout"] = {questStarted = 1520, questStorage = 65010, creatureStorage = 15026, killsrequired = 300, raceName = "quaras Scout"}, ["quara predator"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15027, killsrequired = 300, raceName = "quaras"}, ["quara constrictor"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15028, killsrequired = 300, raceName = "quaras"}, ["quara hydromancer"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15029, killsrequired = 300, raceName = "quaras"}, ["quara mantassin"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15030, killsrequired = 300, raceName = "quaras"}, ["quara pincher"] = {questStarted = 1521, questStorage = 65011, creatureStorage = 15031, killsrequired = 300, raceName = "quaras"}, ["water elemental"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15032, killsrequired = 70, raceName = "water elementals"}, ["roaring water elemental"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15033, killsrequired = 70, raceName = "water elementals"}, ["Slick water elemental"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15034, killsrequired = 70, raceName = "water elementals"}, ["massive water elemental"] = {questStarted = 1522, questStorage = 65012, creatureStorage = 15035, killsrequired = 70, raceName = "water elementals"}, ["hellspawn"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15036, killsrequired = 750, raceName = "hellspawns"}, ["hellspawn vip"] = {questStarted = 1523, questStorage = 65013, creatureStorage = 15082, killsrequired = 750, raceName = "hellspawns"}, ["frost dragon"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15040, killsrequired = 3000, raceName = "frost dragons"}, ["castle frost dragon"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15081, killsrequired = 3000, raceName = "frost dragons"}, ["frost dragon vip"] = {questStarted = 1524, questStorage = 65014, creatureStorage = 15041, killsrequired = 3000, raceName = "frost dragons"}, ["hellfire fighter"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15044, killsrequired = 1000, raceName = "hellfire/massive fire elemetals"}, ["blazing fire elemental"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15045, killsrequired = 1000, raceName = "hellfire/massive fire elemetals"}, ["blistering fire elemental"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15046, killsrequired = 1000, raceName = "hellfire/massive fire elemetals"}, ["massive fire elemental"] = {questStarted = 1525, questStorage = 65015, creatureStorage = 15047, killsrequired = 1000, raceName = "hellfire/massive fire elemetals"}, ["mutated rat"] = {questStarted = 1526, questStorage = 65016, creatureStorage = 15048, killsrequired = 200, raceName = "mutated rats"}, ["giant spider"] = {questStarted = 1527, questStorage = 65017, creatureStorage = 15049, killsrequired = 500, raceName = "giant Spiders"}, ["hydra"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15050, killsrequired = 2000, raceName = "hydras"}, ["hydra vip"] = {questStarted = 1528, questStorage = 65018, creatureStorage = 15065, killsrequired = 2000, raceName = "hydras"}, ["fury"] = {questStarted = 1529, questStorage = 65019, creatureStorage = 15051, killsrequired = 2000, raceName = "furys"}, ["fury vip"] = {questStarted = 1529, questStorage = 65019, creatureStorage = 15042, killsrequired = 2000, raceName = "furys"}, ["behemoth"] = {questStarted = 1530, questStorage = 65020, creatureStorage = 15052, killsrequired = 2000, raceName = "behemoths"}, ["behemoth vip"] = {questStarted = 1530, questStorage = 65020, creatureStorage = 15077, killsrequired = 2000, raceName = "behemoths"}, ["serpent spawn"] = {questStarted = 1531, questStorage = 65021, creatureStorage = 15053, killsrequired = 1500, raceName = "Serpents Spawn"}, ["green djinn"] = {questStarted = 1532, questStorage = 65022, creatureStorage = 15054, killsrequired = 500, raceName = "green djinns"}, ["efreet"] = {questStarted = 1532, questStorage = 65022, creatureStorage = 15055, killsrequired = 500, raceName = "green djinns"}, ["blue djinn"] = {questStarted = 1533, questStorage = 65023, creatureStorage = 15056, killsrequired = 500, raceName = "blue djinns"}, ["marid"] = {questStarted = 1533, questStorage = 65023, creatureStorage = 15057, killsrequired = 500, raceName = "blue djinns"}, ["pirate buccaneer"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15058, killsrequired = 3000, raceName = "pirates"}, ["pirate corsair"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15059, killsrequired = 3000, raceName = "pirates"}, ["pirate cutthroat"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15060, killsrequired = 3000, raceName = "pirates"}, ["pirate ghost"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15061, killsrequired = 3000, raceName = "pirates"}, ["pirate marauder"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15062, killsrequired = 3000, raceName = "pirates"}, ["pirate Skeleton"] = {questStarted = 1534, questStorage = 65024, creatureStorage = 15063, killsrequired = 3000, raceName = "pirates"}, ["son of verminor"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15064, killsrequired = 3000, raceName = "Son of verminor"}, ["castle son of verminor"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15080, killsrequired = 3000, raceName = "Son of verminor"}, ["son of verminor vip"] = {questStarted = 1535, questStorage = 65025, creatureStorage = 15066, killsrequired = 3000, raceName = "Son of verminor"}, ["defiler"] = {questStarted = 1536, questStorage = 65026, creatureStorage = 15070, killsrequired = 5000, raceName = "defilers"}, ["defiler vip"] = {questStarted = 1536, questStorage = 65026, creatureStorage = 15083, killsrequired = 5000, raceName = "defilers"}, ["grim reaper"] = {questStarted = 1537, questStorage = 65027, creatureStorage = 15071, killsrequired = 10000, raceName = "grim reapers"}, ["grim reaper vip"] = {questStarted = 1537, questStorage = 65027, creatureStorage = 15072, killsrequired = 10000, raceName = "grim reapers"}, ["castle grim reaper"] = {questStarted = 1537, questStorage = 65027, creatureStorage = 15078, killsrequired = 10000, raceName = "grim reapers"}, ["undead dragon"] = {questStarted = 1538, questStorage = 65028, creatureStorage = 15073, killsrequired = 3000, raceName = "undead dragons"}, ["undead dragon vip"] = {questStarted = 1538, questStorage = 65028, creatureStorage = 15074, killsrequired = 3000, raceName = "undead dragons"}, ["demon"] = {questStarted = 1539, questStorage = 65029, creatureStorage = 15075, killsrequired = 6666, raceName = "demons"}, ["castle demon"] = {questStarted = 1539, questStorage = 65029, creatureStorage = 15079, killsrequired = 6666, raceName = "demons"}, ["demon vip"] = {questStarted = 1539, questStorage = 65029, creatureStorage = 15076, killsrequired = 6666, raceName = "demons"} } if creature then if(isplayer(target) == true) then return true end if getplayerStoragevalue(cid, creature.questStarted) > 0 then if getplayerStoragevalue(cid, creature.questStorage) < creature.killsrequired then if getplayerStoragevalue(cid, creature.questStorage) < 0 then doplayerSetStoragevalue(cid, creature.questStorage, 0) end if getplayerStoragevalue(cid, creature.creatureStorage) < 0 then doplayerSetStoragevalue(cid, creature.creatureStorage, 0) end doplayerSetStoragevalue(cid, creature.questStorage, getplayerStoragevalue(cid, creature.questStorage) + 1) doplayerSetStoragevalue(cid, creature.creatureStorage, getplayerStoragevalue(cid, creature.creatureStorage) + 1) doplayerSendtextmessage(cid, meSSage_StatuS_cONSOLe_bLue, "" .. getplayerStoragevalue(cid, creature.creatureStorage) .. " " .. getcreatureName(target) .. " defeated. total [" .. getplayerStoragevalue(cid, creature.questStorage) .. "/" .. creature.killsrequired .. "] " .. creature.raceName .. ".") end end end return true end tente assim
  6. 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
  7. Tamanho: 400x200 Tema: Filmes (de sua escolha) Pedido: assinatura Tipografia: SEM TIPOGRAFIA
  8. Movido para seção de resolvidos.
  9. Movido para seção de resolvidos.
  10. Movido para seção de resolvidos.
  11. O código é de sua autoria? caso contrario coloque os créditos ao dono.
  12. 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...
  13. lhe recomendo a server soft tem bons preços dê uma olhada lá
  14. não tem ideia de mais ou menos o tamanho? ou é o tamanho da imagem que você citou?
  15. Ficou muito legal a edição do wallpaper parabéns.
  16. Ficou bem legal os dois, mostra como estava o wallpaper antes da sua edição.
  17. Movido para seção de resolvidos.
  18. 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.
  • Quem Está Navegando   0 membros estão online

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