Ir para conteúdo

Crypter

Membro
  • Registro em

  • Última visita

Tudo que Crypter postou

  1. 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 msg = string.lower(msg) local price = 0 local vocations = {1,2,3,4} local level = 20 if isInArray({"promotion","promote","promo"}, msg) then selfSay('Você quer ser promovido?', cid) talkState[talkUser] = 1 elseif msgcontains(msg, 'yes') and talkState[talkUser] == 1 then if isInArray(vocations, getPlayerVocation(cid)) then if getPlayerLevel(cid) >= level then if doPlayerRemoveMoney(cid,price) == TRUE then local new = (getPlayerVocation(cid)+4) db.query("UPDATE `players` SET `vocation` = " .. new .. " WHERE `id` = " .. getPlayerGUID(cid) .. ";") doSendMagicEffect(getCreaturePos(cid), 12) setPlayerStorageValue(cid, 878975, new) addEvent(doRemoveCreature, 1000, cid) doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Parabéns, você foi promovido, sera relogado em 1 segundos.") talkState[talkUser] = 0 else selfSay('Você não tem dinheiro suficiente para ser promovido.', cid) talkState[talkUser] = 0 end else selfSay('Desculpe, você precisa ser level '.. level .. ' ou mais para ser promovido!', cid) talkState[talkUser] = 0 end else selfSay('Desculpe, mais você não pode receber promotion.', cid) talkState[talkUser] = 0 end elseif msg == "no" and talkState[talkUser] >= 1 then selfSay("Tchau então.", cid) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end return TRUE end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  2. Ai vai precisar usar a função OnDeath mais tarde eu faço
  3. local config = { storage = 31520, time = 0.5, -- quanto tempo é agora exibido efeito efekt1 = 21, -- Raio Azul efekt2 = 22, -- Raio Vermelho efekt3 = 23, -- Aura Azul efekt4 = 24, -- Raio Vermelho Longo efekt5 = 33, -- Chamas Negras efekt6 = 45, -- Varios Getsugas efekt7 = 46 -- Aura Vermelha } function onThink(cid, interval) if not exhaustion.check(cid, config.storage) then if getPlayerVocation(cid) == 0 then doSendMagicEffect(getPlayerPosition(cid),config.efekt6) elseif getPlayerVocation(cid) == 4 then doSendMagicEffect(getPlayerPosition(cid),config.efekt1) elseif getPlayerVocation(cid) == 5 then doSendMagicEffect(getPlayerPosition(cid),config.efekt2) elseif getPlayerVocation(cid) == 6 then doSendMagicEffect(getPlayerPosition(cid),config.efekt3) elseif getPlayerVocation(cid) == 7 then doSendMagicEffect(getPlayerPosition(cid),config.efekt4) elseif getPlayerVocation(cid) == 8 then doSendMagicEffect(getPlayerPosition(cid),config.efekt5) elseif getPlayerVocation(cid) == 9 then doSendMagicEffect(getPlayerPosition(cid),config.efekt6) elseif getPlayerVocation(cid) == 10 then doSendMagicEffect(getPlayerPosition(cid),config.efekt7) end exhaustion.set(cid,config.storage,config.time) end return true end
  4. È o tempo que vai executar pra não fica instantâneo , testa minha script me diz se continua o erro...
  5. Do mesmo que a script do seu topico antigo Cria um arquivo com o code. e registra <event type="login" name="PlayerEffect" event="script" value="playereffect.lua"/>
  6. Manda o teu vocations.xml que eu te explico
  7. local t = {access = 7, -- Numero unico text = "Player Beta", textcolor = COLOR_BLUE, effect = 1, interval = 10} function onLogin(cid) if getPlayerAccess(cid) == t.access then SendEffect(cid, t.effect, t.text, t.interval, t.textcolor) end return true end function SendEffect(cid, effect, text, time, color) if isPlayer(cid) then doSendMagicEffect(getPlayerPosition(cid), effect) doSendAnimatedText(getPlayerPosition(cid), text, color) addEvent(SendEffect, time*1000, cid, effect, text, time, color) end return true end
  8. Traduzi a mensagem quando mata; Quando você usa uma função tem que ver qual volores ela pede ( ) function onKill(cid, target, lastHit) if not isPlayer(target) or not isPlayer(cid) then return true end doPlayerSendChannelMessage(cid, "Death-Chat", "O Jogador "..getCreatureName(target).." no nivel ["..getPlayerLevel(target).."] foi morto pelo "..getCreatureName(cid).." que esta level ["..getPlayerLevel(cid).."].", TALKTYPE_CHANNEL_R1, CHANNEL_DEATH) print("oi") return true end
  9. function onThink(cid, interval) local time = 5 addEvent(function() if isPlayer(cid) and (getTilePzInfo(getCreaturePosition(cid))) then doRemoveCondition(cid, CONDITION_INFIGHT) end end, time * 1000) end
  10. Qual o id da vocação do seu personagem que você loga ?
  11. Crypter postou uma resposta no tópico em Suporte Tibia OTServer
    Não vo nem mandar print do teu perfil... Não peguei a script acima de nenhum forum.
  12. txtchao.lua local config = { positions = { ["dasdds"] = { x = 2582, y = 2532, z = 8 }, ["sadsad "] = { x = 2581, y = 2532, z = 8 }, ["sdadsa "] = { x = 2580, y = 2532, z = 8 }, } } function onThink(cid, interval, lastExecution) for text, pos in pairs(config.positions) do doSendAnimatedText(pos, text, 20) end return TRUE end
  13. Crypter postou uma resposta no tópico em Suporte Tibia OTServer
    ^Você não fez essa Script , ja vi milhares de topicos teus aqui no forum...
  14. Crypter postou uma resposta no tópico em Suporte Tibia OTServer
    Recomendo usar essa globalevents do que a gambiarra do cara acima local config = { positions = { ["dasdds"] = { x = 2582, y = 2532, z = 8 }, ["sadsad "] = { x = 2581, y = 2532, z = 8 }, ["sdadsa "] = { x = 2580, y = 2532, z = 8 }, } } function onThink(cid, interval, lastExecution) for text, pos in pairs(config.positions) do doSendAnimatedText(pos, text, 20) end return true end
  15. Crypter postou uma resposta no tópico em Suporte Tibia OTServer
    Mudando a source
  16. Data/movements/vip.lua local txt = "Voce não é premium account ! Acesse o site compre e aproveite o maximo do jogo !" function onStepIn(cid, item, position, fromPosition) if isPremium(cid) == true then doSendMagicEffect(getThingPos(cid), 12) doPlayerSendTextMessage(cid, 25, "Bem vindo a Area Premium!!!") else doTeleportThing(cid, fromPosition, true) doSendMagicEffect(getThingPos(cid), 2) doPlayerPopupFYI(cid, txt) end return true end Registra em movements e poem no piso
  17. Abra o arquivo config.lua e poem o id em deathContainerId=x
  18. Corpse por vocação ou todas com o mesmo?
  19. Crypter postou uma resposta no tópico em Suporte Tibia OTServer
    Adicionou o ICON desse pokemon ?
  20. function onSay(cid, words, param) if(param == "") then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[BUSQUE A CABEÇA] Use: \"!busque [prize],[nick]\" Exemplo de prêmio 1(k).") return TRUE end local t = string.explode(param, ",") if(not t[2]) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[BUSQUE A CABEÇA] Use: \"!busque [prize],[nick]\" Exemplo de prêmio 1(k).") return TRUE end local sp_id = getPlayerGUIDByName(t[2]) if sp_id == nil then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[BUSQUE A CABEÇA] Este player não existe") return TRUE end local result_plr = db.getResult("SELECT * FROM `busque_cabeca` WHERE `sp_id` = "..sp_id.." AND `killed` = 0;") if(result_plr:getID() ~= -1) then is = tonumber(result_plr:getDataInt("sp_id")) result_plr:free() else is = 0 end prize = tonumber(t[1]) if(prize == nil or prize < 1) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[BUSQUE A CABEÇA] Use: \"!busque [prize],[nick]\" Exemplo de prêmio 1(k)" return TRUE end if(prize >= 100000000000000000000) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[BUSQUE A CABEÇA] Desculpe, você digitou um número muito grande") return TRUE end if is ~= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[BUSQUE A CABEÇA] Este player já está sob mandato de morte.") return TRUE end if doPlayerRemoveMoney(cid, prize*1000) == TRUE then db.executeQuery("INSERT INTO `busque_cabeca` VALUES (NULL,"..getPlayerGUID(cid)..","..sp_id..",0," .. os.time() .. ","..prize..",0,0);") doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[BUSQUE A CABEÇA] O Player foi adicionado na lista de morte!") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "[BUSQUE A CABEÇA] Você não tem dinheiro suficiente para oferecer a recompensa nessa cabeça!") end return 1 end Pra arrumar o look , ponha isso em todas Script que setam descrição no Look doPlayerSetSpecialDescription(cid, getPlayerSpecialDescription(cid).... E o resto que tinha antes) usando a função getPlayerSpecialDescription(cid) ele vai pega a descrição antiga
  21. Gostaria de saber como fazer um Summon de enfeite ...Seria um pet, ele não pode ser atacado nem pode atacar monstros/players ele so segue player.
  22. local tempo = 60 -- em segundos local skillpoints = 20 local text = "Ahhhh!" -- mensagem ao usa o item local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo * 1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICPOINTS, skillpoints) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) function onUse(cid, item, frompos, item2, topos) local pos1 = {x = getPlayerPosition(cid).x + 1, y = getPlayerPosition(cid).y + 0, z = getPlayerPosition(cid).z} efeito = doSendMagicEffect(pos1, 78) doTargetCombatCondition(0, cid, condition, efeito) doCreatureSay(cid, text, 19) doRemoveItem(item.uid, 1) return true end
  23. Conseguir arrumar colocando isso aqui addEvent(doSetCreatureOutfit,1,cid, outfit1, -1) Quando eu logava estava Setando direto a Outflit ai o Servidor entendia que aquela era a Outflit fixa ai com esse tempo quando loga seta a Outflit Normal e logo em seguida esse nova e corrigi o problema. Quem diria que seria isso em...
  24. Se o player X usa equipar e o item e sair do jogo e o Player Y equipar o item , quando o Player X entrar ele vai pegar a Outflit do Player Y , Esse era o bug entendeu? Tava tentando fazer aqui usando a função getPlayerID(cid) para inserir na tabela na posição do ID o numero a Outflit antiga pra recolocar tlg @Dwarfer
  25. [ERRO] A Tabela estão entrando em conflinto e o ultimo player a usar é o valor que volta pra newtype... Topico não resolvido ! @Dwarfer Não esta funcionando corretamente sua script , alguma solução para criar uma tabela para cada player ou outro metodo? Aguardo sua resposta.

Informação Importante

Confirmação de Termo