Ir para conteúdo

Rayo

Membro
  • Registro em

  • Última visita

Tudo que Rayo postou

  1. Rayo postou uma resposta no tópico em Suporte Tibia OTServer
    Coloca ai o arquivo PHP da página que faz o registro da conta OU manda o link do local que você baixou o website,para que eu possa verificar esse erro.
  2. Pelo que eu percebi,esse script é de NTO,então deveria está na seção "Script Alternativo". Eu fiz aqui a devida alteração mas não testei(não tenho servidor NTO). Faça o teste! local tempo = 120 -- tempo em segundos. local effect = {322} -- effect no player, caso queira apenas 1, basta remover os outros numeros. local ml = 70 -- quantos ira aumentar o skill de ML local skillfist = 60 -- quantos ira aumentar o skill de Fist local skillsword = 60 -- quantos ira aumentar o skill de Sword local skillaxe = 60 -- quantos ira aumentar o skill de Axe local skillclub = 60 -- quantos ira aumentar o skill de Club local skilldistance = 60 -- quantos ira aumentar o skill de Distance local skillshield = 60 -- quantos ira aumentar o skill de Shield local health = 1300 -- A cada 1 segundo quantos aumentar de vida local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0) local condition = createConditionObject(CONDITION_ATTRIBUTES) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml) setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist) setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword) setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe) setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub) setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance) setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield) setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_HASTE) setConditionParam(condition, CONDITION_PARAM_SPEED, 250) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setCombatCondition(combat, condition) local condition = createConditionObject(CONDITION_REGENERATION) setConditionParam(condition, CONDITION_PARAM_SUBID, 1) setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE) setConditionParam(condition, CONDITION_PARAM_TICKS, tempo*1000) setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health) setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000) setCombatCondition(combat, condition) function magicEffect322(tempo2,tempo3,cid) if (isCreature(cid)) then if getPlayerStorageValue(cid, 109091) > 0 and getCreatureCondition(cid, CONDITION_REGENERATION, 1) then for i=1, #effect do local position = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} doSendMagicEffect(position, effect) end end end end function onCastSpell(cid, var) local position127 = {x=getPlayerPosition(cid).x, y=getPlayerPosition(cid).y, z=getPlayerPosition(cid).z} if getPlayerStorageValue(cid, 109091) ~= 1 or getCreatureCondition(cid, CONDITION_REGENERATION, 1) == false then doCombat(cid, combat, var) tempo2 = 0 while (tempo2 ~= (tempo*1000)) do addEvent(magicEffect322, tempo2, tempo2, tempo*1000, cid) tempo2 = tempo2 + 300 end setPlayerStorageValue(cid, 109091,1) -- storage verifica transformado, quando = 1 player esta transformado. doCreatureSay(cid, "Madara Buff!", TALKTYPE_MONSTER) doSendMagicEffect(position127.x+1, 322) else doPlayerSendCancel(cid, "Sorry, you are transformed.") end end
  3. Algumas distros/base tem limitação de level(999) em seu código fonte e quando ultrapassa esse level causa bug,você ja testou um baiak diferente?só para confirmar...
  4. Coloca o move1.lua, pelo que eu percebi é ela que chama a função CanAttackerInFree.
  5. Você tem que configurar as informações do seu banco de dados no arquivo config.lua
  6. Se a base for TFS 1.3,Segue a vídeo-aula ensinando: https://tibiaking.com/forums/topic/51805-compilando-tfs-13-com-vídeo-aula/
  7. Coloca ai o script LUA do NPC.
  8. function onUse(cid, item, topos, item2, frompos) local myball = getPlayerSlotItem(cid,item) local boost = getItemAttribute(myball.uid, "boost") or 0 local boosts = 0 local summon = getCreatureSummons(cid)[1] if boost >= 10 then broadcastMessage("O jogador ["..getPlayerName(cid).."] alcançou a meta de 10 Boosts! Parabéns!",MESSAGE_INFO_DESCR) return doPlayerSendCancel(cid, "[BOOST] Seu Pokemon Esta No Boost Maximo!.") end if #getCreatureSummons(cid) >= 1 then boosts = boosts + 1 local pokemon = getItemAttribute(myball.uid, "poke") doSetItemAttribute(myball.uid, "boost", boost + boosts) doRemoveItem(item.uid, 1) doSendFlareEffect(getThingPos(cid)) doSendFlareEffect(getThingPos(summon)) doSendAnimatedText(getThingPos(summon), "Boost UP!", 215) doPlayerSendTextMessage(cid, 27, "[BOOST] Parabens, Seu Pokemon "..pokemon..", Foi Boostado .") else return doPlayerSendCancel(cid, "[BOOST] So Pode Usar em Seus Pokemons!.") end return true end Creio que isso resolva, faça o teste e me diga se funcionou corretamente!
  9. É um NPC? coloca o arquivo .LUA dele
  10. Rayo postou uma resposta no tópico em Suporte OTServer Derivados
    Qual base/distro você utiliza?
  11. É bem provavel que você está tentando utilizar uma versão não compilada. Se não tem executavel,é pq não está compilada.
  12. @lordzetros você poderia me passar o link deste grupo? Meu discord é: Thyago Rayo#3531
  13. @ZikaLord Tem algum local deste fórum ou outro , que explique bem o uso dessas variáveis "Storage"?
  14. Não entendi.. no caso você quer modificar esse script para ele da x item por x pontos?
  15. local config = { minlevel = 750, --- level inical para resetar price = 1000000, --- preço inicial para resetar newlevel = 20, --- level após reset priceByReset = 1000000, --- preço acrescentado por reset percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 999, levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset } --- end config function getResets(uid) resets = getPlayerStorageValue(uid, 378378) if resets < 0 then resets = 0 end return resets end 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 function addReset(cid) if(npcHandler:isFocused(cid)) then npcHandler:releaseFocus(cid) end talkState[talkUser] = 0 resets = getResets(cid) setPlayerStorageValue(cid, 378378, resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) local hp = getCreatureMaxHealth(cid) local resethp = hp*(config.percent/2) setCreatureMaxHealth(cid, resethp) local differencehp = (hp - resethp) doCreatureAddHealth(cid, -differencehp) local mana = getCreatureMaxMana(cid) local resetmana = mana*(config.percent/2) setCreatureMaxMana(cid, resetmana) local differencemana = (mana - resetmana) doCreatureAddMana(cid, -differencemana) doRemoveCreature(cid) local description = resets+1 db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]' WHERE `players`.`id`= ".. playerid .."") db.executeQuery("UPDATE `players` SET `level`="..config.newlevel..",`experience`= 0 WHERE `players`.`id`= ".. playerid .."") return true end local newPrice = config.price + (getResets(cid) * config.priceByReset) local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset) if msgcontains(msg, 'reset') then if getResets(cid) < config.maxresets then selfSay('You want to reset your character? It will cost '..newPrice..' gp\'s!', cid) talkState[talkUser] = 1 else selfSay('You already reached the maximum reset level!', cid) end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerMoney(cid) < newPrice then selfSay('Its necessary to have at least '..newPrice..' gp\'s for reseting!', cid) elseif getPlayerLevel(cid) < newminlevel then selfSay('The minimum level for reseting is '..newminlevel..'!', cid) else doPlayerRemoveMoney(cid,newPrice) playerid = getPlayerGUID(cid) addEvent(function() if isPlayer(cid) then addReset(cid) end end, 3000) local number = getResets(cid)+1 local msg ="---[Reset: "..number.."]-- You have reseted! You'll be disconnected in 3 seconds." doPlayerPopupFYI(cid, msg) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no')) and isInArray({1}, talkState[talkUser]) == TRUE then talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Ok.', cid) elseif msgcontains(msg, 'quantity') then selfSay('You have a total of '..getResets(cid)..' reset(s).', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) local config = { minlevel = 750, --- level inical para resetar price = 1000000, --- preço inicial para resetar newlevel = 20, --- level após reset priceByReset = 1000000, --- preço acrescentado por reset percent = 100, ---- porcentagem da vida/mana que você terá ao resetar (em relação à sua antiga vida total) maxresets = 999, levelbyreset = 0 --- quanto de level vai precisar a mais no próximo reset } --- end config function getResets(uid) resets = getPlayerStorageValue(uid, 378378) if resets < 0 then resets = 0 end return resets end 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 function addReset(cid) if(npcHandler:isFocused(cid)) then npcHandler:releaseFocus(cid) end talkState[talkUser] = 0 resets = getResets(cid) setPlayerStorageValue(cid, 378378, resets+1) doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid))) local hp = getCreatureMaxHealth(cid) local resethp = hp*(config.percent/2) setCreatureMaxHealth(cid, resethp) local differencehp = (hp - resethp) doCreatureAddHealth(cid, -differencehp) local mana = getCreatureMaxMana(cid) local resetmana = mana*(config.percent/2) setCreatureMaxMana(cid, resetmana) local differencemana = (mana - resetmana) doCreatureAddMana(cid, -differencemana) doRemoveCreature(cid) local description = resets+1 db.executeQuery("UPDATE `players` SET `description` = ' [Reset: "..description.."]' WHERE `players`.`id`= ".. playerid .."") db.executeQuery("UPDATE `players` SET `level`="..config.newlevel..",`experience`= 0 WHERE `players`.`id`= ".. playerid .."") return true end local newPrice = config.price + (getResets(cid) * config.priceByReset) local newminlevel = config.minlevel + (getResets(cid) * config.levelbyreset) if msgcontains(msg, 'reset') then if getResets(cid) < config.maxresets then selfSay('You want to reset your character? It will cost '..newPrice..' gp\'s!', cid) talkState[talkUser] = 1 else selfSay('You already reached the maximum reset level!', cid) end elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if getPlayerMoney(cid) < newPrice then selfSay('Its necessary to have at least '..newPrice..' gp\'s for reseting!', cid) elseif getPlayerLevel(cid) < newminlevel then selfSay('The minimum level for reseting is '..newminlevel..'!', cid) else doPlayerRemoveMoney(cid,newPrice) playerid = getPlayerGUID(cid) addEvent(function() if isPlayer(cid) then addReset(cid) end end, 3000) local number = getResets(cid)+1 local msg ="---[Reset: "..number.."]-- You have reseted! You'll be disconnected in 3 seconds." doPlayerAddItem(cid,8300) doPlayerPopupFYI(cid, msg) talkState[talkUser] = 0 npcHandler:releaseFocus(cid) end talkState[talkUser] = 0 elseif(msgcontains(msg, 'no')) and isInArray({1}, talkState[talkUser]) == TRUE then talkState[talkUser] = 0 npcHandler:releaseFocus(cid) selfSay('Ok.', cid) elseif msgcontains(msg, 'quantity') then selfSay('You have a total of '..getResets(cid)..' reset(s).', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) É só testar
  16. Em qual arquivo está dando esse erro?A explicação é que o script está tentando inserir na tabela players do banco de dados, um registro que jáexiste. 
  17. Você tem como tirar uma print screen do erro e mandar? fica mais fácil de ajuda-lo!
  18. Esta faltando o arquivo SQL(do banco de dados).
  19. Rayo postou uma resposta no tópico em Suporte Tibia OTServer
    Apresenta algum erro no terminal?Qual distribuição você utiliza?(TFS,OTBR..etc)
  20. Eu tive um problema parecido e a solução foi trocar de cliente. Ja tentou atualizar o tibia.spr e o tibia.dat?Não sei se resolve,mas é como se o cliente estivesse encontrando alguma incompatibilidade.
  21. Você está usando OTC? ele tem um arquivo chamado otclientrc.lua que você precisa colocar o IP que conectará o client ao servidor.
  22. Não entendi bem... Mas creio que isto resolva: local posicao = Position(0,0,0) dropEffect((posicao.x+1,posicao.y+1),eff,n) function dropEffect(pos, eff, n) if n > 0 then doSendMagicEffect(pos, eff) addEvent(dropEffect, 1000, pos, eff, n-1) end end
  23. @Danyel Varejao realmente,faltou compilar o arquivo luascript.cpp! Agora funcionou!Obrigado! Rep+
  24. Entendi amigo,eu tenho ideia do que seja..mas só com essa página fica difícil de encontrar o erro com exatidão,pode ser que esteja faltando algum fechamento de escopo entre as condições If,Else... Mas para eu ajudar eu preciso do original..pq você não tenta instalar outro website? tem vários tutoriais aqui no fórum

Informação Importante

Confirmação de Termo