Ir para conteúdo

vankk

Membro
  • Registro em

  • Última visita

Tudo que vankk postou

  1. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Provavelmente o optional.h já deve estar na pasta src, se não tiver, apenas crie um arquivo, renomeie para optional.h, e copia o código e coloca nele.
  2. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Exatamente.
  3. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    player.cpp procure por DEATH_LOSE_PERCENT. Boa sorte, não mexo com sources, HAHAHA.
  4. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Nas sources do meu test server aqui, eu reverti os scripts, é funcionou perfeitamente. Recomendo melhor reverter os scripts que demora 2 minutos do que instalar o VS 2015 que é um ano para instalar.
  5. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Voce tem que colocar as coisas como está em vermelho. Simplificando, a parte da direita que voce precisa tirar, e tem que deixar igual a parte da esquerda. Não sei qual a melhor explicacao, HAHAHA.
  6. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Para voce arrumar esse problema voce precisa reverter os codigos: https://github.com/otland/forgottenserver/commit/7e06dafad640deb06c1c5290d25eff46fb1b77a3 ou instalar VS 2015.
  7. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Que "error" de compilar?
  8. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    é pelo config.lua 10 é para a formula antiga, mais experiencia, tenta dar uma olhada na sua sources. -- NOTE: Leave deathLosePercent as -1 if you want to use the default -- death penalty formula. For the old formula, set it to 10. For -- no skill/experience loss, set it to 0.
  9. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Edita na pasta da versão do mapa os items.xml: <item id="8058" article="a" name="mystic flame"> <attribute key="description" value="You feel drawn to the mesmerizing light." /> <attribute key="type" value="teleport" /> <attribute key="effect" value="teleport" /> </item>
  10. 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 pos = {x=1, y=2, z=3} local ppos = getCreaturePosition(cid) if isPremium(cid) then if getPlayerLevel(cid) > 7 then if msgcontains(msg, 'edron') then selfSay('Do you want to Travel to Edron for 110 gold coins?', cid) talkState[talkUser] = 1 elseif(msgcontains(msg, 'yes') and talkState[talkUser] == 1) then if not isPlayerPzLocked(cid) then if (doPlayerRemoveMoney(cid, 110)) then selfSay('Set the sails!', cid) doSendMagicEffect(ppos, CONST_ME_TELEPORT) doTeleportThing(cid, pos) doSendMagicEffect(ppos, CONST_ME_TELEPORT) talkState[talkUser] = 0 else selfSay('Sorry, you don\'t have enough gold.', cid) end else selfSay('First get rid of those blood stains! You are not going to ruin my vehicle!', cid) talkState[talkUser] = 0 end elseif(msgcontains(msg, 'no') and isInArray({1}, talkState[talkUser])) then talkState[talkUser] = 0 selfSay('Ok then.', cid) end else selfSay('You need to be level 8 up to travel in this boat.', cid) talkState[talkUser] = 0 end else selfSay('You need be premium account to travel with me.', cid) talkState[talkUser] = 0 end return true end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new())
  11. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    https://otland.net/threads/no-damage-to-guildmates-and-no-damage-to-party-members.139041/ Tenta ai, se não funcionar não sei o problema. PS: Reinicia o servidor para ter certeza!
  12. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    voce usa TFS 0.4, ne? Se sim.. Troca <event type="combat" name="attackguild" script="attackguild.lua"/> por<event type="combat" name="attackguild" event="script" value="attackguild.lua"/>
  13. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Manda a linha 269 do latestnews.php
  14. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Algum erro no console ou simplesmente não funciona?
  15. O script está com problema para fechar a função, manda o vipAccount.lua que está na lib.
  16. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Como está registrado no seu creaturescripts.xml e no login.lua?
  17. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Qual TFS voce esta usando? Voce registrou em creaturescripts, e no login.lua?
  18. Se não funcionar, eu não tenho ideia: function onStatsChange(cid, attacker, type, combat, value) if (getCreatureStorage(cid, 21500) == 1) then local speed = 30 -- speed doChangeSpeed(cid, speed) if math.random(2) == 1 then -- 50% if isPlayer(attacker) or isMonster(attacker) then if type == STATSCHANGE_HEALTHLOSS then local value = math.ceil(value * 0.2) doTargetCombatHealth(attacker, cid, COMBAT_UNDEFINEDDAMAGE, -value, -value, CONST_ME_DRAWBLOOD) --doPlayerSendTextMessage(attacker,MESSAGE_DAMAGE_DEALT,"Player "..getCreatureName(cid).." loses "..value.." hitpoints due to an attack by you.") --doPlayerSendTextMessage(cid,MESSAGE_DAMAGE_DEALT,"You loose "..value.." hitpoints due to an attack by " .. getCreatureName(attacker)) doSendAnimatedText(getCreaturePosition(cid), value,TEXTCOLOR_RED) return false end end end end return true end
  19. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    Achei esse script no google, então não tenho ideia de como está: Lembresse de editar os monster, na linha 21. local target = 0 local prevTarget = 0 local maxChaseDistance = 7 local origPos = 0 local lastAttack = 0 local followTimeout = 10 local function goToOrigPos() target = 0 lastAttack = 0 selfFollow(0) doSteerCreature(getNpcCid(), origPos) end local function updateTarget() if(target == 0) then local list = getSpectators(origPos, 7, 7, false) for i = 1, table.getn(list) do local _target = list if(_target ~= 0) then local monster = {"Wolf", "Snake", "Troll", "Bug"} if(isInArray(monster, getCreatureName(_target))) then if(not getTilePzInfo(getCreaturePosition(_target))) then if(selfFollow(_target)) then target = _target if(target ~= prevTarget) then selfSay("Everyone get to safety! I'll take care of this "..getCreatureName(_target).."!") end prevTarget = target break end end end end end end end function onCreatureAppear(cid) if(cid == getNpcCid()) then origPos = getNpcPos() end end function onCreatureDisappear(cid) if(cid == target) then goToOrigPos() end end function onCreatureMove(creature, oldPos, newPos) -- end function onThink() updateTarget() if(target == 0) then return end local playerPos = getCreaturePosition(target) local myPos = getNpcPos() if(myPos.z ~= playerPos.z) then goToOrigPos() return end if(math.abs(myPos.x - origPos.x) > maxChaseDistance or math.abs(myPos.y - origPos.y) > maxChaseDistance) then selfSay("I'll get it next time...") goToOrigPos() return end if(lastAttack == 0) then lastAttack = os.clock() end if(os.clock() - lastAttack > followTimeout) then selfSay("I'll get you next time.") goToOrigPos() return end if((math.abs(playerPos.x - myPos.x) <= 1) and (math.abs(playerPos.y - myPos.y) <= 1)) then doTargetCombatHealth(getNpcCid(), target, COMBAT_LIFEDRAIN, -5, -25, CONST_ME_BLOCKHIT) lastAttack = os.clock() end end
  20. Eu não entendi direito, voce quer que reflete o dano apenas de jogadores ou para monstros? Ou para ambos? E os monstros estão healando quando está com o script esta ativado?
  21. Voce nao entendeu, isso é o que voce precisa para colocar o rank no site. Leia os scripts com mais atencão
  22. Bota para quando o jogador ganha o evento inserir uma query. Boa sorte: query db.query("INSERT INTO `games` (`id`, `player`, `score`) VALUES (NULL, '" .. getPlayerGUID(cid) .. "', 'STORAGE EVENT +1');") mysql CREATE TABLE IF NOT EXISTS `games` ( `id` int(11) NOT NULL AUTO_INCREMENT, `player` int(11) DEFAULT NULL, `score` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ; select no website $record = $SQL->query('SELECT `p`.`name` AS `name`, `p`.`id` AS `id`, `player`,`score` FROM `games` LEFT JOIN `players` p ON `games`.`player` = `p`.`id` ORDER BY `score` DESC LIMIT 4')->fetch();
  23. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    function onCombat(cid, target) if(isPlayer(cid) and isPlayer(target)) then if(getPlayerGuildId(cid) == getPlayerGuildId(target)) then return false end end return true end
  24. vankk postou uma resposta no tópico em Suporte Tibia OTServer
    local target = 0 local prevTarget = 0 local maxChaseDistance = 20 local origPos = 0 local origDir = NORTH local lastAttack = 0 local followTimeout = 10 local function isSkulled(cid) local idType = isPlayer(cid) if (idType ~= 1) then return true end return false end local function goToOrigPos() target = 0 lastAttack = 0 selfFollow(0) doTeleportThing(getNpcCid(), origPos) end local function updateTarget() if(isPlayer(target) == FALSE) then goToOrigPos() elseif(not isSkulled(target)) then target = 0 selfSay("Now, behave in the future.") end if isMonster(target) then if(target == 0) then local list = getSpectators(getNpcPos(), 8, 8, false) for i=1, table.getn(list) do local _target = list[i] if(_target ~= 0) then if(isPlayer(_target) == TRUE and isSkulled(_target)) then if(selfFollow(_target)) then target = _target if(target ~= prevTarget) then selfSay("We do not tolerate people like you here!") end prevTarget = target break end end end end end end end function onCreatureAppear(cid) if(cid == getNpcCid()) then --Wake up call origPos = getNpcPos() --origLook = getCreatureDir(cid) end end function onCreatureDisappear(cid) if(target == cid) then goToOrigPos() end end function onCreatureMove(creature, oldPos, newPos) -- end function onThink() updateTarget() if(target == 0) then return end local playerPos = getCreaturePosition(target) local myPos = getNpcPos() if(myPos.z ~= playerPos.z) then goToOrigPos() return end if(math.abs(myPos.x - origPos.x) > maxChaseDistance or math.abs(myPos.y - origPos.y) > maxChaseDistance) then selfSay("I'll catch you next time.") goToOrigPos() return end if(lastAttack == 0) then lastAttack = os.clock() end if(os.clock() - lastAttack > followTimeout) then --To prevent bugging the npc by going to a place where he can't reach selfSay("You got me this time, but just wait.") goToOrigPos() return end if( (math.abs(playerPos.x - myPos.x) <= 1) and (math.abs(playerPos.y - myPos.y) <= 1)) then doTargetCombatHealth(getNpcCid(), target, COMBAT_LIFEDRAIN, -200, -300, CONST_ME_BLOCKHIT) lastAttack = os.clock() end endTenta ve como que vai ficar..

Informação Importante

Confirmação de Termo