Ir para conteúdo

Pedro.

Membro
  • Registro em

  • Última visita

Tudo que Pedro. postou

  1. poste aqui sua config.lua em spoiler pfv.
  2. no /r subistitui. function onSay(player, words, param) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then player:sendCancelMessage("You don't has permission to do this action.") return false end local position = player:getPosition() position:getNextPosition(player:getDirection()) local tile = Tile(position) if not tile then player:sendCancelMessage("Object not found.") return false end local thing = tile:getTopVisibleThing(player) if not thing then player:sendCancelMessage("Thing not found.") return false end if thing:isCreature() then thing:remove() end position:sendMagicEffect(CONST_ME_MAGIC_RED) return false end e no /s function onSay(player, words, param) if not player:getGroup():getAccess() then return true end if player:getAccountType() < ACCOUNT_TYPE_GOD then player:sendCancelMessage("You don't has permission to do this action.") return false end local orig = player:getPosition() local npc = Game.createNpc(param, orig) if npc then orig:sendMagicEffect(CONST_ME_MAGIC_RED) npc:setMasterPos(orig) else player:sendCancelMessage("There is not enough room.") orig:sendMagicEffect(CONST_ME_POFF) end return false end
  3. seu servidor é mysql?
  4. sim, deveria tá on. Tag adicionada, abraços
  5. Pedro. postou uma resposta no tópico em Eventos de Mapping
    Ok, irei fazer. A foto tem que ser tirada in game?
  6. Pedro. postou uma resposta no tópico em Eventos de Mapping
    eu desafio você, qual será o tema?
  7. no seu config.lua o worldid tá qto?
  8. Pedro. postou uma resposta no tópico em Suporte Tibia OTServer
    tenho uma vps em linux parada, me manda pm que eu te empresto.
  9. Bom, estou usando um sistema de pontos, em modalwindow, porém a parte de upar os skills não está funcionando como deveria. No caso quando voce usa do first, club,sword,axe ele upa apenas alguns %. Já o magic, ele upa normal. creaturescripts.xml: <event type="modalwindow" name="skillPoints_modal" script="sp.lua"/> <event type="advance" name="skillPoints_advance" script="sp.lua"/> <event type="login" name="skillPoints_register" script="sp.lua"/> sp.lua Creaturescript talkactions.xml: <talkaction words="!points" script="sp.lua"/> sp.lua Talkaction function onSay(player, words, param) player:sendSkillPointsWindow() return false end sp.lua Lib
  10. Irei aproveitar o tópico, já resolvi o outro porém pra não criar outro, resolvi postar aqui mesmo. O seguinte, to com um sistema de pontos por skill, o player upa um level e ganha um ponto, pra adiciona [skill,ml,mana,life] O problema é que mana/life funciona, já as skills não. Alguém sabe me dizer porque? TFS 1.1 local function addSkills(player, skillId) player:addSkillTries(skillId, math.ceil(player:getVocation():getRequiredSkillTries(skill, player:getSkillLevel(skill) + 1) / configManager.getNumber(configKeys.RATE_SKILL))) return false end local skillids = { ["shield"] = SKILL_SHIELD, ["sword"] = SKILL_SWORD, ["axe"] = SKILL_AXE, ["club"] = SKILL_CLUB, ["fist"] = SKILL_FIST, ["dist"] = SKILL_DISTANCE } local attributes = { ["health"] = {reqPoints = 1, increaseBy = 2, name = "Hit Points"}, ["mana"] = {reqPoints = 1, increaseBy = 2, name = "Mana Points"}, ["magic"] = {reqPoints = 15, increaseBy = 1, name = "Magic Level"}, ["shielding"] = {reqPoints = 15, increaseBy = 1, name = "Shielding Skill"}, ["sword"] = {reqPoints = 15, increaseBy = 1, name = "Sword Skill"}, ["axe"] = {reqPoints = 15, increaseBy = 1, name = "Axe Skill"}, ["club"] = {reqPoints = 15, increaseBy = 1, name = "Club Skill"}, ["fist"] = {reqPoints = 15, increaseBy = 1, name = "Fist Skill"}, ["distance"] = {reqPoints = 15, increaseBy = 1, name = "Distance Skill"}, } function onModalWindow(player, modalWindowId, buttonId, choiceId) local SKILL_POINTS = 14574 --- Change here the storage value used to save the skill points local points = player:getStorageValue(SKILL_POINTS) local function sendCancel() player:sendTextMessage(MESSAGE_INFO_DESCR, "You do not have the required amount of Skill Points!") end local function doAddHealth(param, attributes) player:setMaxHealth(player:getMaxHealth() + attributes["health"].increaseBy*param) player:addHealth(attributes["health"].increaseBy*param) player:setStorageValue(SKILL_POINTS, points - attributes["health"].reqPoints*param) player:sendTextMessage(MESSAGE_INFO_DESCR, "You have gained " ..attributes["health"].increaseBy.. " " ..attributes["health"].name.. "!") return true end local function doAddMana(param, attributes) player:setMaxMana(player:getMaxMana() + attributes["mana"].increaseBy*param) player:addMana(attributes["mana"].increaseBy*param) player:setStorageValue(SKILL_POINTS, points - attributes["mana"].reqPoints*param) player:sendTextMessage(MESSAGE_INFO_DESCR, "You have gained " ..attributes["mana"].increaseBy.. " " ..attributes["mana"].name.. "!") return true end if (not modalWindowId == 1) or (buttonId == 4) then return false end if choiceId == 1 then if buttonId == 1 then if points >= attributes["health"].reqPoints then doAddHealth(1, attributes) else sendCancel() end end if buttonId == 2 then if points >= attributes["health"].reqPoints*2 then doAddHealth(2, attributes) else sendCancel() end end if buttonId == 3 then if points >= attributes["health"].reqPoints*5 then doAddHealth(5, attributes) else sendCancel() end end end if choiceId == 2 then if buttonId == 1 then if points >= attributes["mana"].reqPoints then doAddMana(1, attributes) else sendCancel() end end if buttonId == 2 then if points >= attributes["mana"].reqPoints*2 then doAddMana(2, attributes) else sendCancel() end end if buttonId == 3 then if points >= attributes["mana"].reqPoints*5 then doAddMana(5, attributes) else sendCancel() end end end if choiceId == 3 then if buttonId == 1 then if points >= attributes["magic"].reqPoints then player:addManaSpent(math.ceil(player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1) / configManager.getNumber(configKeys.RATE_MAGIC))) player:setStorageValue(SKILL_POINTS, points - attributes["magic"].reqPoints) else sendCancel() end end if buttonId == 2 then if points >= attributes["magic"].reqPoints*2 then for i = 1,2 do player:addManaSpent(math.ceil(player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1) / configManager.getNumber(configKeys.RATE_MAGIC))) player:setStorageValue(SKILL_POINTS, points - attributes["magic"].reqPoints) end else sendCancel() end end if buttonId == 3 then if points >= attributes["magic"].reqPoints*5 then for i = 1,5 do player:addManaSpent(math.ceil(player:getVocation():getRequiredManaSpent(player:getBaseMagicLevel() + 1) / configManager.getNumber(configKeys.RATE_MAGIC))) player:setStorageValue(SKILL_POINTS, points - attributes["magic"].reqPoints) end else sendCancel() end end end if choiceId == 4 then if buttonId == 1 then if points >= attributes["sword"].reqPoints then addSkills(player, skillids["sword"]) end end if buttonId == 2 then if points >= attributes["sword"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["sword"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["sword"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["sword"]) end else sendCancel() end end end if choiceId == 5 then if buttonId == 1 then if points >= attributes["axe"].reqPoints then addSkills(player, skillids["axe"]) end else sendCancel() end if buttonId == 2 then if points >= attributes["axe"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["axe"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["axe"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["axe"]) end else sendCancel() end end end if choiceId == 6 then if buttonId == 1 then if points >= attributes["club"].reqPoints then addSkills(player, skillids["club"]) end else sendCancel() end if buttonId == 2 then if points >= attributes["club"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["club"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["club"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["club"]) end else sendCancel() end end end if choiceId == 7 then if buttonId == 1 then if points >= attributes["shielding"].reqPoints then addSkills(player, skillids["shield"]) end else sendCancel() end if buttonId == 2 then if points >= attributes["shielding"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["shield"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["shielding"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["shield"]) end else sendCancel() end end end if choiceId == 8 then if buttonId == 1 then if points >= attributes["distance"].reqPoints then addSkills(player, skillids["dist"]) end else sendCancel() end if buttonId == 2 then if points >= attributes["distance"].reqPoints*2 then for i = 1,2 do addSkills(player, skillids["dist"]) end else sendCancel() end end if buttonId == 3 then if points >= attributes["distance"].reqPoints*5 then for i = 1,5 do addSkills(player, skillids["dist"]) end else sendCancel() end end end end local SkillPoints = { [1] = 1, [2] = 1, [3] = 1, [4] = 1, [5] = 1, [6] = 1, [7] = 1, [8] = 1, } function onAdvance(player, skill, oldlevel, newlevel) local cid = player:getId() if not (SkillPoints[getPlayerVocation(cid)]) then return true end if (skill == 8) then if (getPlayerStorageValue(cid, 14573) < newlevel) then if (getPlayerStorageValue(cid, 14574) < 0) then setPlayerStorageValue(cid, 14574, 0) setPlayerStorageValue(cid, 14573, 0) end setPlayerStorageValue(cid, 14573, newlevel) setPlayerStorageValue(cid, 14574, getPlayerStorageValue(cid, 14574) + (newlevel - oldlevel) * (SkillPoints[getPlayerVocation(cid)])) doCreatureSay(cid, '+1 Skill Point!', TALKTYPE_MONSTER_SAY) end end return true end up up
  11. Agora funcionou perfeitamente, obrigado. Você é top !
  12. Acontece o seguinte, quando o player não tem level 50+ aparece mensagem e tudo certinho, já quando o player tem dá o seguinte erro. Lua Script Error: [TalkAction Interface] data/talkactions/scripts/give_me_rewards.lua:onSay data/talkactions/scripts/give_me_rewards.lua:16: attempt to compare boolean with number stack traceback: [C]: in function '__le' data/talkactions/scripts/give_me_rewards.lua:16: in function <data/talka ctions/scripts/give_me_rewards.lua:9>
  13. deu um erro aqui, [Warning - Event::checkScript] Can not load script: scripts/give_me_rewards. data/talkactions/scripts/give_me_rewards.lua:18: unexpected symbol near '['
  14. não consegue por, level pra usar o comando? gostaria de utilizar pra outra coisa..
  15. Pedro. postou uma resposta no tópico em Suporte Tibia OTServer
    o que tem a ver as tags terem separador? foi a unica coisa que ele modificou, sendo que os erros são funções que não tem no server ;s
  16. Pedro. postou uma resposta no tópico em Suporte Tibia OTServer
    não entendi?
  17. Pedro. postou uma resposta no tópico em Suporte Tibia OTServer
    Up
  18. Pedro. postou uma resposta no tópico em Suporte Tibia OTServer
    bom, achei um script aqui mesmo no tk bem interessante de auto loot, eu já vi um para 1.0 porém não funciona, e tem que adicionar tag em todos monstros pra funcionar [tosco] Bom, eu modifiquei bastante coisas nesse script, algumas funções eu tive que adicionar no global etc, porém cheguei numa parte que não to conseguindo modificar, que é o addevent e o getcontaineriteminfo. Gostaria da ajuda dos pros ai script; creturescript; talkactions; TAGS; <talkaction words="!autoloot" separator=" " script="autoloot.lua" /> <event type="kill" name="AutoLoot" script="Autoloot.lua"/>
  19. desculpe pela demora, estava no quartel, testei aqui e funcionou perfeitamente, obrigado
  20. Olá, gostaria de uma ajudinha aqui, eu tenho um npc e não to conseguindo adicionar, um "back" para ele voltar para o templo. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end function onThink() npcHandler:onThink() end local cfg = { toPos = {x=964, y=1025, z=14}, level = 1, Storage = 25747 } function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid local player = Player(cid) if msgcontains(msg, 'bosses') then selfSay('There are some undead below, you agree to be teleported there?', cid) talkState[talkUser] = 1 elseif talkState[talkUser] == 1 then if msgcontains(msg, 'yes') then if player:getStorageValue(cfg.Storage) > 0 then selfSay('You\'ve done it.', cid) return FALSE end if getPlayerLevel(cid) >= cfg.level then doTeleportThing(cid, cfg.toPos) talkState[talkUser] = 0 else selfSay('Only players level ' ..cfg.level.. ' can pass.', cid) end end if msgcontains(msg, 'no') and talkState[talkUser] == 1 then selfSay('Okay, you\'re a smart and probably know the face of danger that exists there.', cid) talkState[talkUser] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  21. Pedro. postou uma resposta no tópico em Monsters, NPC, Raids & Mounts
    ansioso, para alguém trazer para tfs 1.0, não tive sucesso ;/
  22. Pedro. postou uma resposta no tópico em Scripts tfs 0.4 (OLD)
    você da aula em lua, show de bola.
  23. Pedro. postou uma resposta no tópico em Sistemas, Mods & Funções .lua
    poderia funcionar pra tfs 1.0 +, testei aqui mas da uns erros de getplayer, dai fiz as alterações pelos nomes do tfs porém no final da DBUG ao castar a spell ;/
  24. Amigo, perdoe pela demora, tava de serviço no quartel. Então, eu testei aqui e realmente estava dando debug, eu tentei outras spells porém não tive sucesso. Sorry.

Informação Importante

Confirmação de Termo