Ir para conteúdo

DouGlaS Mapper

Membro
  • Registro em

  • Última visita

Tudo que DouGlaS Mapper postou

  1. @Ramon RBN Ok agora nem um erro, só que ele só ta somando o amulet e o helmet dnv kkkkkk
  2. @Ramon RBN Hoje nãoooo kkkkk /12/2019 12:49:46] [Error - CreatureScript Interface] [5/12/2019 12:49:46] data/creaturescripts/scripts/fraglook.lua:onLook [5/12/2019 12:49:46] Description: [5/12/2019 12:49:46] data/creaturescripts/scripts/fraglook.lua:7: attempt to compare number with nil [5/12/2019 12:49:46] stack traceback: [5/12/2019 12:49:46] data/creaturescripts/scripts/fraglook.lua:7: in function 'getDodge' [5/12/2019 12:49:46] data/creaturescripts/scripts/fraglook.lua:52: in function <data/creaturescripts/scripts/fraglook.lua:47>
  3. @Ramon RBN Rapaz esse negocio não é de deus n kkkkk [5/12/2019 12:43:44] [Error - CreatureScript Interface] [5/12/2019 12:43:44] data/creaturescripts/scripts/fraglook.lua:onLook [5/12/2019 12:43:44] Description: [5/12/2019 12:43:44] data/creaturescripts/scripts/fraglook.lua:7: attempt to compare number with boolean [5/12/2019 12:43:44] stack traceback: [5/12/2019 12:43:44] data/creaturescripts/scripts/fraglook.lua:7: in function 'getDodge' [5/12/2019 12:43:44] data/creaturescripts/scripts/fraglook.lua:52: in function <data/creaturescripts/scripts/fraglook.lua:47>
  4. @Ramon RBN [5/12/2019 12:34:1] [Error - CreatureScript Interface] [5/12/2019 12:34:1] data/creaturescripts/scripts/fraglook.lua:onLook [5/12/2019 12:34:1] Description: [5/12/2019 12:34:1] (LuaInterface::luaGetItemAttribute) Item not found
  5. @Ramon RBN Aconteceu a mesma coisa: [5/12/2019 12:24:48] [Error - CreatureScript Interface] [5/12/2019 12:24:48] data/creaturescripts/scripts/fraglook.lua:onLook [5/12/2019 12:24:48] Description: [5/12/2019 12:24:48] (LuaInterface::luaGetItemAttribute) Item not found
  6. @Ramon RBN Mostrando 0% de dodge no look e erro na distro quando da look: [5/12/2019 12:20:26] [Error - CreatureScript Interface] [5/12/2019 12:20:26] data/creaturescripts/scripts/fraglook.lua:onLook [5/12/2019 12:20:26] Description: [5/12/2019 12:20:26] (LuaInterface::luaGetPlayerSlotItem) Player not found
  7. @Ramon RBN Agora n aparece nada quando da look e da esse erro na distro kkkkk [5/12/2019 12:14:12] [Error - CreatureScript Interface] [5/12/2019 12:14:12] data/creaturescripts/scripts/fraglook.lua:onLook [5/12/2019 12:14:12] Description: [5/12/2019 12:14:12] data/creaturescripts/scripts/fraglook.lua:5: attempt to index global 'item' (a number value) [5/12/2019 12:14:12] stack traceback: [5/12/2019 12:14:12] data/creaturescripts/scripts/fraglook.lua:5: in function 'getDodge' [5/12/2019 12:14:12] data/creaturescripts/scripts/fraglook.lua:49: in function <data/creaturescripts/scripts/fraglook.lua:44>
  8. @Ramon RBN Nem uma delas foi kkkk ambas mostram o dodge 0 no look e da esse ero na distro quando do look: [5/12/2019 11:56:46] [Error - CreatureScript Interface] [5/12/2019 11:56:46] data/creaturescripts/scripts/fraglook.lua:onLook [5/12/2019 11:56:46] Description: [5/12/2019 11:56:46] (LuaInterface::luaGetItemAttribute) Item not found
  9. @Ramon RBN Essa: function isHandItem(uid) -- NW based on Mock uid = uid or 0 if isInArray({1,2,3,4,5,6}, getItemWeaponType(uid)) then return true end return false end function getItemDodgePercent(itemuid) return getItemAttribute(itemuid, "dodgePercent") or 0 end function setItemDodgePercent(uid, percent) doItemSetAttribute(uid, "description", "[Dodge: "..percent.."%]") doItemSetAttribute(uid, "dodgePercent", percent) end function onUse(cid, item, fromPosition, itemEx, toPosition) dodge = 0 local upgrade = { [1] = {min = 1, max = 5, chance = 100}, [2] = {min = 5, max = 10, chance = 80}, [3] = {min = 10, max = 20, chance = 60}, [4] = {min = 25, max = 35, chance = 40}, [5] = {min = 35, max = 50, chance = 20} } function isWearing(uid) -- NW based on Mock uid = uid or 0 if isInArray({uid}, getPlayerSlotItem(cid, 1).uid) or isInArray({uid}, -- HELMET -- getPlayerSlotItem(cid, 2).uid) or isInArray({uid}, -- Aol -- getPlayerSlotItem(cid, 4).uid) or isInArray({uid}, -- ARMOR -- getPlayerSlotItem(cid, 9).uid) or isInArray({uid}, -- RING -- getPlayerSlotItem(cid, 7).uid) or isInArray({uid}, -- LEGS -- getPlayerSlotItem(cid, 8).uid) then -- BOOTS -- return true end return false end if isHandItem(itemEx.uid) or isWearing(itemEx.uid) then local name = getItemName(itemEx.uid) local atual = math.floor(getItemDodgePercent(itemEx.uid)*10)/10 for i = 1, #upgrade do if string.find(tostring(name),"Dodge: " .. i .."") then dodge = i end end if dodge >= #upgrade then doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"Este item ja esta no maximo de Dodge possivel!") return true end if math.random(0,100) <= upgrade[dodge + 1].chance then doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"Sucesso ao usar sua Dodge Stone!") setItemDodgePercent(itemEx.uid, atual + (math.random(upgrade[dodge+1].min,upgrade[dodge+1].max))/10) doItemSetAttribute(itemEx.uid,'name', getItemNameById(itemEx.itemid)..' [Dodge: ' ..dodge+1 .."/5]") doSendMagicEffect(toPosition, math.random(28,30)) else doRemoveItem(item.uid, 1) doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE,"Sua Dodge Stone Falhou :(") doSendMagicEffect(toPosition, 4) end else doPlayerSendTextMessage(cid, 24,"You cant refine this item.") end return true end
  10. @Ramon RBN SIM - You see a steel helmet [Dodge: 5/5] (Arm:6). It weighs 46.00 oz. [Dodge: 5%] - You see a brass armor [Dodge: 3/5] (Arm:8). It weighs 80.00 oz. [Dodge: 1.6%] - You see brass legs [Dodge: 4/5] (Arm:5). It weighs 38.00 oz. [Dodge: 2.5%] - You see leather boots [Dodge: 5/5] (Arm:1). It weighs 9.00 oz. [Dodge: 8.1%] - You see a beholder shield [Dodge: 4/5] (Def:28). It weighs 47.00 oz. [Dodge: 2.8%] - You see a scarf [Dodge: 2/5] (Arm:1). It weighs 2.00 oz. [Dodge: 1%] - You see a crystal ring [Dodge: 2/5]. It weighs 0.90 oz. [Dodge: 0.7%] Oque ta aparecendo no LOOK: nPosition: [X:157] [Y:51] [Z:7]. [Frags: 0], [Critical: 200/200], [Dodge: 6%] - No caso ele somo o do helmet e amulet só
  11. @Ramon RBN Funcionou, porém ele n ta somando o total de todos items e mostrando a soma no look, ele só ta pegando de 1 item e mostrando o total desse unico item
  12. @Ramon RBN function getDodge(cid) local total = 0 for i = 1, 10 do local item = getPlayerSlotItem(cid, i) total = total + (getItemAttribute(item.uid, "dodgePercent") or 0) end return total end function getPlayerFrags(cid) local time = os.time() local times = {today = (time - 86400), week = (time - (7 * 86400))} local contents, result = {day = {}, week = {}, month = {}}, db.getResult("SELECT `pd`.`date`, `pd`.`level`, `p`.`name` FROM `player_killers` pk LEFT JOIN `killers` k ON `pk`.`kill_id` = `k`.`id` LEFT JOIN `player_deaths` pd ON `k`.`death_id` = `pd`.`id` LEFT JOIN `players` p ON `pd`.`player_id` = `p`.`id` WHERE `pk`.`player_id` = " .. getPlayerGUID(cid) .. " AND `k`.`unjustified` = 1 AND `pd`.`date` >= " .. (time - (30 * 86400)) .. " ORDER BY `pd`.`date` DESC") if(result:getID() ~= -1) then repeat local content = {date = result:getDataInt("date")} if(content.date > times.today) then table.insert(contents.day, content) elseif(content.date > times.week) then table.insert(contents.week, content) else table.insert(contents.month, content) end until not result:next() result:free() end local size = { day = table.maxn(contents.day), week = table.maxn(contents.week), month = table.maxn(contents.month) } return (size.day + size.week + size.month) or 0 end function onLogin(cid) registerCreatureEvent(cid, "fraglook") return true end function onLook(cid, thing, position, lookDistance) if isPlayer(thing.uid) and thing.uid ~= cid then doPlayerSetSpecialDescription(thing.uid,' [Frags: ' .. getPlayerFrags(thing.uid) .. '], [Critical: '..math.max(0,(tonumber(getCreatureStorage(thing.uid,48903)) or 0))..'/200], [Dodge: ' ..getDodge(cid).. '%].') return true elseif thing.uid == cid then doPlayerSetSpecialDescription(cid,' [Frags: ' .. getPlayerFrags(thing.uid) .. '], [Critical: '..math.max(0,(tonumber(getCreatureStorage(cid,48903)) or 0))..'/200], string = string..' [Dodge: ' ..getDodge(cid).. %']' local string = 'You see yourself.' if getPlayerFlagValue(cid, PLAYERFLAG_SHOWGROUPINSTEADOFVOCATION) then string = string..' You are '.. getPlayerGroupName(cid) ..'.' elseif getPlayerVocation(cid) ~= 0 then string = string..' You are '.. getPlayerVocationName(cid) ..'.' else string = string..' You have no vocation.' end if getPlayerGuildId(cid) > 0 then string = string..' You are ' .. (getPlayerGuildRank(cid) == '' and 'a member' or getPlayerGuildRank(cid)) ..' of the '.. getPlayerGuildName(cid) string = getPlayerGuildNick(cid) ~= '' and string..' ('.. getPlayerGuildNick(cid) ..').' or string..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEECREATUREDETAILS) then string = string..'nHealth: ['.. getCreatureHealth(cid) ..' / '.. getCreatureMaxHealth(cid) ..'], Mana: ['.. getCreatureMana(cid) ..' / '.. getCreatureMaxMana(cid) ..'].' string = string..'nIP: '.. doConvertIntegerToIp(getPlayerIp(cid)) ..'.' end if getPlayerFlagValue(cid, PLAYERCUSTOMFLAG_CANSEEPOSITION) then string = string..'nPosition: [X:'.. position.x..'] [Y:'.. position.y..'] [Z:'.. position.z..'].' end string = string..getPlayerSpecialDescription(cid)..'' doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, string) return false end return true end
  13. @Ramon RBN [5/12/2019 11:4:49] >>> Loading creaturescripts... [Error - LuaInterface::loadFile] data/creaturescripts/scripts/fraglook.lua:47: ')' expected near '[' [5/12/2019 11:4:49] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/fraglook.lua) [5/12/2019 11:4:49] data/creaturescripts/scripts/fraglook.lua:47: ')' expected near '[' [5/12/2019 11:4:49] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/fraglook.lua:47: ')' expected near '[' [5/12/2019 11:4:49] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/fraglook.lua) [5/12/2019 11:4:49] data/creaturescripts/scripts/fraglook.lua:47: ')' expected near '['
  14. @Ramon RBN deu erro /2019 10:47:7] >>> Loading creaturescripts... [Error - LuaInterface::loadFile] data/creaturescripts/scripts/fraglook.lua:47: ')' expected near 'string' [5/12/2019 10:47:7] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/fraglook.lua) [5/12/2019 10:47:7] data/creaturescripts/scripts/fraglook.lua:47: ')' expected near 'string' [5/12/2019 10:47:8] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/fraglook.lua:47: ')' expected near 'string' [5/12/2019 10:47:8] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/fraglook.lua) [5/12/2019 10:47:8] data/creaturescripts/scripts/fraglook.lua:47: ')' expected near 'string' linha 47: doPlayerSetSpecialDescription(cid,' [Frags: ' .. getPlayerFrags(thing.uid) .. '], [Critical: '..math.max(0,(tonumber(getCreatureStorage(cid,48903)) or 0))..'/200], 'string = string..' [Dodge: ' ..getDodge(cid).. '%].')
  15. @Ramon RBN Ta dando o mesmo erro ainda ;/ [4/12/2019 22:7:34] >>> Loading creaturescripts... [Error - LuaInterface::loadFile] data/creaturescripts/scripts/fraglook.lua:46: ')' expected near 'string' [4/12/2019 22:7:34] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/fraglook.lua) [4/12/2019 22:7:34] data/creaturescripts/scripts/fraglook.lua:46: ')' expected near 'string' [4/12/2019 22:7:34] [Error - LuaInterface::loadFile] data/creaturescripts/scripts/fraglook.lua:46: ')' expected near 'string' [4/12/2019 22:7:34] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/fraglook.lua) [4/12/2019 22:7:34] data/creaturescripts/scripts/fraglook.lua:46: ')' expected near 'string'
  16. @Ramon RBN agora deu esse erro: >>> Loading creaturescripts... [Error - Event::checkScript] Event onLogin not found (data/creaturescripts/scripts/fraglook.lua) e não aparecer nada quando do look no personagem e da esse erro na distro quando do look: [Error - CreatureScript Interface] [4/12/2019 18:12:10] data/creaturescripts/scripts/fraglook.lua:onLook [4/12/2019 18:12:10] Description: [4/12/2019 18:12:10] data/creaturescripts/scripts/fraglook.lua:6: attempt to call global 'getPlayerFrags' (a nil value) [4/12/2019 18:12:10] stack traceback: [4/12/2019 18:12:10] data/creaturescripts/scripts/fraglook.lua:6: in function <data/creaturescripts/scripts/fraglook.lua:1>
  17. @Ramon RBN doPlayerSetSpecialDescription(cid,' [Frags: ' .. getPlayerFrags(thing.uid) .. '], [Critical: '..math.max(0,(tonumber(getCreatureStorage(cid,48903)) or 0))..'/200],' string = string..' [Dodge: ' ..getDodge(cid).. '%]')
  18. @Ramon RBN agora ta dando outro erro kkkkk [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/fraglook.lua) data/creaturescripts/scripts/fraglook.lua:46: ')' expected near 'string'
  19. @Ramon RBN Ta dando o seguinte erro: [Error - LuaInterface::loadFile] data/creaturescripts/scripts/fraglook.lua:1: unexpected symbol near 'then'
  20. @Ramon RBN amulet, ring, helmet, armor, legs, shield e a boots Os unicos que n vai ter é a arma e a backpack
  21. @Nolis REP + Obrigado manooooo salvo a patria kkkkk' O unico problema é que meu server é exp alta ai ele buga e sai a porcentagem do hp e mana ;/
  22. Galera to com um probleminha aki pra por meu dodge no look, tipo meu sistema de dodge é por item, ai queria que ele somasse o total de dodge que o player tem equipado e mostrasse no look, só que ele n tem storage, n faço ideia de como por ele no look, se alguém puder ajudar REP +. OBS: Já olhei um outro tópico porém n funcionou só deu erro ;/ OTX 2.6 VERSAO 8.6 Meu Sistema de Dodge: Meu Sistema de LOOK:
  23. @JoviM Vc leu minha mente, eu ia falar como que faz pra por um efeito quando o critical falha, eu tentei por aki mais cada vez que mecho eu bugo mais a script ;/ Ah mano deculpa é que eu sou meio perdido com script to aprendendo ainda kkkk Eu tinha colocado fora do on login por isso do erro, agora ta funcionando certinho obg REP +

Informação Importante

Confirmação de Termo