Ir para conteúdo

Wakon

Héroi
  • Registro em

  • Última visita

Tudo que Wakon postou

  1. Pega seu items.otb em "Data/items" e coloque na pasta "SeuRME/data/854", creio que seja isso.
  2. Você adiciona o script em "Data/actions/scripts", como um arquivo .lua e coloca o nome desejado, script.lua. Depois adiciona a tag em "Data/actions" no arquivo actions.xml, não esqueça de mudar para o nome que você colocou: <action actionid="54355" script="script.lua" /> Ai você coloca a actionid e adiciona ela no baú do RME, no exemplo ali é 54355.
  3. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Em qual versão você está tentando usar esse script? Está funcionando normalmente.
  4. Tenta isso: Abre o RME aperte CTRL+J, procure pelo item 459 e adicione ele em cima das escadas, ficando assim: Se não funcionar, avise.
  5. Acontece, asudhasuhd. Por nada
  6. Muda na tag da spell: <instant name="Texz" words="Tets" lvl="16" mana="20" prem="1" range="3" casterTargetOrDirection="1" blockwalls="1" exhaustion="1000" needlearn="0" event="script" value="ttt.lua"> Em range="3" coloque range="1"
  7. function onUse(cid, item, fromPosition, itemEx, toPosition) if(getPlayerStorageValue(cid, 10012) < 1) then doPlayerAddExp(cid, 250000, true, true) setPlayerStorageValue(cid, 10012, 1) end if(item.uid == 3088) then if(getPlayerStorageValue(cid, 30) == 53) then setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerAddItem(cid, 9776, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari armor.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end elseif(item.uid == 3089) then if(getPlayerStorageValue(cid, 30) == 53) then setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerAddItem(cid, 9778, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari mask.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end elseif(item.uid == 3090) then if(getPlayerStorageValue(cid, 30) == 53) then setPlayerStorageValue(cid, 30, 54) Player(cid):setStorageValue(12021, 5) -- StorageValue for Questlog "Mission 10: The Final Battle" doPlayerAddItem(cid, 9777, 1) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You've found a yalahari leg piece.") else doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "The chest is empty.") end end return true end Tenta assim, ai tu coloca cada unique no baú correto. 3088: Yalahari armor 3089: Yalahari mask 3090: Yalahari leg piece
  8. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Passa o script taming.lua
  9. Creio que seja meio óbvio e que você já tenha testado, mais... Você testou em um local escuro? Está funcionando normalmente aqui, TFS 0.4.
  10. Vá em "OTClient/Modules" e delete a pasta game_pokemoves.
  11. Tenso, seria mais fácil se eu conseguisse abrir uma base pra testar asuhasuh, tenta assim: 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 choose = {} local cancel = {} local available = {} function creatureSayCallback(cid, type, msg) local player = Player(cid) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if isInArray({"tasks", "task", "mission"}, msg:lower()) then local can = getTasksByPlayer(cid) if #can > 0 then local text = "" local sep = ", " table.sort(can, (function(a, b) return (a < b) end)) local t = 0 for _, id in ipairs(can) do t = t + 1 if t == #can - 1 then sep = " and " elseif t == #can then sep = "." end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end selfSay("The current task" .. (#can > 1 and "s" or "") .. " that you can choose " .. (#can > 1 and "are" or "is") .. " " .. text, cid) talkState[talkUser] = 0 else selfSay("I don't have any task for you right now.", cid) end elseif msg ~= "" and canStartTask(cid, msg) then if #getPlayerStartedTasks(cid) >= tasksByPlayer then selfSay("Sorry, but you already started " .. tasksByPlayer .. " tasks.", cid) return true end local task = getTaskByName(msg) if task and player:getStorageValue(QUESTSTORAGE_BASE + task) > 0 then return false end selfSay("In this task you must defeat " .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Are you sure that you want to start this task?", cid) choose[cid] = task talkState[talkUser] = 1 elseif msg:lower() == "yes" and talkState[talkUser] == 1 then setPlayerStorageValue(cid, QUESTSTORAGE_BASE + choose[cid], 1) selfSay("Excellent! You can check the status of your task saying report to me.", cid) choose[cid] = nil talkState[talkUser] = 0 elseif msg:lower() == "report" then local started = getPlayerStartedTasks(cid) local finishedAtLeastOne = false local finished = 0 if started and #started > 0 then for _, id in ipairs(started) do if player:getStorageValue(KILLSSTORAGE_BASE + id) >= tasks[id].killsRequired then for _, reward in ipairs(tasks[id].rewards) do print("Rewards loaded") local deny = false if reward.storage then if player:getStorageValue(reward.storage[1]) >= reward.storage[2] then deny = true end end if isInArray({REWARD_MONEY, "money"}, reward.type:lower()) and not deny then doPlayerAddMoney(cid, reward.value[1]) elseif isInArray({REWARD_EXP, "exp", "experience"}, reward.type:lower()) and not deny then doPlayerAddExperience(cid, reward.value[1]) doPlayerSendDefaultCancel(cid, "You gained " .. reward.value[1] .. " experience points.") elseif isInArray({REWARD_ACHIEVEMENT, "achievement", "ach"}, reward.type:lower()) and not deny then if doPlayerAddAchievement then doPlayerAddAchievement(cid, reward.value[1], true) end elseif isInArray({REWARD_STORAGE, "storage", "stor"}, reward.type:lower()) and not deny then setPlayerStorageValue(cid, reward.value[1], reward.value[2]) elseif isInArray({REWARD_POINT, "points", "point"}, reward.type:lower()) and not deny then setPlayerStorageValue(cid, POINTSSTORAGE, player:getStorageValue(POINTSSTORAGE) + reward.value[1]) elseif isInArray({REWARD_ITEM, "item", "items", "object"}, reward.type:lower()) and not deny then doPlayerAddItem(cid, reward.value[1], reward.value[2]) end if reward.storage then setPlayerStorageValue(cid, reward.storage[1], reward.storage[2]) end end if tasks[id].norepeatable then setPlayerStorageValue(cid, QUESTSTORAGE_BASE + id, 2) else setPlayerStorageValue(cid, QUESTSTORAGE_BASE + id, 0) end setPlayerStorageValue(cid, KILLSSTORAGE_BASE + id, 0) if player:getStorageValue(REPEATSTORAGE_BASE + id) < 1 then setPlayerStorageValue(cid, REPEATSTORAGE_BASE + id, 0) end setPlayerStorageValue(cid, REPEATSTORAGE_BASE + id, player:getStorageValue(REPEATSTORAGE_BASE + id) + 1) finishedAtLeastOne = true finished = finished + 1 end end if not finishedAtLeastOne then selfSay("You haven't finished any task yet.", cid) else selfSay("Awesome! you finished " .. (finished > 1 and "various" or "a") .. " task" .. (finished > 1 and "s" or "") .. ". Talk to me again if you want to start a task.", cid) end else selfSay("You haven't started any task yet.", cid) end elseif msg:lower() == "started" then local started = getPlayerStartedTasks(cid) if started and #started > 0 then local text = "" local sep = ", " table.sort(started, (function(a, b) return (a < b) end)) local t = 0 for _, id in ipairs(started) do t = t + 1 if t == #started - 1 then sep = " and " elseif t == #started then sep = "." end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end selfSay("The current task" .. (#started > 1 and "s" or "") .. " that you started " .. (#started > 1 and "are" or "is") .. " " .. text, cid) else selfSay("You haven't started any task yet.", cid) end elseif msg:lower() == "cancel" then local started = getPlayerStartedTasks(cid) if started and #started > 0 then selfSay("Cancelling a task will make the count restart. Wich task you want to cancel?", cid) talkState[talkUser] = 2 else selfSay("You haven't started any task yet.", cid) end elseif getTaskByName(msg) and talkState[talkUser] == 2 and isInArray(getPlayerStartedTasks(cid), getTaskByName(msg)) then local task = getTaskByName(msg) if player:getStorageValue(KILLSSTORAGE_BASE + task) > 0 then selfSay("You currently killed " .. player:getStorageValue(cid, KILLSSTORAGE_BASE + task) .. "/" .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Cancelling this task will restart the count. Are you sure you want to cancel this task?", cid) else selfSay("Are you sure you want to cancel this task?", cid) end talkState[talkUser] = 3 cancel[cid] = task elseif msg:lower() == "yes" and talkState[talkUser] == 3 then setPlayerStorageValue(cid, QUESTSTORAGE_BASE + cancel[cid], -1) setPlayerStorageValue(cid, KILLSSTORAGE_BASE + cancel[cid], -1) selfSay("You have cancelled the task " .. (tasks[cancel[cid]].name or tasks[cancel[cid]].raceName) .. ".", cid) talkState[talkUser] = 0 elseif isInArray({"points", "rank"}, msg:lower()) then selfSay("At this time, you have " .. player:getStorageValue(cid, POINTSSTORAGE) .. " Paw & Fur points. You " .. (getPlayerRank(cid) == 5 and "are an Elite Hunter" or getPlayerRank(cid) == 4 and "are a Trophy Hunter" or getPlayerRank(cid) == 3 and "are a Big Game Hunter" or getPlayerRank(cid) == 2 and "are a Ranger" or getPlayerRank(cid) == 1 and "are a Huntsman" or "haven't been ranked yet") .. ".", cid) talkState[talkUser] = 0 end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  12. Olha eu não manjo nadinha de TFS 1.0, mais tentei trocar para as funções que comparei em outro script, testa ai: 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 player = Player(cid) local choose = {} local cancel = {} local available = {} function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if isInArray({"tasks", "task", "mission"}, msg:lower()) then local can = getTasksByPlayer(cid) if #can > 0 then local text = "" local sep = ", " table.sort(can, (function(a, b) return (a < b) end)) local t = 0 for _, id in ipairs(can) do t = t + 1 if t == #can - 1 then sep = " and " elseif t == #can then sep = "." end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end selfSay("The current task" .. (#can > 1 and "s" or "") .. " that you can choose " .. (#can > 1 and "are" or "is") .. " " .. text, cid) talkState[talkUser] = 0 else selfSay("I don't have any task for you right now.", cid) end elseif msg ~= "" and canStartTask(cid, msg) then if #getPlayerStartedTasks(cid) >= tasksByPlayer then selfSay("Sorry, but you already started " .. tasksByPlayer .. " tasks.", cid) return true end local task = getTaskByName(msg) if task and player:getStorageValue(QUESTSTORAGE_BASE + task) > 0 then return false end selfSay("In this task you must defeat " .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Are you sure that you want to start this task?", cid) choose[cid] = task talkState[talkUser] = 1 elseif msg:lower() == "yes" and talkState[talkUser] == 1 then setPlayerStorageValue(cid, QUESTSTORAGE_BASE + choose[cid], 1) selfSay("Excellent! You can check the status of your task saying report to me.", cid) choose[cid] = nil talkState[talkUser] = 0 elseif msg:lower() == "report" then local started = getPlayerStartedTasks(cid) local finishedAtLeastOne = false local finished = 0 if started and #started > 0 then for _, id in ipairs(started) do if player:getStorageValue(KILLSSTORAGE_BASE + id) >= tasks[id].killsRequired then for _, reward in ipairs(tasks[id].rewards) do print("Rewards loaded") local deny = false if reward.storage then if player:getStorageValue(reward.storage[1]) >= reward.storage[2] then deny = true end end if isInArray({REWARD_MONEY, "money"}, reward.type:lower()) and not deny then doPlayerAddMoney(cid, reward.value[1]) elseif isInArray({REWARD_EXP, "exp", "experience"}, reward.type:lower()) and not deny then doPlayerAddExperience(cid, reward.value[1]) doPlayerSendDefaultCancel(cid, "You gained " .. reward.value[1] .. " experience points.") elseif isInArray({REWARD_ACHIEVEMENT, "achievement", "ach"}, reward.type:lower()) and not deny then if doPlayerAddAchievement then doPlayerAddAchievement(cid, reward.value[1], true) end elseif isInArray({REWARD_STORAGE, "storage", "stor"}, reward.type:lower()) and not deny then setPlayerStorageValue(cid, reward.value[1], reward.value[2]) elseif isInArray({REWARD_POINT, "points", "point"}, reward.type:lower()) and not deny then setPlayerStorageValue(cid, POINTSSTORAGE, player:getStorageValue(POINTSSTORAGE) + reward.value[1]) elseif isInArray({REWARD_ITEM, "item", "items", "object"}, reward.type:lower()) and not deny then doPlayerAddItem(cid, reward.value[1], reward.value[2]) end if reward.storage then setPlayerStorageValue(cid, reward.storage[1], reward.storage[2]) end end if tasks[id].norepeatable then setPlayerStorageValue(cid, QUESTSTORAGE_BASE + id, 2) else setPlayerStorageValue(cid, QUESTSTORAGE_BASE + id, 0) end setPlayerStorageValue(cid, KILLSSTORAGE_BASE + id, 0) if player:getStorageValue(REPEATSTORAGE_BASE + id) < 1 then setPlayerStorageValue(cid, REPEATSTORAGE_BASE + id, 0) end setPlayerStorageValue(cid, REPEATSTORAGE_BASE + id, player:getStorageValue(REPEATSTORAGE_BASE + id) + 1) finishedAtLeastOne = true finished = finished + 1 end end if not finishedAtLeastOne then selfSay("You haven't finished any task yet.", cid) else selfSay("Awesome! you finished " .. (finished > 1 and "various" or "a") .. " task" .. (finished > 1 and "s" or "") .. ". Talk to me again if you want to start a task.", cid) end else selfSay("You haven't started any task yet.", cid) end elseif msg:lower() == "started" then local started = getPlayerStartedTasks(cid) if started and #started > 0 then local text = "" local sep = ", " table.sort(started, (function(a, b) return (a < b) end)) local t = 0 for _, id in ipairs(started) do t = t + 1 if t == #started - 1 then sep = " and " elseif t == #started then sep = "." end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end selfSay("The current task" .. (#started > 1 and "s" or "") .. " that you started " .. (#started > 1 and "are" or "is") .. " " .. text, cid) else selfSay("You haven't started any task yet.", cid) end elseif msg:lower() == "cancel" then local started = getPlayerStartedTasks(cid) if started and #started > 0 then selfSay("Cancelling a task will make the count restart. Wich task you want to cancel?", cid) talkState[talkUser] = 2 else selfSay("You haven't started any task yet.", cid) end elseif getTaskByName(msg) and talkState[talkUser] == 2 and isInArray(getPlayerStartedTasks(cid), getTaskByName(msg)) then local task = getTaskByName(msg) if player:getStorageValue(KILLSSTORAGE_BASE + task) > 0 then selfSay("You currently killed " .. player:getStorageValue(KILLSSTORAGE_BASE + task) .. "/" .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Cancelling this task will restart the count. Are you sure you want to cancel this task?", cid) else selfSay("Are you sure you want to cancel this task?", cid) end talkState[talkUser] = 3 cancel[cid] = task elseif msg:lower() == "yes" and talkState[talkUser] == 3 then setPlayerStorageValue(cid, QUESTSTORAGE_BASE + cancel[cid], -1) setPlayerStorageValue(cid, KILLSSTORAGE_BASE + cancel[cid], -1) selfSay("You have cancelled the task " .. (tasks[cancel[cid]].name or tasks[cancel[cid]].raceName) .. ".", cid) talkState[talkUser] = 0 elseif isInArray({"points", "rank"}, msg:lower()) then selfSay("At this time, you have " .. player:getStorageValue(POINTSSTORAGE) .. " Paw & Fur points. You " .. (getPlayerRank(cid) == 5 and "are an Elite Hunter" or getPlayerRank(cid) == 4 and "are a Trophy Hunter" or getPlayerRank(cid) == 3 and "are a Big Game Hunter" or getPlayerRank(cid) == 2 and "are a Ranger" or getPlayerRank(cid) == 1 and "are a Huntsman" or "haven't been ranked yet") .. ".", cid) talkState[talkUser] = 0 end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  13. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    RME: http://remeresmapeditor.com/marklar.php?view_older Versão 2.0 vai até T8.60, porém recomendo usar a 2.1 pois a 2.0 da uns bug loco de fechar o RME. Sobre otserv leve, varia pelo mapa amigo, um baiak no caso seria leve e um global mais pesado.
  14. Tenta ai: -- SpellCreator generated. -- =============== COMBAT VARS =============== -- Areas/Combat for 0ms local combat0_Brush_2 = createCombatObject() setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_ICETORNADO) setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatArea(combat0_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel) return (1500)*-1,(3000)*-1 end setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat0_Brush_2 = {CONST_ANI_SMALLICE}local combat0_Brush_2 = createCombatObject() setCombatParam(combat0_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat0_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatArea(combat0_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel) return (1600)*-1,(3200)*-1 end setCombatCallback(combat0_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat0_Brush_2 = {CONST_ANI_EXPLOSION}local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_SOUND_BLUE) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel) return (1700)*-1,(3400)*-1 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_POWERBOLT}local combat0_Brush = createCombatObject() setCombatParam(combat0_Brush, COMBAT_PARAM_EFFECT, CONST_ME_DRAWBLOOD) setCombatParam(combat0_Brush, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat0_Brush,createCombatArea({{0, 0, 2, 0, 0}, {0, 1, 1, 1, 0}, {1, 1, 1, 1, 1}})) function getDmg_Brush(cid, level, maglevel) return (1800)*-1,(3500)*-1 end setCombatCallback(combat0_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat0_Brush = {CONST_ANI_WHIRLWINDAXE,0,1,1,2,0,2,-1,2,-2,2,-1,1,2,2,1,1} -- Areas/Combat for 100ms local combat1_Brush = createCombatObject() setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_GIANTICE) setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_ICEDAMAGE) setCombatArea(combat1_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel) return (1500)*-1,(3000)*-1 end setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat1_Brush = {CONST_ANI_ICE}local combat1_Brush = createCombatObject() setCombatParam(combat1_Brush, COMBAT_PARAM_EFFECT, CONST_ME_FIREAREA) setCombatParam(combat1_Brush, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatArea(combat1_Brush,createCombatArea({{2}})) function getDmg_Brush(cid, level, maglevel) return (1600)*-1,(3200)*-1 end setCombatCallback(combat1_Brush, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush") local dfcombat1_Brush = {CONST_ANI_FIRE}local combat1_Brush_2 = createCombatObject() setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_HOLYAREA) setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatArea(combat1_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel) return (1700)*-1,(3400)*-1 end setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat1_Brush_2 = {CONST_ANI_HOLY}local combat1_Brush_2 = createCombatObject() setCombatParam(combat1_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_CRAPS) setCombatParam(combat1_Brush_2, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat1_Brush_2,createCombatArea({{1, 1, 1, 1, 1}, {0, 1, 1, 1, 0}, {0, 0, 2, 0, 0}})) function getDmg_Brush_2(cid, level, maglevel) return (1800)*-1,(3500)*-1 end setCombatCallback(combat1_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat1_Brush_2 = {CONST_ANI_WHIRLWINDSWORD,2,-2,1,-2,0,-2,-1,-2,-2,-2,0,-1,-1,-1,1,-1} -- Areas/Combat for 200ms local combat2_Brush_2 = createCombatObject() setCombatParam(combat2_Brush_2, COMBAT_PARAM_EFFECT, CONST_ME_FIREATTACK) setCombatParam(combat2_Brush_2, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE) setCombatArea(combat2_Brush_2,createCombatArea({{2}})) function getDmg_Brush_2(cid, level, maglevel) return (1600)*-1,(3200)*-1 end setCombatCallback(combat2_Brush_2, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_2") local dfcombat2_Brush_2 = {CONST_ANI_EXPLOSION}local combat2_Brush_3 = createCombatObject() setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_YALAHARIGHOST) setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_HOLYDAMAGE) setCombatArea(combat2_Brush_3,createCombatArea({{2}})) function getDmg_Brush_3(cid, level, maglevel) return (1700)*-1,(3400)*-1 end setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") local dfcombat2_Brush_3 = {CONST_ANI_SMALLHOLY}local combat2_Brush_3 = createCombatObject() setCombatParam(combat2_Brush_3, COMBAT_PARAM_EFFECT, CONST_ME_GROUNDSHAKER) setCombatParam(combat2_Brush_3, COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE) setCombatArea(combat2_Brush_3,createCombatArea({{1, 0, 0, 0, 1}, {1, 1, 2, 1, 1}, {1, 0, 0, 0, 1}})) function getDmg_Brush_3(cid, level, maglevel) return (1800)*-1,(3500)*-1 end setCombatCallback(combat2_Brush_3, CALLBACK_PARAM_LEVELMAGICVALUE, "getDmg_Brush_3") local dfcombat2_Brush_3 = {CONST_ANI_WHIRLWINDCLUB,-2,-1,-2,1,-2,0,-1,0,2,1,2,-1,2,0,1,0} -- =============== CORE FUNCTIONS =============== local function RunPart(c,cid,var,dirList,dirEmitPos) -- Part if (isCreature(cid)) then doCombat(cid, c, var) if (dirList ~= nil) then -- Emit distance effects local i = 2; while (i < #dirList) do doSendDistanceShoot(dirEmitPos,{x=dirEmitPos.x-dirList[i],y=dirEmitPos.y-dirList[i+1],z=dirEmitPos.z},dirList[1]) i = i + 2 end end end end function onCastSpell(cid, var) local storage = 21203 if getPlayerStorageValue(cid, storage) <= 0 then doPlayerSendCancel(cid, "Blocked.") return true end local startPos = getCreaturePosition(cid) RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos) RunPart(combat0_Brush_2,cid,var,dfcombat0_Brush_2,startPos) RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos) RunPart(combat0_Brush,cid,var,dfcombat0_Brush,startPos) addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos) addEvent(RunPart,100,combat1_Brush,cid,var,dfcombat1_Brush,startPos) addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos) addEvent(RunPart,100,combat1_Brush_2,cid,var,dfcombat1_Brush_2,startPos) addEvent(RunPart,200,combat2_Brush_2,cid,var,dfcombat2_Brush_2,startPos) addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos) addEvent(RunPart,200,combat2_Brush_3,cid,var,dfcombat2_Brush_3,startPos) return true end
  15. Testa ai: 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 choose = {} local cancel = {} local available = {} function creatureSayCallback(cid, type, msg) if(not npcHandler:isFocused(cid)) then return false end local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if isInArray({"tasks", "task", "mission"}, msg:lower()) then local can = getTasksByPlayer(cid) if #can > 0 then local text = "" local sep = ", " table.sort(can, (function(a, b) return (a < b) end)) local t = 0 for _, id in ipairs(can) do t = t + 1 if t == #can - 1 then sep = " and " elseif t == #can then sep = "." end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end selfSay("The current task" .. (#can > 1 and "s" or "") .. " that you can choose " .. (#can > 1 and "are" or "is") .. " " .. text, cid) talkState[talkUser] = 0 else selfSay("I don't have any task for you right now.", cid) end elseif msg ~= "" and canStartTask(cid, msg) then if #getPlayerStartedTasks(cid) >= tasksByPlayer then selfSay("Sorry, but you already started " .. tasksByPlayer .. " tasks.", cid) return true end local task = getTaskByName(msg) if task and getCreatureStorage(cid, QUESTSTORAGE_BASE + task) > 0 then return false end selfSay("In this task you must defeat " .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Are you sure that you want to start this task?", cid) choose[cid] = task talkState[talkUser] = 1 elseif msg:lower() == "yes" and talkState[talkUser] == 1 then doCreatureSetStorage(cid, QUESTSTORAGE_BASE + choose[cid], 1) selfSay("Excellent! You can check the status of your task saying report to me.", cid) choose[cid] = nil talkState[talkUser] = 0 elseif msg:lower() == "report" then local started = getPlayerStartedTasks(cid) local finishedAtLeastOne = false local finished = 0 if started and #started > 0 then for _, id in ipairs(started) do if getCreatureStorage(cid, KILLSSTORAGE_BASE + id) >= tasks[id].killsRequired then for _, reward in ipairs(tasks[id].rewards) do print("Rewards loaded") local deny = false if reward.storage then if getCreatureStorage(cid, reward.storage[1]) >= reward.storage[2] then deny = true end end if isInArray({REWARD_MONEY, "money"}, reward.type:lower()) and not deny then doPlayerAddMoney(cid, reward.value[1]) elseif isInArray({REWARD_EXP, "exp", "experience"}, reward.type:lower()) and not deny then doPlayerAddExperience(cid, reward.value[1]) doPlayerSendDefaultCancel(cid, "You gained " .. reward.value[1] .. " experience points.") elseif isInArray({REWARD_ACHIEVEMENT, "achievement", "ach"}, reward.type:lower()) and not deny then if doPlayerAddAchievement then doPlayerAddAchievement(cid, reward.value[1], true) end elseif isInArray({REWARD_STORAGE, "storage", "stor"}, reward.type:lower()) and not deny then doCreatureSetStorage(cid, reward.value[1], reward.value[2]) elseif isInArray({REWARD_POINT, "points", "point"}, reward.type:lower()) and not deny then doCreatureSetStorage(cid, POINTSSTORAGE, getCreatureStorage(cid, POINTSSTORAGE) + reward.value[1]) elseif isInArray({REWARD_ITEM, "item", "items", "object"}, reward.type:lower()) and not deny then doPlayerAddItem(cid, reward.value[1], reward.value[2]) end if reward.storage then doCreatureSetStorage(cid, reward.storage[1], reward.storage[2]) end end if tasks[id].norepeatable then doCreatureSetStorage(cid, QUESTSTORAGE_BASE + id, 2) else doCreatureSetStorage(cid, QUESTSTORAGE_BASE + id, 0) end doCreatureSetStorage(cid, KILLSSTORAGE_BASE + id, 0) if getCreatureStorage(cid, REPEATSTORAGE_BASE + id) < 1 then doCreatureSetStorage(cid, REPEATSTORAGE_BASE + id, 0) end doCreatureSetStorage(cid, REPEATSTORAGE_BASE + id, getCreatureStorage(cid, REPEATSTORAGE_BASE + id) + 1) finishedAtLeastOne = true finished = finished + 1 end end if not finishedAtLeastOne then selfSay("You haven't finished any task yet.", cid) else selfSay("Awesome! you finished " .. (finished > 1 and "various" or "a") .. " task" .. (finished > 1 and "s" or "") .. ". Talk to me again if you want to start a task.", cid) end else selfSay("You haven't started any task yet.", cid) end elseif msg:lower() == "started" then local started = getPlayerStartedTasks(cid) if started and #started > 0 then local text = "" local sep = ", " table.sort(started, (function(a, b) return (a < b) end)) local t = 0 for _, id in ipairs(started) do t = t + 1 if t == #started - 1 then sep = " and " elseif t == #started then sep = "." end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end selfSay("The current task" .. (#started > 1 and "s" or "") .. " that you started " .. (#started > 1 and "are" or "is") .. " " .. text, cid) else selfSay("You haven't started any task yet.", cid) end elseif msg:lower() == "cancel" then local started = getPlayerStartedTasks(cid) if started and #started > 0 then selfSay("Cancelling a task will make the count restart. Wich task you want to cancel?", cid) talkState[talkUser] = 2 else selfSay("You haven't started any task yet.", cid) end elseif getTaskByName(msg) and talkState[talkUser] == 2 and isInArray(getPlayerStartedTasks(cid), getTaskByName(msg)) then local task = getTaskByName(msg) if getCreatureStorage(cid, KILLSSTORAGE_BASE + task) > 0 then selfSay("You currently killed " .. getCreatureStorage(cid, KILLSSTORAGE_BASE + task) .. "/" .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Cancelling this task will restart the count. Are you sure you want to cancel this task?", cid) else selfSay("Are you sure you want to cancel this task?", cid) end talkState[talkUser] = 3 cancel[cid] = task elseif msg:lower() == "yes" and talkState[talkUser] == 3 then doCreatureSetStorage(cid, QUESTSTORAGE_BASE + cancel[cid], -1) doCreatureSetStorage(cid, KILLSSTORAGE_BASE + cancel[cid], -1) selfSay("You have cancelled the task " .. (tasks[cancel[cid]].name or tasks[cancel[cid]].raceName) .. ".", cid) talkState[talkUser] = 0 elseif isInArray({"points", "rank"}, msg:lower()) then selfSay("At this time, you have " .. getCreatureStorage(cid, POINTSSTORAGE) .. " Paw & Fur points. You " .. (getPlayerRank(cid) == 5 and "are an Elite Hunter" or getPlayerRank(cid) == 4 and "are a Trophy Hunter" or getPlayerRank(cid) == 3 and "are a Big Game Hunter" or getPlayerRank(cid) == 2 and "are a Ranger" or getPlayerRank(cid) == 1 and "are a Huntsman" or "haven't been ranked yet") .. ".", cid) talkState[talkUser] = 0 end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  16. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Alterou o IP do cliente para o 127.0.0.1? Pode testar com o http://www.meuip.com.br/ também que ele se conecta ao 127.0.0.1!
  17. Script: function onSay(cid, words, param) local count = getPlayerInstantSpellCount(cid) local text = "" local t = {} for i = 0, count - 1 do local spell = getPlayerInstantSpellInfo(cid, i) if spell.level ~= 0 then if spell.manapercent > 0 then spell.mana = spell.manapercent .. "%" end table.insert(t, spell) end end table.sort(t, function(a, b) return a.level < b.level end) local prevLevel = -1 for i, spell in ipairs(t) do local line = "" if prevLevel ~= spell.level then if i ~= 1 then line = "\n" end line = line .. "Spells for Level " .. spell.level .. "\n" prevLevel = spell.level end text = text .. line .. " " .. spell.words .. " - " .. spell.name .. " : " .. spell.mana .. "\n" end doShowTextDialog(cid, 2175, text) return TRUE end Tag: <talkaction words="!spells" event="script" value="spell.lua"/>
  18. Creio que não, pois cheguei a essa conclusão comparando os arquivos com outras bases em que o executeQuery funciona, então se fosse dar algum problema as outras bases teria erros.
  19. O problema está no compat em "Data/lib/100-compat" fiz um teste em um servidor que também estava com problemas no executeQuery e funcionou, tenta ai: Abra o 100-compat.lua em "Data/lib" e procure por: db.stringComparison = db.stringComparer db.executeQuery = db.query Retire as duas, o por que disso eu não sei, mais ao retirar as duas linhas o executeQuery passou a funcionar. Sobre o script, use o do caronte que está 100%.
  20. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Amigo, sobre o NPC de vendas você mesmo pode criar facilmente com os itens que deseja, segue um exemplo: Ai é só copiar do nome até o ponto e vírgula: Em vermelho é o nome do item. Em azul é o ID do item. Em verde é o preço do item. O NPC de bless vou ver se consigo fazer pra você e já edito. @Edit Vá em "Data/npc/scripts" copie e cole um arquivo .lua e renomeie para bless.lua, apague tudo e cole: Depois em "Data/npcs" copie e cole um arquivo .xml renomeie para Blessman.xml, apague tudo e cole: Esse tá configurado para duas maneiras, comprando manual uma por uma ou falando bless e comprando todas. Não esqueça de mudar o valor do manual também e se quiser que eu retire é só falar.
  21. Tente esse tutorial: http://www.tibiaking.com/forum/topic/15337-criando-dois-items-com-a-mesma-sprite/
  22. É assim mesmo, pode ficar um mês ou um dia como aconteceu com você. Se acontecer é só fazer com outras keys.
  23. Wakon postou uma resposta no tópico em Suporte Tibia OTServer
    Já tentou alterar o magic rate? Abra seu config.lua e procure por rateMagic = e coloque um valor menor.
  24. Configurei pra você, se faltar algo me avise. local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) 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 t = { item = 7844, st = 121402, temp = 24*3600, -- Em 24 é o tempo em horas para usar novamente! level = 200 } function creatureSayCallback(cid, type, msg) msg = msg:lower() if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, 'sim') or msgcontains(msg, 'yes') then if getPlayerLevel(cid) >= t.level then if getPlayerStorageValue(cid, t.st) > os.time() then selfSay("Você precisa esperar " .. getPlayerStorageValue(cid, t.st) - os.time() .. ' segundo' .. (getPlayerStorageValue(cid, t.st) - os.time() == 1 and "" or "s") .. " para pegar o presente novamente.", cid) else setPlayerStorageValue(cid, t.st, os.time() + t.temp) doPlayerAddItem(cid, t.item) doSendMagicEffect(getThingPos(cid), 13) selfSay('Aqui está! Feliz natal!', cid) end else selfSay('Você precisa ser level '.. t.level ..' para pegar o presente.', cid) end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  25. Tem um end a mais eu acho: local itemid = 1050 local itempos = { x = 132, y = 415, z = 7 } local SoPlayer = "sim" function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor) if not isPlayer(cid) and string.lower(SoPlayer) == "sim" then return true end if getGlobalStorageValue(5050) ~= 1 then setGlobalStorageValue(5050, 1) doRemoveItem(getTileItemById(itempos, itemid).uid) else doTeleportThing(cid,fromPosition) end return true end function onStepOut(cid, item, position, fromPosition) if not isPlayer(cid) and string.lower(SoPlayer) == "sim" then return true end setGlobalStorageValue(5050, -1) doCreateItem(itemid,1,itempos) return true end

Informação Importante

Confirmação de Termo