Tudo que carloos postou
-
script task
è, sei que nao tem nada a ver. mais tipo esse erro que esta dando agora n aparece nada no console voce da !countkills e por mais que voce mate varios monstros nao sai de 0, ja testei com outro monster mais nd!!
-
script task
- script task
I/O warning : failed to load external entity "data/npc/adonai.xml" [warning = Npc::loadFromXmll Cannot load npc file (data/npc/adonai.xml). info: failed to load external entity "data/npc/adonai.xml" é apenas isso que aparece 2 vezes seguidas o XML é <?xml version="1.0" encoding="UTF-8"?> <npc name="Adonai" script="data/npc/scripts/tasks.lua" walkinterval="3000" floorchange="0"> <health now="100" max="100"/> <look type="129" head="115" body="95" legs="113" feet="0" addons="3"/> <parameters> <parameter key="message_greet" value="Ei, |PLAYERNAME|, quer uma {nova task}, {informacoes} ou {cancelar} uma task? Ou sera que quer {completar} sua task? Huum... talvez ver quantos {pontos} voce tem?"/> <parameter key="message_farewell" value="Boa sorte em suas aventuras, |PLAYERNAME|."/> <parameter key="message_walkaway" value="Tchau... babaca."/> </parameters> </npc>- script task
- erro no console
nao Tem esse shop.lua no globalevents.xml e nem nos scripts. o meu mapa é um baiak 8.6.- script task
alguem pode me dizer o que esta errado nesse script de task que editei? -- Sistema de Task feito por Leoric -- taskstg = { kills = 3451, permission = 3452, killstotal = 3453, monster = 3454, stage = 3455, points = 3456, } timeBetweenTasks = 24 * 60 * 60 -- tempo até poder fazer outra task (24 * 60 * 60 = 24hs) taskLevel = false -- true se quiser que as tasks sejam feitas por level / false se quiser que elas sejam feitas na ordem taskMsg = {bool = true, msg = 'Voce acaba de matar monstros suficientes para completar sua task!'} -- bool = false > sem mensagens; bool = true > aviso quando terminar a task taskEnd = true -- [não tem função no modo Level] se estiver como true, quando o jogador terminar a última task disponível, ele não poderá repeti-la. Se estiver false, ele poderá repetir a última task infinitamente. taskmonsters = { [1] = {'lord demon', killstotal = 200}, -- aqui você deve mudar [2] = {'master warlock', killstotal = 300}, [3] = {'master green reaper', killstotal = 400}, [4] = {'master demon', killstotal = 500} } taskreward = -- em gps { [1] = {money = 1000000,xp = 50000, item = 8262}, -- nenhum item será adicionado e 3 pontos de task serão adicionados [2] = {money = 1000000,xp = 70000, item = 8263}, -- 1 item(2458) será adicionado e nenhum ponto de task [3] = {money = 1000000,xp = 80000, item = 8264}, -- 1 item(2458) será adicionado e nenhum ponto de task [4] = {money = 1000000,xp = 95000, item = 8265} -- aqui serão adicionados 2 itens com id 2458 (se ele for amontoável - stackable) e 5 pontos de task } function canDoTask(cid) local stage = getPlayerStorageValue(cid, taskstg.stage) if stage + 1 > #taskmonsters then return false elseif getPlayerStorageValue(cid,taskstg.permission) <= 0 then return true elseif getPlayerStorageValue(cid,taskstg.permission) == 1 then return false elseif getPlayerStorageValue(cid,taskstg.permission) >= os.time(t) then return false end return true end function doResetTask(cid) setPlayerStorageValue(cid,taskstg.kills,-1) setPlayerStorageValue(cid,taskstg.permission,os.time(t) + timeBetweenTasks) setPlayerStorageValue(cid,taskstg.killstotal,-1) setPlayerStorageValue(cid,taskstg.monster,-1) return true end function doRewardTask(cid) local monster = getPlayerStorageValue(cid,taskstg.monster) local reward = taskreward[monster] if reward.item then doPlayerAddItem(cid,reward.item,(reward.amount and reward.amount or 1)) end if reward.points then local points = getPlayerStorageValue(cid, taskstg.points) if points == -1 then setPlayerStorageValue(cid, taskstg.points, 0) end setPlayerStorageValue(cid, taskstg.points, reward.points + points) end if monster and reward then doPlayerAddMoney(cid,reward.money) doPlayerAddExperience(cid, reward.xp) end return true end function isSummon(cid) -- baseada na função do Vodkart if getCreatureMaster(cid) ~= nil or getCreatureMaster(cid) == true then return true end return false end function doCompleteTask(cid) doRewardTask(cid) doResetTask(cid) return true end function doStartTask(cid) if not taskLevel then local stage = getPlayerStorageValue(cid, taskstg.stage) if stage <= 0 then setPlayerStorageValue(cid, taskstg.monster, 1) setPlayerStorageValue(cid, taskstg.killstotal, taskmonsters[1].killstotal) setPlayerStorageValue(cid, taskstg.stage, 1) else setPlayerStorageValue(cid, taskstg.monster, stage+1) setPlayerStorageValue(cid, taskstg.killstotal, taskmonsters[stage+1].killstotal) if taskEnd or stage < #taskmonsters then setPlayerStorageValue(cid, taskstg.stage, stage+1) end end setPlayerStorageValue(cid, taskstg.permission, 1) setPlayerStorageValue(cid, taskstg.kills, 0) return true end local lvl = getPlayerLevel(cid) if lvl < 20 then local killstotal = taskmonsters[1].killstotal setPlayerStorageValue(cid,taskstg.monster,1) setPlayerStorageValue(cid,taskstg.killstotal,killstotal) setPlayerStorageValue(cid,taskstg.permission,1) elseif lvl < 50 then local killstotal = taskmonsters[2].killstotal setPlayerStorageValue(cid,taskstg.monster,2) setPlayerStorageValue(cid,taskstg.killstotal,killstotal) setPlayerStorageValue(cid,taskstg.permission,1) else local killstotal = taskmonsters[3].killstotal setPlayerStorageValue(cid,taskstg.monster,3) setPlayerStorageValue(cid,taskstg.killstotal,killstotal) setPlayerStorageValue(cid,taskstg.permission,1) end setPlayerStorageValue(cid,taskstg.kills,0) return true end o erro que da no distro é esse: esse é o script do NPC -- Sistema de Task feito por Leoric (Omega no XTibia) -- 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 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 monster, permission = getPlayerStorageValue(cid,taskstg.monster), getPlayerStorageValue(cid,taskstg.permission) local kills, killstotal = getPlayerStorageValue(cid,taskstg.kills), getPlayerStorageValue(cid,taskstg.killstotal) if msgcontains(msg,'nova task') then if monster ~= -1 then selfSay('Você já tem uma task em andamento. Termine-a antes de começar outra.',cid) elseif getPlayerStorageValue(cid, taskstg.stage) + 1 > #taskmonsters then selfSay('Eu não tenho mais tasks para você.',cid) elseif not canDoTask(cid) then selfSay('Você deve esperar '..math.ceil((permission - os.time(t))/60)..' minutos até poder começar outra task.',cid) else doStartTask(cid) selfSay('Muito bem, utilize {!countkills} para acompanhar o andamento de sua task.',cid) end talkState[talkUser] = 0 elseif msgcontains(msg,'completar') then if canDoTask(cid) then selfSay('Você não tem uma task iniciada ainda... diga {nova task} para começar uma.',cid) elseif permission > 1 then selfSay('Você não tem uma task ativa... e só poderá começar outra mais tarde.',cid) elseif killstotal > 1 and kills >= killstotal then selfSay('Parabéns por completar sua task!',cid) doCompleteTask(cid) else selfSay('Você ainda não completou sua task.',cid) end talkState[talkUser] = 0 elseif msgcontains(msg,'info') then if canDoTask(cid) and (monster == 0 or monster == -1) then selfSay('Você pode começar uma task dizendo {nova task}. Assim que disser, uma nova task será atribuída a você dependendo do seu level e você poderá acompanhar seu andamento dizendo {!countkills}.',cid) else selfSay('Você pode acompanhar sua task pelo comando {!countkills}. Assim que terminar, me avise e você receberá seu prêmio em dinheiro e experiência.',cid) end talkState[talkUser] = 0 elseif msgcontains(msg, 'pontos') then local pontos = getPlayerStorageValue(cid, taskstg.points) > 0 and getPlayerStorageValue(cid, taskstg.points) or 0 selfSay('Você tem '.. pontos ..' pontos de task.',cid) elseif msgcontains(msg,'cancelar') then if monster == 0 or monster == -1 then selfSay('Você não tem uma task ativa para cancelar.',cid) talkState[talkUser] = 0 else selfSay('Você tem certeza que quer cancelar sua task?',cid) talkState[talkUser] = 1 end elseif (msgcontains(msg,'yes') or msgcontains(msg,'sim')) and talkState[talkUser] == 1 then selfSay('Muito bem, sua task foi cancelada.',cid) doResetTask(cid) setPlayerStorageValue(cid,taskstg.permission,-1) setPlayerStorageValue(cid, taskstg.stage, getPlayerStorageValue(cid, taskstg.stage)-1) talkState[talkUser] = 0 elseif (msgcontains(msg,'no') or msgcontains(msg,'não')) and talkState[talkUser] == 1 then selfSay('Você que sabe, né...',cid) end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())- erro no console
esta aparecendo 2 erros no meu mapa alguem poderia me ajudar esse: error during getdataint(acesstime) >> ao logar qualquer player aparece isso e esse grandao ai de cima diz que é um erro no SQLITE alguem Me ajuda Dou 10 REP+- erro ao abrir ot server
galera meu server ta funcionando normal mais sempre aparecem esses erros o que é esse error during getdataint(acesstime) e esse start alguem pode me falar o que é?, esse eo script function onStartup() db.query("UPDATE `players` SET `online` = 0 WHERE `world_id` = " .. getConfigValue('worldId') .. ";") return true end db.executeQuery("DELETE FROM `guild_wars` WHERE `status` = 0 AND `begin` < " .. (os.time() - 2 * 86400) .. ";") db.executeQuery("UPDATE `guild_wars` SET `status` = 5, `end` = " .. os.time() .. " WHERE `status` = 1 AND `end` > 0 AND `end` < " .. os.time() .. ";") @up - script task
Informação Importante
Confirmação de Termo