Ir para conteúdo

tonynamoral

Visconde
  • Total de itens

    319
  • Registro em

  • Última visita

Tudo que tonynamoral postou

  1. fala ai galera , eu criei um script , ai eu fui tentar adicionar uma funçao que se tipo voce escreve o nome da magia , ai aparece numeradamente as magias script : porém , dps que eu adicionei isso , naum funfo mais o script e tbm nao deu bug no console , help please
  2. Olá galera , eu criei um cast system aqui , porém . se os outros tiverem assistindo o carinha , e o carinha morrer ou deslogar , os que tavam assistindo continuam assistindo. Então está aqui o sistema de cast.
  3. Viish slicer , o problem é que eu nao curto mt o otclient.
  4. Olá galera , eu estava conversando com um amigo ."Skyen Hasus". ai eu comentei pra ele sobre a barra de menu do PxG. akeles butoes flutuantes que fica no canto supeior esquerdo da tela. ai eu perguntei pra ele como fazia , ai ele falo que é usando o TibiaApi , e nao fazia ideia de como fazia o resto, entao eu gostaria de perguntar , se oque ele falo é certo. e como eu começaria 1 butao novo dentro do client,
  5. Eu estou tentando arrumar aqui , mais obrigado ai.
  6. [10/01/2013 12:05:36] [Error - Weapon Interface] [10/01/2013 12:05:36] data/weapons/scripts/wands.lua:onUseWeapon [10/01/2013 12:05:36] Description: [10/01/2013 12:05:36] (luaDoCombat) Combat not found
  7. Irei testar. [10/01/2013 10:09:21] [Error - Weapon Interface] [10/01/2013 10:09:21] data/weapons/scripts/wands.lua:onUseWeapon [10/01/2013 10:09:21] Description: [10/01/2013 10:09:21] (luaDoCombat) Combat not found
  8. Olá galera , eu gostaria de um sistema , que tipo . o player está usando uma wand e , ele tem 30% de mandar uma magia . exemplo : local wands = { [9812] = "exura", [1725] = "exori flam", } function onCombat(cid) if item.itemid = wands[getPlayerSlotItem(cid,6).itemid] then if math.random(1,100) <= 30 then doPlayerCastSpell(cid,wands[getPlayerSlotItem(cid,6).itemid] end return true end end Só um exemplo .
  9. fala ai galera , eu estou editando as sourcers para fazer o meus sistema de invisiblidade . porém , eu quero remover uma msg que fica em vermelho de quando fala /ghost vou postar o script aqui : Eu ja removi akela msg que fala You are now invisible , e talz . so falta fazer remover akela msg vermelha do console.
  10. Fala ai galera , eu to com outro script aqui que deu um errorzinho. se o ITEM for add = "none" ele nao funciona , poderiam me ajudar? script : local maxSkills = 100 local skillTable = { --[id do item] = id da skill, [2400] = {id = 0, count = 1, add = "none"}, -- Strenght [2404] = {id = 1, count = 3, add = "speed"}, -- Agility [2403] = {id = 2, count = 20, add = "health"}, -- Vitality [2402] = {id = 3, count = 15, add = "mana"}, -- Energy [2401] = {id = 4, count = 1, add = "none"}, -- Range [2405] = {id = 5, count = 1, add = "none"}, -- Defense } local function doPlayerSetSkill(pid, skill, amount) local player = getPlayerByGUID(pid) if isCreature(player) then doRemoveCreature(player, true) end db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";") return true end local function doPlayerSetMagic(pid, amount) local player = getPlayerByGUID(pid) if isCreature(player) then doRemoveCreature(player, true) end db.executeQuery("UPDATE `players` SET `maglevel` = " .. amount .. " WHERE `id` = "..pid) return true end function onTextEdit(cid, item, newText) local skillId = skillTable[item.itemid] if not skillId then return true end local guid = getPlayerGUID(cid) local points = getPlayerMagLevel(cid) local skill = getPlayerSkillLevel(cid, skillId.id) local value = tonumber(newText) if not value or value < 0 then doPlayerSendCancel(cid, "Por favor, insira um número válido.") return false elseif getPlayerInFight(cid) == 1 then doPlayerSendCancel(cid, "Você não pode estar em PZ.") return false elseif points < value then doPlayerSendCancel(cid, "Você não tem points suficientes.") return false elseif skill >= maxSkills then doPlayerSendCancel(cid, "Sua skill já está no máximo.") return false end local newValue = math.min(skill + value, maxSkills) if skillId.add == "none" then return false elseif skillId.add == "speed" then doChangeSpeed(cid, getCreatureSpeed(cid)+(value*skillId.count)) elseif skillId.add == "health" then setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+(value*skillId.count)) elseif skillId.add == "mana" then setCreatureMaxMana(cid, getCreatureMaxMana(cid)+(value*skillId.count)) end doPlayerSetSkill(guid, skillId.id, newValue) doPlayerSetMagic(guid, points - newValue + skill) return false end
  11. Fala ai galera , eu to com outro script aqui que deu um errorzinho. se o ITEM for add = "none" ele nao funciona , poderiam me ajudar? script : local maxSkills = 100 local skillTable = { --[id do item] = id da skill, [2400] = {id = 0, count = 1, add = "none"}, -- Strenght [2404] = {id = 1, count = 3, add = "speed"}, -- Agility [2403] = {id = 2, count = 20, add = "health"}, -- Vitality [2402] = {id = 3, count = 15, add = "mana"}, -- Energy [2401] = {id = 4, count = 1, add = "none"}, -- Range [2405] = {id = 5, count = 1, add = "none"}, -- Defense } local function doPlayerSetSkill(pid, skill, amount) local player = getPlayerByGUID(pid) if isCreature(player) then doRemoveCreature(player, true) end db.executeQuery("UPDATE `player_skills` SET `value` = ".. amount .." WHERE `player_id` = ".. pid .. " and `skillid` = ".. skill ..";") return true end local function doPlayerSetMagic(pid, amount) local player = getPlayerByGUID(pid) if isCreature(player) then doRemoveCreature(player, true) end db.executeQuery("UPDATE `players` SET `maglevel` = " .. amount .. " WHERE `id` = "..pid) return true end function onTextEdit(cid, item, newText) local skillId = skillTable[item.itemid] if not skillId then return true end local guid = getPlayerGUID(cid) local points = getPlayerMagLevel(cid) local skill = getPlayerSkillLevel(cid, skillId.id) local value = tonumber(newText) if not value or value < 0 then doPlayerSendCancel(cid, "Por favor, insira um número válido.") return false elseif getPlayerInFight(cid) == 1 then doPlayerSendCancel(cid, "Você não pode estar em PZ.") return false elseif points < value then doPlayerSendCancel(cid, "Você não tem points suficientes.") return false elseif skill >= maxSkills then doPlayerSendCancel(cid, "Sua skill já está no máximo.") return false end local newValue = math.min(skill + value, maxSkills) if skillId.add == "none" then return false elseif skillId.add == "speed" then doChangeSpeed(cid, getCreatureSpeed(cid)+(value*skillId.count)) elseif skillId.add == "health" then setCreatureMaxHealth(cid, getCreatureMaxHealth(cid)+(value*skillId.count)) elseif skillId.add == "mana" then setCreatureMaxMana(cid, getCreatureMaxMana(cid)+(value*skillId.count)) end doPlayerSetSkill(guid, skillId.id, newValue) doPlayerSetMagic(guid, points - newValue + skill) return false end
  12. assim ? local spellsb = { ["energy explosion"] = 2378, ["gale"] = 2385, ["twisting slash"] = 2376, ["elemental hits"] = 2377, ["meteor"] = 2382, } local spellsbids = {2390,2391,2392,2393,2394,2395,2396,2397,2398} function onTextEdit(cid,item,newText) for a = 1, #spellsbids do local texte = {"energy explosion","gale","twisting slash","elemental hits","meteor"} for b = 1, #texte do if not texte then doPlayerSendTextMessage(cid,27,"Spell dont exist.") return true end if item.itemid == spellsbids[a] then uid = spellsb[newText] doSendMagicEffect(getThingPos(cid),30) doTransformItem(item.uid, uid) end return true end return true end
  13. Fala ai galera , eu tenho 2 scripts de onTextEdit aki porém , quando eu criei o outro que ilhei apilidar de ² , quando eu ponho numeros para funcionar o script ¹ , o ² parece que trava ele script : local spellsb = { ["energy explosion"] = 2378, ["gale"] = 2385, ["twisting slash"] = 2376, ["elemental hits"] = 2377, ["meteor"] = 2382, } local spellsbids = {2390,2391,2392,2393,2394,2395,2396,2397,2398} function onTextEdit(cid,item,newText) for a = 1, #spellsbids do local texte = {"energy explosion","gale","twisting slash","elemental hits","meteor"} for b = 1, #texte do if not texte[b] then doPlayerSendTextMessage(cid,27,"Spell dont exist.") return true end if item.itemid == spellsbids[a] then uid = spellsb[newText] doSendMagicEffect(getThingPos(cid),30) doTransformItem(item.uid, uid) end end end Please HELP -- nenhum erro no distro
  14. Agora não está ritando '-' , e nao alterou nada.
  15. Vish , e agora que eu vi que deu erro? [07/01/2013 00:52:14] [Error - CreatureScript Interface] [07/01/2013 00:52:14] data/creaturescripts/scripts/oncombat.lua:onCombat [07/01/2013 00:52:14] Description: [07/01/2013 00:52:14] data/creaturescripts/scripts/oncombat.lua:2: attempt to compare number with nil [07/01/2013 00:52:14] stack traceback: [07/01/2013 00:52:14] data/creaturescripts/scripts/oncombat.lua:2: in function <data/creaturescripts/scripts/oncombat.lua:1> ??
  • Quem Está Navegando   0 membros estão online

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