Ir para conteúdo

quakeglobal

Membro
  • Registro em

  • Última visita

  1. Fir3element reagiu a uma resposta no tópico: (Resolvido)Divulgar no otservlist
  2. São R$400 por dia e se você conseguir uma resposta por email do Xinn em menos de um mês você é um vencedor. Ta aí o contato: otservlist.org/contact
  3. quakeglobal respondeu ao post em um tópico de quakeglobal em Suporte Tibia OTServer
    Apenas o Grizzly está com erro. Não tem essa lib aí não...
  4. quakeglobal postou uma resposta no tópico em Suporte Tibia OTServer
    Erro: Lua Script Error: [Npc interface] data/npc/scripts/task.lua:onThink data/npc/lib/npcsystem/keywordhandler.lua:91: attempt to index field 'lastNode' (a nil value) stack traceback: [C]: in function '__index' data/npc/lib/npcsystem/keywordhandler.lua:91: in function 'reset' data/npc/lib/npcsystem/npchandler.lua:579: in function 'resetNpc' data/npc/lib/npcsystem/npchandler.lua:558: in function 'onWalkAway' data/npc/lib/npcsystem/npchandler.lua:503: in function 'onThink' data/npc/scripts/task.lua:10: in function <data/npc/scripts/task.lua:10> dofile('data/lib/killingInTheNameOfQuest.lua') 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 choose = {} local cancel = {} local available = {} local grizzlyAdamsConfig = { ranks = { huntsMan_rank = { {id=11208, buy=0, sell=50, name='antlers'}, {id=10549, buy=0, sell=100, name='bloody pincers'}, {id=11183, buy=0, sell=35, name='crab pincers'}, {id=10573, buy=0, sell=55, name='cyclops toe'}, {id=10564, buy=0, sell=30, name='frosty ear of a troll'}, {id=11193, buy=0, sell=600, name='hydra head'}, {id=11366, buy=0, sell=80, name='lancer beetle shell'}, {id=10578, buy=0, sell=420, name='mutated bat ear'}, {id=11222, buy=0, sell=400, name='sabretooth'}, {id=11367, buy=0, sell=20, name='sandcrawler shell'}, {id=10547, buy=0, sell=280, name='scarab pincers'}, {id=11365, buy=0, sell=60, name='terramite legs'}, {id=11363, buy=0, sell=170, name='terramite shell'}, {id=11184, buy=0, sell=30000, name='terrorbird beak'}, {id=7398, buy=0, sell=500, name='cyclops trophy'}, {id=11315, buy=0, sell=15000, name='draken trophy'}, {id=11330, buy=0, sell=8000, name='lizard trophy'}, {id=7401, buy=0, sell=500, name='minotaur trophy'} }, bigGameHunter_rank = { {id=7397, buy=0, sell=3000, name='deer trophy'}, {id=7400, buy=0, sell=3000, name='lion trophy'}, {id=7394, buy=0, sell=3000, name='wolf trophy'} }, trophyHunter_rank = { {id=7393, buy=0, sell=40000, name='demon trophy'}, {id=7396, buy=0, sell=20000, name='behemoth trophy'}, {id=7399, buy=0, sell=10000, name='dragon lord trophy'}, {id=10518, buy=1000, sell=0, name='demon backpack'}, }, } } local Topic = {} function greetCallback(cid) Topic[cid] = 0 return true end local function setNewTradeTable(table) local items = {} for _, v in ipairs(table) do items[v.id] = {itemId = v.id, buyPrice = v.buy, sellPrice = v.sell, subType = 0, realName = v.name} end return items end local function setNewLineTable(oldTable, newTable) for k, v in pairs(oldTable) do table.insert(newTable, k, v) end return true end function creatureSayCallback(cid, type, msg) local player = Player(cid) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_PRIVATE and 0 or cid if (msgcontains(msg, "hi") or msgcontains(msg, "hello")) and (not npcHandler:isFocused(cid)) then if (player:getStorageValue(JOIN_STOR) == -1) then npcHandler:say("Welcome "..getCreatureName(cid)..". Would you like to join the 'Paw and Fur - Hunting Elite'?", cid) npcHandler:addFocus(cid) npcHandler.topic[cid] = 5 else npcHandler:say("Welcome back old chap. What brings you here this time?", cid) npcHandler:addFocus(cid) npcHandler.topic[cid] = 0 end return true end if(not npcHandler:isFocused(cid)) then return false end if msgcontains(msg, "bye") or msgcontains(msg, "farewell") then npcHandler:say("Happy hunting, old chap!", cid, TRUE) Topic[talkUser] = 0 npcHandler:releaseFocus(cid) end if (isInArray({"yes", "join"}, msg:lower()) and npcHandler.topic[cid] == 5) then player:setStorageValue(JOIN_STOR, 1) npcHandler:say("Great! A warm welcome to our newest member: "..getCreatureName(cid).."! Ask me for a {task} if you want to go on a hunt.", cid) npcHandler.topic[cid] = 0 elseif (msg:lower() == "no" and npcHandler.topic[cid] == 5) then npcHandler:say("No problem old chap. Come back if you change your mind.", cid) end if (player:getStorageValue(JOIN_STOR) == -1) then npcHandler:say("You'll have to {join} us to get more information.",cid) return false end if isInArray({"offer", "trade"}, msg:lower()) then if getPlayerRank(cid) >= 2 then if getPlayerRank(cid) == 2 or getPlayerRank(cid) == 3 then tradeRank = grizzlyAdamsConfig.ranks.huntsMan_rank elseif getPlayerRank(cid) == 4 then tradeRank = grizzlyAdamsConfig.ranks.bigGameHunter_rank setNewLineTable(grizzlyAdamsConfig.ranks.huntsMan_rank, grizzlyAdamsConfig.ranks.bigGameHunter_rank) elseif getPlayerRank(cid) == 5 or getPlayerRank(cid) == 6 then tradeRank = grizzlyAdamsConfig.ranks.trophyHunter_rank setNewLineTable(grizzlyAdamsConfig.ranks.huntsMan_rank, grizzlyAdamsConfig.ranks.bigGameHunter_rank) setNewLineTable(grizzlyAdamsConfig.ranks.huntsMan_rank, grizzlyAdamsConfig.ranks.trophyHunter_rank) end local items = setNewTradeTable(tradeRank) local function onBuy(cid, item, subType, amount, ignoreCap, inBackpacks) if ignoreCap == false and (player:getFreeCapacity() < getItemWeight(items[item].itemId, amount) or inBackpacks and player:getFreeCap() < (getItemWeight(items[item].itemId, amount) + getItemWeight(1988, 1))) then return player:sendTextMessage(MESSAGE_INFO_DESCR, 'You don\'t have enough cap.') end if items[item].buyPrice then player:removeMoney(amount * items[item].buyPrice) for i = 1, amount do if inBackpacks then local backpack = doCreateItemEx(1988, 1) doAddContainerItem(backpack, items[item].itemId, amount) else player:addItem(items[item].itemId, amount, true) end end return player:sendTextMessage(MESSAGE_INFO_DESCR, 'You bought '..amount..'x '..items[item].realName..' for '..items[item].buyPrice * amount..' gold coins.') end return true end local function onSell(cid, item, subType, amount, ignoreCap, inBackpacks) if items[item].sellPrice then player:addMoney(items[item].sellPrice * amount) player:removeItem(items[item].itemId, amount) return player:sendTextMessage(cid, MESSAGE_INFO_DESCR, 'You sold '..amount..'x '..items[item].realName..' for '..items[item].sellPrice * amount..' gold coins.') end return true end openShopWindow(cid, tradeRank, onBuy, onSell) return npcHandler:say('It\'s my offer.', player) else return npcHandler:say('You don\'t have any rank.', player) end end if isInArray({"tasks", "task", "mission"}, msg:lower()) then local can = getTasksByPlayer(cid) if (player:getStorageValue(JOIN_STOR) == -1) then return (npcHandler:say("You'll have to {join}, to get any {tasks}.",cid)) end 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 npcHandler:say("The current task" .. (#can > 1 and "s" or "") .. " that you can choose " .. (#can > 1 and "are" or "is") .. " " .. text, player) npcHandler.topic[cid] = 0 else npcHandler:say("I don't have any task for you right now.", player) end elseif msg ~= "" and canStartTask(cid, msg) then if #getPlayerStartedTasks(cid) >= tasksByPlayer then npcHandler:say("Sorry, but you already started " .. tasksByPlayer .. " tasks. You can check their {status} or {cancel} a task.", player) return true end local task = getTaskByName(msg) if task and player:getStorageValue(QUESTSTORAGE_BASE + task) > 0 then return false end npcHandler:say("In this task you must defeat " .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ". Are you sure that you want to start this task?", player) choose[cid] = task npcHandler.topic[cid] = 1 elseif msg:lower() == "yes" and npcHandler.topic[cid] == 1 then player:setStorageValue(QUESTSTORAGE_BASE + choose[cid], 1) player:setStorageValue(KILLSSTORAGE_BASE + choose[cid], 0) npcHandler:say("Excellent! You can check the {status} of your task saying {report} to me. Also you can {cancel} tasks to.", player) choose[cid] = nil npcHandler.topic[cid] = 0 elseif (msg:lower() == "report" or msg:lower() == "status") 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 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 doPlayerAddExp(cid, reward.value[1], false, reward.value[1], false, true) doPlayerSendDefaultCancel(cid, "You gained " .. reward.value[1] .. " experience points.") elseif isInArray({REWARD_ACHIEVEMENT, "achievement", "ach"}, reward.type:lower()) and not deny then elseif isInArray({REWARD_STORAGE, "storage", "stor"}, reward.type:lower()) and not deny then player:setStorageValue(reward.value[1], reward.value[2]) elseif isInArray({REWARD_POINT, "points", "point"}, reward.type:lower()) and not deny then player:setStorageValue(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 player:setStorageValue(reward.storage[1], reward.storage[2]) end end if tasks[id].norepeatable then player:setStorageValue(QUESTSTORAGE_BASE + id, 2) else player:setStorageValue(QUESTSTORAGE_BASE + id, 0) end if player:getStorageValue(REPEATSTORAGE_BASE + id) < 1 then player:setStorageValue(REPEATSTORAGE_BASE + id, 0) end player:setStorageValue(REPEATSTORAGE_BASE + id, player:getStorageValue(REPEATSTORAGE_BASE + id) + 1) finishedAtLeastOne = true finished = finished + 1 end end if (not finishedAtLeastOne) 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 npcHandler:say("The current task" .. (#started > 1 and "s" or "") .. " that you started " .. (#started > 1 and "are" or "is") .. " " .. text, player) Topic[cid] = 1 else npcHandler:say("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}.", player) end else npcHandler:say("You haven't started any task yet.", player) end 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 npcHandler:say("The current task" .. (#started > 1 and "s" or "") .. " that you started " .. (#started > 1 and "are" or "is") .. " " .. text, player) else npcHandler:say("You haven't started any task yet.", player) end elseif msg:lower() == "cancel" then local started = getPlayerStartedTasks(cid) local task = getTaskByName(msg) 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 = " or " elseif t == #started then sep = "?" end text = text .. "{" .. (tasks[id].name or tasks[id].raceName) .. "}" .. sep end if started and #started > 0 then npcHandler:say("Cancelling a task will make the counter restart. Which of these tasks you want cancel?" .. (#started > 1 and "" or "") .. " " .. text, player) npcHandler.topic[cid] = 2 else npcHandler:say("You haven't started any task yet.", player) end elseif getTaskByName(msg) and npcHandler.topic[cid] == 2 and isInArray(getPlayerStartedTasks(cid), getTaskByName(msg)) then local task = getTaskByName(msg) if player:getStorageValue(KILLSSTORAGE_BASE + task) > 0 then npcHandler:say("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?", player) else npcHandler:say("Are you sure you want to cancel this task?", player) end npcHandler.topic[cid] = 3 cancel[cid] = task elseif getTaskByName(msg) and Topic[cid] == 1 and isInArray(getPlayerStartedTasks(cid), getTaskByName(msg)) then local task = getTaskByName(msg) if player:getStorageValue(KILLSSTORAGE_BASE + task) > 0 then npcHandler:say("You currently killed " .. player:getStorageValue(KILLSSTORAGE_BASE + task) .. "/" .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ".", player) Topic[cid] = 0 else npcHandler:say("You currently killed 0/" .. tasks[task].killsRequired .. " " .. tasks[task].raceName .. ".", player) end elseif msg:lower() == "yes" and npcHandler.topic[cid] == 3 then player:setStorageValue(QUESTSTORAGE_BASE + cancel[cid], -1) player:setStorageValue(KILLSSTORAGE_BASE + cancel[cid], -1) npcHandler:say("You have cancelled the task " .. (tasks[cancel[cid]].name or tasks[cancel[cid]].raceName) .. ".", player) npcHandler.topic[cid] = 0 elseif isInArray({"points", "rank"}, msg:lower()) then if player:getStorageValue(POINTSSTORAGE) < 1 then npcHandler:say("At this time, you have 0 Paw & Fur points. You " .. (getPlayerRank(cid) == 6 and "are an Elite Hunter" or getPlayerRank(cid) == 5 and "are a Trophy Hunter" or getPlayerRank(cid) == 4 and "are a Big Game Hunter" or getPlayerRank(cid) == 3 and "are a Ranger" or getPlayerRank(cid) == 2 and "are a Huntsman" or getPlayerRank(cid) == 1 and "are a Member" or "haven't been ranked yet") .. ".", cid) elseif player:getStorageValue(POINTSSTORAGE) >= 1 then npcHandler:say("At this time, you have " .. player:getStorageValue(POINTSSTORAGE) .. " Paw & Fur points. You " .. (getPlayerRank(cid) == 6 and "are an Elite Hunter" or getPlayerRank(cid) == 5 and "are a Trophy Hunter" or getPlayerRank(cid) == 4 and "are a Big Game Hunter" or getPlayerRank(cid) == 3 and "are a Ranger" or getPlayerRank(cid) == 2 and "are a Huntsman" or getPlayerRank(cid) == 1 and "are a Member" or "haven't been ranked yet") .. ".", cid) end npcHandler.topic[cid] = 0 elseif isInArray({"special task"}, msg:lower()) then if player:getStorageValue(POINTSSTORAGE) >= 90 then -- Tiquandas Revenge 90 points if player:getStorageValue(22222) == 1 then -- Check if he has already started the task. npcHandler:say("You have already started the task. Go find Tiquandas Revenge and take revenge yourself!", cid) else selfSay("Have you heard about Tiquandas Revenge? It is said that the jungle itself is alive and takes revenge for all the bad things people have done to it. ...", cid) npcHandler:say("I myself believe that there is some truth in this clap trap. Something 'real' which therefore must have a hideout somewhere. Go find it and take revenge yourself!", cid) setPlayerStorageValue(cid, 22555, 1) -- Task needed to enter Tiquandas Revenge TP setPlayerStorageValue(cid, 22222, 1) -- Won't give this task again. end end if player:getStorageValue(POINTSSTORAGE) >= 100 then -- Demodras 100 points if player:getStorageValue(22223) == 1 then -- Check if he has already started the task. npcHandler:say("You have already started the special task. Find Demodras and kill it.", cid) else npcHandler:say("This task is a very dangerous one. I want you to look for Demodras' hideout. It might be somewhere under the Plains of Havoc. Good luck, old chap.", cid) setPlayerStorageValue(cid, 22556, 1) -- Task needed to enter Demodras TP setPlayerStorageValue(cid, 22223, 1) -- Won't give this task again. end end npcHandler.topic[cid] = 0 end end npcHandler:setMessage(MESSAGE_FAREWELL, "Happy hunting, old chap!") npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
  5. quakeglobal reagiu a uma resposta no tópico: Erro Grizzly Adams TFS 1.0
  6. Deu certo... tem como eu colocar pro NPC vender um item também? Obrigado!
  7. Agora deu esse erro kkkk Lua Script Error: [Npc interface] data/npc/scripts/task.lua:onCreatureSay data/npc/scripts/task.lua:52: attempt to index upvalue 'player' (a nil value) stack traceback: [C]: in function '__index' data/npc/scripts/task.lua:52: in function 'callback' data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay' data/npc/scripts/task.lua:9: in function <data/npc/scripts/task.lua:9>
  8. quakeglobal reagiu a uma resposta no tópico: Erro Grizzly Adams TFS 1.0
  9. Aquele erro arrumou, mas agora está dando esse: Lua Script Error: [Npc interface] data/npc/scripts/task.lua:onCreatureSay data/npc/scripts/task.lua:52: attempt to call global 'getCreatureStorage' (a nil value) stack traceback: [C]: in function 'getCreatureStorage' data/npc/scripts/task.lua:52: in function 'callback' data/npc/lib/npcsystem/npchandler.lua:411: in function 'onCreatureSay' data/npc/scripts/task.lua:9: in function <data/npc/scripts/task.lua:9> Acho que porque é TFS 1.0, porém tentei mudar o onCreatureSay para doCreatureSay e continuou na mesma.
  10. [Warning - NpcScript::NpcScript] Can not load script: task.lua data/npc/scripts/task.lua:6: function arguments expected near ':' local keywordHandler = KeywordHandler:new() local npcHandler = NpcHandler:new(keywordHandler) NpcSystem.parseParameters(npcHandler) local talkState = {} function onCreatureAppear(cid) npcHandler:eek:nCreatureAppear(cid) end function onCreatureDisappear(cid) npcHandler:eek:nCreatureDisappear(cid) end function onCreatureSay(cid, type, msg) npcHandler:eek:nCreatureSay(cid, type, msg) end function onThink() npcHandler:eek:nThink() 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())
  11. Olá, tudo bem? Venho pedir um script parecido com o Anihilator... deve funcionar assim: 1. Deverão ser 5 jogadores; 2. O primeiro jogador deve ter certo item; 3. Quando esse jogador usar o item que ele tem em um outro item todos os jogadores são teleportados para uma área e um monstro é sumonado. Obrigado!
  12. Olá galera, tudo bem? Eu estava em busca do script dessa quest parecido com o do global e eu achei um, porém ele não era para TFS 1.0 e acabou dando vários erros. Alguém tem para TFS 1.0? Obrigado!
  13. Opa, obrigado pela resposta. Quando uso a chave não acontece nada e também não dá nenhum erro no distro... é TFS 1.0. Copiei uma linha aqui e parte de teleportar deu certo, porém deu um erro no distro e o monstro não apareceu... Lua Script Error: [Action Interface] data/actions/scripts/copper.lua:onUse data/actions/scripts/copper.lua:9: attempt to call global 'doCreateMonster' (a nil value) stack traceback: [C]: in function 'doCreateMonster' data/actions/scripts/copper.lua:9: in function <data/actions/scripts/copper.lua:1>
  14. Olá, tudo bem? Preciso de um script onde quando eu usar Copper Prison Key em um Copper Prison Pedestal o player seja teleportado para uma área e um bixo nasça também nessa área para onde ele vai. Obrigado!
  15. Deu certo. Muito obrigado!
  16. quakeglobal reagiu a uma resposta no tópico: [AJUDA] Raids TFS 1.0
  17. Eu tinha deixado do jeito que você me mandou... Mas enfim, vou querer assim: Segunda > Zavarash as 20:00. Terça > Omrafir as 20:00. Quarta > Horadron as 20:00. Quinta > Prince Drazzak as 20:00. Sexta > Terofar as 20:00. Sabado > Mawhawk as 15:00. Domingo > Gaz'Haragoth as 15:00.
  18. Opa... Deu esse erro aqui amigo > http://prntscr.com/6p1a3t

Informação Importante

Confirmação de Termo