Ir para conteúdo

lucasjockey

Artesão
  • Total de itens

    101
  • Registro em

  • Última visita

Tudo que lucasjockey postou

  1. lucasjockey

    [Resolvido]

  2. doPlayerRemoveItem(cid,6527,20)
  3. "Coloquei no map editor entao o tile e adicionei o actionid 29000... mas quando eu tento pisar em cima dele no ot, fala "You need level 28000 to pass"...". O tile que você utilizou para colocar o vip system já tem uma tag no movements.xml, recomendo que você utilize outro tile para colocar o actionid.
  4. iRockStar está certo, falta o cid na função: function onAddItem(moveitem, tileitem, position, cid) return doPlayerAddItem(cid,2152,1) end O cid na função onAddItem foi adicionado na versão para Tibia 8.4 da maioria dos OT's.
  5. No primeiro faltou declarar as variáveis msg1, msg3 e status, mas na verdade nem precisa do resto se só for pra pisar encima e aparecer a mensagem "Que Frio!": ----- Script by LucasAtak ---- function onStepIn(cid, item, position, fromPosition) doSendAnimatedText(getPlayerPosition(cid), "Que Frio!", TEXTCOLOR_LIGHTBLUE) end Sobre o segundo, eu não tenho idéia do que está errado, mas tente esse: local config = { exhaustionInSeconds = 30, storage = 34534 } function onSay(cid, words, param) if(exhaustion.check(cid, config.storage) == TRUE) then doPlayerSendCancel(cid, "Você pode alterar o outfits apenas 1 vez por" .. config.exhaustionInSeconds .. " seconds.") return TRUE end local playerGuild = getPlayerGuildId(cid) if(playerGuild == FALSE) then doPlayerSendCancel(cid, "Desculpe, você não está em uma guild.") return TRUE end local playerGuildLevel = getPlayerGuildLevel(cid) if(playerGuildLevel < GUILDLEVEL_LEADER) then doPlayerSendCancel(cid, "Você tem que ser líder de sua guilda para mudar os outfits!") return TRUE end local players = getPlayersOnline() local outfit1 = getCreatureOutfit(cid) local message = "*Guild* Seu outfit foi alterado pelo líder. (" .. getCreatureName(cid) .. ")" local members = 0 local tmp = outfit1 for i, tid in ipairs(players) do if(getPlayerGuildId(tid) == playerGuild and cid ~= tid) then if(canPlayerWearOutfit(tid, outfit1.lookType, outfit1.lookAddons) ~= TRUE) then local tidOutfit = getCreatureOutfit(tid) tmp.lookType = tidOutfit.lookType tmp.lookAddons = tidOutfit.lookAddons end doSendMagicEffect(getCreaturePosition(tid), 66) doCreatureChangeOutfit(tid, tmp) doPlayerSendTextMessage(tid, MESSAGE_INFO_DESCR, message) members += 1 end end exhaustion.set(cid, config.storage, config.exhaustionInSeconds) doPlayerSendCancel(cid, "Guild members outfit has been changed. (Total: " .. members .. ")") return TRUE end
  6. local vida = getCreatureHealth(cid) setCreatureMaxHealth(monstro, vida) Eu só não sei se é possível seta um nome em um monstro...
  7. Consegui faze ele muda de outfit apenas: function onCastSpell(cid, var) local tipomonstro = "demon" -- Tipo de monstro local nomeplayer = getPlayerName(cid) local roupas = getCreatureOutfit(cid) local playerposit = getPlayerPosition(cid) local monstro = doCreateMonster(tipomonstro, playerposit, false) doCreatureChangeOutfit(monstro, roupas) return 1 end
  8. Coloque esse comando em uma linha vazia qualquer do config.lua: displayGamemastersWithOnlineCommand = 0 ~~ Acho que seu OT não tem o comando getCreatureLookPosition(), tente esse: getCreatureLookDir(cid) É só substituir um pelo outro.
  9. 1º erro: !online Abra o arquivo config.lua e verifique com CRTL+F se existe o seguinte argumento: Se não existir, adicione ele desse modo: displayGamemastersWithOnlineCommand = 0 0 = Não mostra GM no !online. 1 = Mostra GM no !online. ~~ 2º erro: /r Verifique se o erro ocorre caso você fala /r ou não e responda nesse tópico. Se quiser pode testar o meu: function onSay(cid, words, param, channel) local amount = 1 param = tonumber(param) if(param) then amount = tonumber(param) end local toPos = getCreatureLookPosition(cid) toPos.stackpos = STACKPOS_TOP_MOVEABLE_ITEM_OR_CREATURE local tmp = getThingFromPos(toPos) if(tmp.uid ~= 0) then if(isCreature(tmp.uid)) then doRemoveCreature(tmp.uid) else doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount)) end doSendMagicEffect(toPos, CONST_ME_MAGIC_RED) return true end toPos.stackpos = STACKPOS_TOP_FIELD tmp = getThingFromPos(toPos) if(tmp.uid ~= 0) then doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount)) doSendMagicEffect(toPos, CONST_ME_MAGIC_RED) return true end toPos.stackpos = STACKPOS_TOP_CREATURE tmp = getThingFromPos(toPos) if(tmp.uid ~= 0) then doRemoveCreature(tmp.uid) doSendMagicEffect(toPos, CONST_ME_MAGIC_RED) return true end for i = 5, 1, -1 do toPos.stackpos = i tmp = getThingFromPos(toPos) if(tmp.uid ~= 0) then if(isCreature(tmp.uid)) then doRemoveCreature(tmp.uid) else doRemoveItem(tmp.uid, math.min(math.max(1, tmp.type), amount)) end doSendMagicEffect(toPos, CONST_ME_MAGIC_RED) return true end end doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF) return true end
  10. O seu OT possui Globalevents? No globalevents.xml, coloque a linha: <globalevent name="invasao" interval="3600" event="script" value="invasao.lua"/> Interval em segundos. 3600 seg = 1h. Agora crie um script com o nome invasao.lua na pasta scripts com o seguinte conteúdo: function onThink(interval, lastExecution, thinkInterval) local raidnome = "demons" -- Coloque o nome da raid (invasão) aqui. executeRaid(raid) return true end Não esqueça de mudar o nome da invasão no valor da string raidnome.
  11. Na pasta Talkactions\scripts, pegue os scripts do !Online (/online) e /r e poste o conteúdo deles aqui. Além disso, poste uma SS (foto) do erro.
  12. 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 node1 = keywordHandler:addKeyword({'promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 20000 gold coins. Do you want me to promote you?'}) node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'}) node1:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) local node2 = keywordHandler:addKeyword({'second promot'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'I can promote you for 1000000 (1kk) gold coins. Do you want me to promote you?'}) node2:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, cost = 1000000, level = 20, promotion = 2, text = 'Congratulations! You are now special promoted.'}) node2:addChildKeyword({'no'}, StdModule.say, {npcHandler = npcHandler, onlyFocus = true, text = 'Alright then, come back when you are ready.', reset = true}) npcHandler:addModule(FocusModule:new()) ~~ Agora em vocations.xml você cria novas vocações com as ID's 9, 10, 11 e 12. Ex.: <vocation id="9" name="Epic Master Sorcerer" description="an epic master sorcerer" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="90" manamultiplier="1.1" attackspeed="1500" soulmax="299" gainsoulticks="15" fromvoc="5" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="2.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="2.0"/> <skill id="2" multiplier="2.0"/> <skill id="3" multiplier="2.0"/> <skill id="4" multiplier="2.0"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="10" name="Epic Elder Druid" description="an epic elder druid" needpremium="0" gaincap="10" gainhp="5" gainmana="30" gainhpticks="4" gainhpamount="10" gainmanaticks="2" gainmanaamount="90" manamultiplier="1.1" attackspeed="1500" soulmax="299" gainsoulticks="15" fromvoc="6" lessloss="30"> <formula meleeDamage="1.0" distDamage="1.0" wandDamage="2.0" magDamage="1.2" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.5"/> <skill id="1" multiplier="1.8"/> <skill id="2" multiplier="1.8"/> <skill id="3" multiplier="1.8"/> <skill id="4" multiplier="1.8"/> <skill id="5" multiplier="1.5"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="11" name="Epic Royal Paladin" description="an epic royal paladin" needpremium="0" gaincap="20" gainhp="10" gainmana="15" gainhpticks="3" gainhpamount="50" gainmanaticks="3" gainmanaamount="40" manamultiplier="1.4" attackspeed="1500" soulmax="299" gainsoulticks="15" fromvoc="7" lessloss="30"> <formula meleeDamage="1.1" distDamage="1.1" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.2"/> <skill id="1" multiplier="1.2"/> <skill id="2" multiplier="1.2"/> <skill id="3" multiplier="1.2"/> <skill id="4" multiplier="1.1"/> <skill id="5" multiplier="1.1"/> <skill id="6" multiplier="1.1"/> </vocation> <vocation id="12" name="Epic Elite Knight" description="an epic elite knight" needpremium="0" gaincap="25" gainhp="15" gainmana="5" gainhpticks="8" gainhpamount="60" gainmanaticks="4" gainmanaamount="40" manamultiplier="3.0" attackspeed="1500" soulmax="299" gainsoulticks="15" fromvoc="8" lessloss="30"> <formula meleeDamage="1.2" distDamage="1.0" wandDamage="1.0" magDamage="1.1" magHealingDamage="1.0" defense="1.0" armor="1.0"/> <skill id="0" multiplier="1.1"/> <skill id="1" multiplier="1.1"/> <skill id="2" multiplier="1.1"/> <skill id="3" multiplier="1.1"/> <skill id="4" multiplier="1.4"/> <skill id="5" multiplier="1.1"/> <skill id="6" multiplier="1.1"/> </vocation> Retirado do XvX Server 8.50.
  13. No meu script se coloca os dias através de um parâmetro: !buypremium <dias> Ex.: !buypremium 100 Compra 100 dias. !buypremium Sem parâmetro = 1 dia. ~~~~ Poste nesse tópico o seu script caso queira que eu configure ele.
  14. Você esta declarando 2 vezes a mesma array, script arrumado: thirdQuests = { [5] = {{"warlock", 100},{"demon", 500},{"morgaroth", 10},{"orshabaal", 20}} , [6] = {{"warlock", 100},{"demon", 500},{"morgaroth", 10},{"orshabaal", 20}} , [7] = {{"warlock", 200},{"demon", 500},{"morgaroth", 10},{"orshabaal", 10}} , [8] = {{"demon", 800},{"orshabaal", 30},{"morgaroth", 10},{"ghazbaran", 2}} } function startFocusStorage(cid) setPlayerStorageValue(cid, thirdConfig.questStorage, 1) for k, v in pairs(thirdConfig.monsterStorage) do setPlayerStorageValue(cid, v, 0) end return true end function getFocusKills(cid) t = {} for k,v in pairs(thirdConfig.monsterStorage) do output = getPlayerStorageValue(cid, v) table. insert(t, output) end return t end function showFocusKills(cid) s = "Focus Quest Defeat List: \n\n" index = 0 voc = getPlayerVocation(cid) for k,v in pairs(getFocusKills(cid)) do index = index+1 monster = thirdQuests[voc][index] s = s..monster[1]..": "..v.." / "..monster[2].."\n" end return doShowTextDialog(cid, 100, s) end function getFocusKill(cid, monster) voc = getPlayerVocation(cid) set = thirdQuests[voc] for k,v in pairs(set) do if v[1] == monster then return getPlayerStorageValue(cid, thirdConfig.monsterStorage[k]) end end return false end function addFocusKill(cid, monster, much) count = much or 1 kills = getFocusKill(cid, monster) voc = getPlayerVocation(cid) set = thirdQuests[voc] for k,v in pairs(set) do if v[1] == monster and kills < v[2] then return setPlayerStorageValue(cid, thirdConfig.monsterStorage[k], kills+count) end end return false end function checkFocus(cid, monster) kills = getFocusKill(cid, monster) voc = getPlayerVocation(cid) set = thirdQuests[voc] for k,v in pairs(set) do if v[1] == monster and kills < v[2] then return false elseif v[1] == monster and kills >= v[2] then return true end end return false end function checkAllFocus(cid) kills = getFocusKills(cid) status = true voc = getPlayerVocation(cid) set = thirdQuests[voc] for k,v in pairs(kills) do monster = set[k] if v < monster[2] then status=false end end return status end function addFocusPromotion(cid) return setPlayerPromotionLevel(cid, 2) end function focusMonsterByName(name, voc) t = thirdQuests[voc] for k,v in pairs(t) do if v[1] == name then return v end end return false end
  15. Esse é o meu script modificado: Caso queira que eu modifique o seu, poste o conteúdo do arquivo nesse tópico.
  16. Você muda o 3º parâmetro: setCombatParam(combat, 33,CONST_ME_MAGIC_BLUE)
  17. Caso ainda não tenha resolvido o problema: Uma determinada ação se chama nuking quando uma pessoa tenta derrubar a conecção da outra enviando dados em excesso, fazendo com que ela não aguente e "caia". No seu caso é um bug relacionado ao axe, siga essas instruções: Caso você conheça o ID do machado, pule para o segundo passo. 1º passo - Abra o arquivo items.xml da pasta data\items\, aperte CTRL+F, procure pelo nome do machado e pegue a ID (identidade). 2º passo - Na pasta data\weapons, abra o arquivo weapons.xml, aperte CTRL+F, procure pelo ID do machado e, caso exista a tag da arma, pegue o valor da variável value. Esse valor é o script utilizado para o item, abra a pasta scripts, abra o script da arma e poste nesse tópico o código que está nele. Caso não exista o arquivo de script, envie maiores informações sobre o erro, incluindo a versão do OT e como é possível "bugar" o axe: dando "use with..." nele, usando ele em alguma quest, etc. ;D
  18. lucasjockey

    [item]

  19. Tente mudar esse comando: doPlayerSetVocation(cid, getPlayerVocation(cid)+4) Para: setPlayerPromotionLevel(cid, 1)
  20. shutdownAtGlobalSave = "yes" Traduza para português. Para arrumar é só colocar um NO: shutdownAtGlobalSave = "no"
  21. Em Data\spells, no arquivo spells.xml, existem as seguintes linhas de magias para conjuração de runas: Modifique o valor do parâmetro conjureCount. Faça isso com todas as magias.
  22. lucasjockey

    Runas

    Você pode mudar as fórmulas também: min = (level * 1 + maglevel * 5) * 2.3 - 25 max = (level * 1 + maglevel * 5) * 2.8
  23. Como zaitch disse, é impossível concatenar uma string com um valor numérico inteiro. Também não se pode chamar uma função que necessita de um parâmetro numérico com uma string: Linha 59: Errado: verif = getPlayerGuildId(nick) Correto: verif = getPlayerGuildId(cid)
  24. local exhaust = createConditionObject(CONDITION_EXHAUST) setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100)) local FRASES = {"JÁ VOLTO!", "VOLTO JÁ!", "AUSENTE!", "AFK!", "OFF-LINE!", "NÃO TO!"} -- Auto-Mensagens. local TEMPO = 2 -- Intervalo de Tempo em segundos. local function doSendAutoMessage(cid, pos) if (isCreature(cid) == TRUE) then npos = getThingPos(cid) if (pos.x == npos.x) and (pos.y == npos.y) and (pos.z == npos.z) then doSendAnimatedText(pos, FRASES[math.random(#FRASES)], 215) doSendMagicEffect(pos, 2) addEvent(doSendAutoMessage, TEMPO*1000, cid, npos) end end end function onSay(cid, words, param) if hasCondition(cid, CONDITION_EXHAUST_HEAL) == TRUE then doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED) return TRUE end pos = getThingPos(cid) doSendAnimatedText(pos, FRASES[math.random(#FRASES)], 215) doSendMagicEffect(pos, 2) doPlayerSendCancel(cid, "AFK ligado!") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "AFK ligado!.") addEvent(doSendAutoMessage, TEMPO*1000, cid, pos) return TRUE end
  25. Claro, mas só coloque onde está a string "yes": node1:addChildKeyword({'yes'}, StdModule.promotePlayer, {npcHandler = npcHandler, premium = 1, cost = 20000, level = 20, promotion = 1, text = 'Congratulations! You are now promoted.'})
  • Quem Está Navegando   0 membros estão online

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