Ir para conteúdo

L3K0T

Membro
  • Registro em

  • Última visita

Tudo que L3K0T postou

  1. código é pra tfs 0.4 protocoll 8.60
  2. L3K0T postou uma resposta no tópico em Sprites
    só baixar e recortar uai... fundo tá transparentes
  3. L3K0T postou uma resposta no tópico em Códigos C++
    tem um erro ao compilar em TFS 0.4 então fui verificar seu código e arrumei para tfs 0.4 era apenas um errinho simples const std::list<Creature*>& summons = creature->getSummons(); CreatureList::const_iterator itt = summons.begin(); for(uint32_t i = 1; itt != summons.end(); ++itt, ++i) { if (i >= 1 && *itt) { if((isHostile() || isSummon() || !isHostile() || getHealth() != getMaxHealth()) && setAttackedCreature(*itt) && !isSummon()) Dispatcher::getInstance().addTask(createTask( boost::bind(&Game::checkCreatureAttack, &g_game, getID()))); return setFollowCreature(*itt, true); } }
  4. que autor ? sendo que eh 8.60 pq eu não achei pra 8.60 penas pra 8.54 e não deu certo pra mim
  5. Olá pessoal, estava atrás dessa função doPlayerOpenChannel para tfs 0.4. O que essa função faz ? é simples essa função eh inserida em seu login.lua assim fazendo abrir um Canal tipo Help auto open e configurado. Ó vamos precisar da source para versão 8.60 tfs 0.4. primeiramente vamos abrir o arquivo LuaScript.cpp. Procura: //getChannelUsers(channelId) lua_register(m_luaState, "getChannelUsers", LuaInterface::luaGetChannelUsers); add em baixo: //doPlayerOpenChannel(cid, channelId) lua_register(m_luaState, "doPlayerOpenChannel", LuaInterface::luaDoPlayerOpenChannel); procura: int32_t LuaInterface::internalGetPlayerInfo(lua_State* L, PlayerInfo_t info) add acima: int32_t LuaInterface::luaDoPlayerOpenChannel(lua_State* L) { //doPlayerOpenChannel(cid, channelId) uint32_t channelId = popNumber(L); uint32_t cid = popNumber(L); ScriptEnviroment* env = getEnv(); Player* player = env->getPlayerByUID(cid); if(player) lua_pushnumber(L, g_game.playerOpenChannel(cid, channelId) ? true : false); else { errorEx(getError(LUA_ERROR_PLAYER_NOT_FOUND)); lua_pushnumber(L, false); } return 1; } agora em LuaScript.h procura static int32_t luaGetChannelUsers(lua_State* L); add em baixo: static int32_t luaDoPlayerOpenChannel(lua_State* L); Agora eh só compilar há não esqueça de apagar tudo da pasta obg e o chache do linux caso não apague pode dar erro ao ligar o server... vlws pessoal tmj! Usando. doPlayerOpenChannel(cid, 9) 9 = ID do chat em Channels.xml em Data/XML boa sorte com seus scripts pegando essa função e colocar em login.lua ela abrirá o Chat Help senho o numero 9 ID do chat Vídeo:
  6. local fishing = { [-1] = { segs = 5, pokes = {{"Magikarp", 5}} }, [3976] = { segs = 5, pokes = {{"Horsea", 5}, {"Remoraid", 3}, {"Goldeen", 3}, {"Poliwag", 2}, {"Swinub", 2}} }, -- pega no client da pxg [12855] = { segs = 5, pokes = {{"Tentacool", 3}, {"Staryu", 2}, {"Krabby", 3}, {"Shellder", 2}, {"Omanyte", 3}} }, [12854] = { segs = 5, pokes = {{"Seel", 2}, {"Chinchou", 2}, {"Slowpoke", 2}, {"Kabuto", 2}, {"Psyduck", 2}, {"Wooper", 2}} }, [12858] = { segs = 5, pokes = {{"Seaking", 2}, {"Seadra", 2}, {"Poliwhirl", 2}, {"Squirtle", 2}, {"Totodile", 2}} }, [12857] = { segs = 5, pokes = {{"Starmie", 2}, {"Kingler", 2}, {"Corsola", 2}, {"Qwilfish", 2}} }, -- pega no client da pxg [12860] = { segs = 2, pokes = {{"Lanturn", 2}, {"Dewgong", 2}, {"Slowbro", 2}, {"Azumarill", 2}} }, [12859] = { segs = 2, pokes = {{"Cloyster", 2}, {"Poliwrath", 2}, {"Politoed", 2}, {"Octillery", 2}} }, [12856] = { segs = 2, pokes = {{"Dratini", 3}, {"Quagsire", 2}, {"Dragonair", 2}, {"Omastar", 2}, {"Lapras", 1}} }, [12853] = { segs = 2, pokes = {{"Gyarados", 1}, {"Mantine", 1}, {"Tentacruel", 1}, {"Kingdra", 1}, {"Giant Magikarp", 1}, {"Feraligatr", 1}, {"Blastoise", 1}} }, } local storageP = 154585 local sto_iscas = 5648454 --muda aki pra sto q ta no script da isca local bonus = 85 local limite = 100 local function doFish(cid, pos, ppos, interval) if not isCreature(cid) then return false end if getThingPos(cid).x ~= ppos.x or getThingPos(cid).y ~= ppos.y then return false end doSendMagicEffect(pos, CONST_ME_LOSEENERGY) if interval > 0 then addEvent(doFish, 1000, cid, pos, ppos, interval-1) return true end local peixe = 0 local playerpos = getClosestFreeTile(cid, getThingPos(cid)) local fishes = fishing[getPlayerStorageValue(cid, sto_iscas)] local random = {} if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus * 5) end --[[if math.random(1, 100) <= chance then if getPlayerSkillLevel(cid, 6) < limite then doPlayerAddSkillTry(cid, 6, bonus * 5) end]] random = fishes.pokes[math.random(#fishes.pokes)] for i = 1, math.random(random[2]) do peixe = doSummonCreature(random[1], playerpos) if not isCreature(peixe) then setPlayerStorageValue(cid, storageP, -1) doRemoveCondition(cid, CONDITION_OUTFIT) return true end doSetMonsterPassive(peixe) doWildAttackPlayer(peixe, cid) doCreatureSetLookDir(cid, getDirectionTo(getThingPos(cid), getThingPos(peixe))) --alterado ver depois if #getCreatureSummons(cid) >= 1 then doSendMagicEffect(getThingPos(getCreatureSummons(cid)[1]), 0) doChallengeCreature(getCreatureSummons(cid)[1], peixe) else doSendMagicEffect(getThingPos(cid), 0) doChallengeCreature(cid, peixe) end end setPlayerStorageValue(cid, storageP, -1) doRemoveCondition(cid, CONDITION_OUTFIT) return true end local waters = {4614, 4615, 4616, 4617, 4618, 4619, 4608, 4609, 4610, 4611, 4612, 4613, 7236, 4614, 4615, 4616, 4617, 4618, 4619, 4620, 4621, 4622, 4623, 4624, 4625, 4665, 4666, 4820, 4821, 4822, 4823, 4824, 4825} function onUse(cid, item, fromPos, itemEx, toPos) if getPlayerGroupId(cid) == 11 then return true end local checkPos = toPos checkPos.stackpos = 0 if getTileThingByPos(checkPos).itemid <= 0 then doPlayerSendCancel(cid, '!') return true end if not isInArray(waters, getTileInfo(toPos).itemid) then return true end if (getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 63215) >= 1) and not canFishWhileSurfingOrFlying then doPlayerSendCancel(cid, "You can't fish while surfing/flying.") return true end if isInArray(waters, getTileInfo(getThingPos(cid)).itemid) then doPlayerSendCancel(cid, "You can\'t fish while surfing neither flying above water.") return true end if getTileInfo(getThingPos(getCreatureSummons(cid)[1] or cid)).protection then doPlayerSendCancel(cid, "You can't fish pokémons if you or your pokémon is in protection zone.") return true end if not isInArray({520, 521}, getCreatureOutfit(cid).lookType) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need fisher outfit for fishing.") end local delay = fishing[getPlayerStorageValue(cid, sto_iscas)].segs if getPlayerStorageValue(cid, sto_iscas) ~= -1 then if getPlayerItemCount(cid, getPlayerStorageValue(cid, sto_iscas)) >= 1 then doPlayerRemoveItem(cid, getPlayerStorageValue(cid, sto_iscas), 1) else setPlayerStorageValue(cid, sto_iscas, -1) end end local outfit = getCreatureOutfit(cid) local out = getPlayerSex(cid) == 0 and 1467 or 1468 doSetCreatureOutfit(cid, {lookType = out, lookHead = outfit.lookHead, lookBody = outfit.lookBody, lookLegs = outfit.lookLegs, lookFeet = outfit.lookFeet}, -1) setPlayerStorageValue(cid, storageP, 1) --alterei looktype doCreatureSetNoMove(cid, false) doFish(cid, toPos, getThingPos(cid), math.random(5, delay)) return true end
  7. L3K0T postou uma resposta no tópico em Suporte Tibia OTServer
    <talkaction words="!phenac" event="script" value="teleporte.lua"/> fiz aqui ó local enviarplayerpara = {x = 1001, y = 2307, z =8} -- Para onde o player vai ?--. local tempo = 30 --tempo pra usar dnv ?-- local storage, exhaust = 94360, 30 function onSay(cid, words, param, condition, channel) if getPlayerLevel(cid) >= 25 then --25 eh o level-- if not isPremium(cid) then --VIP-- if not getCreatureCondition(cid, CONDITION_INFIGHT) then if (getPlayerStorageValue(cid, storage) <= os.time()) then doPlayerSendTextMessage(cid,25,"Personagem Teleportado!") doTeleportThing(cid, enviarplayerpara) doSendMagicEffect(getCreaturePosition(cid),21) setPlayerStorageValue(cid, storage, os.time()+exhaust) else doPlayerSendCancel(cid, "Você so pode usar o comando daqui a "..exhaust.." segundos.") end else doPlayerSendCancel(cid, "Você está em batalha.") end else doPlayerSendCancel(cid, "Você não eh VIP.") end else doPlayerSendCancel(cid, "Você ão tem level 25.") end return true end comando >> !phenac
  8. L3K0T postou uma resposta no tópico em Websites
    eu tenho ele vou passar pra vcs assim que eu por no media fire
  9. eu postei um tutorial aumentando esse limite.... http://www.tibiaking.com/forum/topic/67042-adicionando-novos-efeitos-de-dist%C3%A2ncia-x/
  10. thanks you
  11. ip dinâmico trocando ? '-'
  12. só configurar posso ajudar vc!
  13. fala pessoal agora que estou com net boa,, posso então ensinar todos mexerem em seu cliente com direito há vídeo aula é simples e facil... Hoje vamos aprender no modo fácil como troca seu icone de seu cliente de qualquer tipo de servidor, baseado em tibia etc... **Requerimento** *1 ResHAck versão antiga. Para baixa >> resource Hacker.rar *1 Cliente para editar seu icone a gosto. Assistindo vídeo aula em modo fácil...
  14. tbm estou atrás pelo menos um amostra
  15. heal tenta assim local posis = { --[storage da city] = {pos da nurse na city}, [897530] = {x = 1037, y = 1031, z = 7}, --saffron --alterado v1.9 \/ [897531] = {x = 1045, y = 879, z = 7}, --cerulean [897532] = {x = 1189, y = 1021, z = 7}, --lavender [897533] = {x = 1199, y = 1475, z = 7}, --fuchsia [897534] = {x = 847, y = 1011, z = 6}, --celadon [897535] = {x = 689, y = 1065, z = 7}, --viridian [897536] = {x = 1030, y = 1222, z = 7}, --vermilion [897537] = {x = 702, y = 834, z = 6}, --pewter [897538] = {x = 732, y = 1162, z = 7}, --Pallet [897539] = {x = 744, y = 1325, z = 7}, --Cinnabar [897540] = {x = 1631, y = 1055, z = 6}, --Singer [897541] = {x = 1631, y = 1664, z = 7}, --Hunter Village [897542] = {x = 1491, y = 1817, z = 7}, --Sunshine } function onThingMove(creature, thing, oldpos, oldstackpos) end function onCreatureAppear(creature) end function onCreatureDisappear(cid, pos) if focus == cid then selfSay('Ate mais treinador!') focus = 0 talk_start = 0 end end function onCreatureTurn(creature) end function msgcontains(txt, str) return (string.find(txt, str) and not string.find(txt, '(%w+)' .. str) and not string.find(txt, str .. '(%w+)')) end function onCreatureSay(cid, type, msg) local msg = string.lower(msg) local talkUser = NPCHANDLER_CONVBEHAVIOR == CONVERSATION_DEFAULT and 0 or cid for a, b in pairs(gobackmsgs) do local gm = string.gsub(b.go, "doka!", "") local bm = string.gsub(b.back, "doka!", "") if string.find(string.lower(msg), string.lower(gm)) or string.find(string.lower(msg), string.lower(bm)) then return true end end if((msgcontains(msg, 'hi') or msgcontains(msg, 'heal') or msgcontains(msg, 'help')) and (getDistanceToCreature(cid) <= 3)) then if exhaustion.get(cid, 9211) then selfSay('Please wait a few moment before asking me to heal your pokemons again!') return true end if not getTileInfo(getThingPos(cid)).protection and nurseHealsOnlyInPZ then selfSay("Please, get inside the pokémon center to heal your pokemons!") return true end if getPlayerStorageValue(cid, 52480) >= 1 then selfSay("You can't do that while in a Duel!") --alterado v1.6.1 return true end for e, f in pairs(posis) do local pos = getThingPos(getNpcCid()) if isPosEqual(pos, f) then if getPlayerStorageValue(cid, e) <= -1 then --alterado v1.7 setPlayerStorageValue(cid, e, 1) end end end exhaustion.set(cid, 9211, 5) doCreatureAddHealth(cid, getCreatureMaxHealth(cid)-getCreatureHealth(cid)) doCureStatus(cid, "all", true) doSendMagicEffect(getThingPos(cid), 14) local mypb = getPlayerSlotItem(cid, 8) if #getCreatureSummons(cid) >= 1 then if not nurseHealsPokemonOut then selfSay("Please, return your pokemon to his ball!") return true end local s = getCreatureSummons(cid)[1] doCreatureAddHealth(s, getCreatureMaxHealth(s)) doSendMagicEffect(getThingPos(s), 14) doCureStatus(s, "all", false) if getPlayerStorageValue(s, 1008) < baseNurseryHappiness then setPlayerStorageValue(s, 1008, baseNurseryHappiness) end if getPlayerStorageValue(s, 1009) > baseNurseryHunger then setPlayerStorageValue(s, 1009, baseNurseryHunger) end else if mypb.itemid ~= 0 and isPokeball(mypb.itemid) then --alterado v1.3 doItemSetAttribute(mypb.uid, "hp", 1) if getItemAttribute(mypb.uid, "hunger") and getItemAttribute(mypb.uid, "hunger") > baseNurseryHunger then doItemSetAttribute(mypb.uid, "hunger", baseNurseryHunger) end for c = 1, 15 do local str = "move"..c setCD(mypb.uid, str, 0) end if getItemAttribute(mypb.uid, "happy") and getItemAttribute(mypb.uid, "happy") < baseNurseryHappiness then doItemSetAttribute(mypb.uid, "happy", baseNurseryHappiness) end if getPlayerStorageValue(cid, 17000) <= 0 and getPlayerStorageValue(cid, 17001) <= 0 and getPlayerStorageValue(cid, 63215) <= 0 then for a, b in pairs (pokeballs) do if isInArray(b.all, mypb.itemid) then doTransformItem(mypb.uid, b.on) end end end end end local bp = getPlayerSlotItem(cid, CONST_SLOT_BACKPACK) local balls = getPokeballsInContainer(bp.uid) if #balls >= 1 then for _, uid in ipairs(balls) do doItemSetAttribute(uid, "hp", 1) for c = 1, 15 do local str = "move"..c setCD(uid, str, 0) end if getItemAttribute(uid, "hunger") and getItemAttribute(uid, "hunger") > baseNurseryHunger then doItemSetAttribute(uid, "hunger", baseNurseryHunger) end if getItemAttribute(uid, "happy") and getItemAttribute(uid, "happy") < baseNurseryHappiness then doItemSetAttribute(uid, "happy", baseNurseryHappiness) end local this = getThing(uid) for a, b in pairs (pokeballs) do if isInArray(b.all, this.itemid) then doTransformItem(uid, b.on) end end end end selfSay('There you go! You and your pokemons are healthy again.') end end gobakc tenta assim local EFFECTS = { --[OutfitID] = {Effect} ["Magmar"] = 35, ["Jynx"] = 17, --alterado v1.5 ["Shiny Jynx"] = 17, ["Piloswine"] = 205, --alterado v1.8 ["Swinub"] = 205, } function onUse(cid, item, frompos, item2, topos) if exhaustion.get(cid, 6666) and exhaustion.get(cid, 6666) > 0 then return true end if getPlayerStorageValue(cid, 17000) >= 1 or getPlayerStorageValue(cid, 17001) >= 1 or getPlayerStorageValue(cid, 63215) >= 1 or getPlayerStorageValue(cid, 75846) >= 1 or getPlayerStorageValue(cid, 5700) >= 1 then --alterado v1.9 << return true end local ballName = getItemAttribute(item.uid, "poke") local btype = getPokeballType(item.itemid) local usando = pokeballs[btype].use local effect = pokeballs[btype].effect if not effect then effect = 21 end unLock(item.uid) --alterado v1.8 if item.itemid == usando then if getPlayerStorageValue(cid, 990) == 1 then -- GYM doPlayerSendCancel(cid, "You can't return your pokemon during gym battles.") return true end if #getCreatureSummons(cid) > 1 and getPlayerStorageValue(cid, 212124) <= 0 then --alterado v1.6 if getPlayerStorageValue(cid, 637501) == -2 or getPlayerStorageValue(cid, 637501) >= 1 then BackTeam(cid) end end if #getCreatureSummons(cid) == 2 and getPlayerStorageValue(cid, 212124) >= 1 then doPlayerSendCancel(cid, "You can't do that while is controling a mind") return true --alterado v1.5 end if #getCreatureSummons(cid) <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) doPlayerSendCancel(cid, "This pokemon is fainted.") return true end end local cd = getCD(item.uid, "blink", 30) if cd > 0 then setCD(item.uid, "blink", 0) end local z = getCreatureSummons(cid)[1] if getCreatureCondition(z, CONDITION_INVISIBLE) and not isGhostPokemon(z) then return true end doReturnPokemon(cid, z, item, effect) elseif item.itemid == pokeballs[btype].on then if item.uid ~= getPlayerSlotItem(cid, CONST_SLOT_FEET).uid then doPlayerSendCancel(cid, "You must put your pokeball in the correct place!") return TRUE end local thishp = getItemAttribute(item.uid, "hp") if thishp <= 0 then if isInArray(pokeballs[btype].all, item.itemid) then doTransformItem(item.uid, pokeballs[btype].off) doItemSetAttribute(item.uid, "hp", 0) doPlayerSendCancel(cid, "This pokemon is fainted.") return true end end local pokemon = getItemAttribute(item.uid, "poke") if not pokes[pokemon] then return true end ----------------------- Sistema de nao poder carregar mais que 3 pokes lvl baixo e + q 1 poke de lvl medio/alto --------------------------------- if not isInArray({5, 6}, getPlayerGroupId(cid)) then local balls = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid) local low = {} local lowPokes = {"Rattata", "Caterpie", "Weedle", "Oddish", "Pidgey", "Paras", "Poliwag", "Bellsprout", "Magikarp", "Hoppip", "Sunkern"} if #balls >= 1 then for _, uid in ipairs(balls) do local nome = getItemAttribute(uid, "poke") if not isInArray(lowPokes, pokemon) and nome == pokemon then return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry two pokemons equals!") else if nome == pokemon then table.insert(low, nome) end end end end if #low >= 3 then return doPlayerSendTextMessage(cid, 27, "Sorry, but you can't carry more than three pokemons equals of low level!") end end --------------------------------------------------------------------------------------------------------------------------------------------------- local x = pokes[pokemon] local boost = getItemAttribute(item.uid, "boost") or 0 if getPlayerLevel(cid) < (x.level+boost) then doPlayerSendCancel(cid, "You need level "..(x.level+boost).." to use this pokemon.") return true end ---------------------------- Sistema pokes de clan -------------------------------------- local shinysClan = { ["Shiny Fearow"] = {4, "Wingeon"}, ["Shiny Flareon"] = {1, "Volcanic"}, ["Shiny Vaporeon"] = {2, "Seavel"}, ["Shiny Jolteon"] = {9, "Raibolt"}, ["Shiny Hypno"] = {7, "Psycraft"}, ["Shiny Golem"] = {3, "Orebound"}, ["Shiny Vileplume"] = {8, "Naturia"}, ["Shiny Nidoking"] = {5, "Malefic"}, ["Shiny Hitmontop"] = {6, "Gardestrike"}, --alterado v1.4 } if shinysClan[pokemon] and (getPlayerGroupId(cid) < 4 or getPlayerGroupId(cid) > 6) then --alterado v1.9 \/ if getPlayerClanNum(cid) ~= shinysClan[pokemon][1] then doPlayerSendCancel(cid, "You need be a member of the clan "..shinysClan[pokemon][2].." to use this pokemon!") return true elseif getPlayerClanRank(cid) ~= 5 then doPlayerSendCancel(cid, "You need be atleast rank 5 to use this pokemon!") return true end end -------------------------------------------------------------------------------------- doSummonMonster(cid, pokemon) local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true end ------------------------passiva hitmonchan------------------------------ if isSummon(pk) then --alterado v1.8 \/ if pokemon == "Shiny Hitmonchan" or pokemon == "Hitmonchan" then if not getItemAttribute(item.uid, "hands") then doSetItemAttribute(item.uid, "hands", 0) end local hands = getItemAttribute(item.uid, "hands") doSetCreatureOutfit(pk, {lookType = hitmonchans[pokemon][hands].out}, -1) end end ------------------------------------------------------------------------- ---------movement magmar, jynx------------- if EFFECTS[getCreatureName(pk)] then markPosEff(pk, getThingPos(pk)) sendMovementEffect(pk, EFFECTS[getCreatureName(pk)], getThingPos(pk)) end -------------------------------------------------------------------------- if getCreatureName(pk) == "Ditto" or getCreatureName(pk) == "Shiny Ditto" then --edited local left = getItemAttribute(item.uid, "transLeft") local name = getItemAttribute(item.uid, "transName") if left and left > 0 then setPlayerStorageValue(pk, 1010, name) doSetCreatureOutfit(pk, {lookType = getItemAttribute(item.uid, "transOutfit")}, -1) addEvent(deTransform, left * 1000, pk, getItemAttribute(item.uid, "transTurn")) doItemSetAttribute(item.uid, "transBegin", os.clock()) else setPlayerStorageValue(pk, 1010, getCreatureName(pk) == "Ditto" and "Ditto" or "Shiny Ditto") --edited end end if isGhostPokemon(pk) then doTeleportThing(pk, getPosByDir(getThingPos(cid), math.random(0, 7)), false) end doCreatureSetLookDir(pk, 2) adjustStatus(pk, item.uid, true, true, true) doAddPokemonInOwnList(cid, pokemon) doTransformItem(item.uid, item.itemid+1) local pokename = getPokeName(pk) --alterado v1.7 local mgo = gobackmsgs[math.random(1, #gobackmsgs)].go:gsub("doka", pokename) doCreatureSay(cid, mgo, TALKTYPE_SAY) doSendMagicEffect(getCreaturePosition(pk), effect) if useOTClient then doPlayerSendCancel(cid, '12//,show') --alterado v1.7 end local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getItemAttribute(pb,"addon") if not look then doSetItemAttribute(pb,"addon",0) return false end if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) return true end else doPlayerSendCancel(cid, "This pokemon is fainted.") end return true end move1 local msgs = {"use ", ""} function doAlertReady(cid, id, movename, n, cd) if not isCreature(cid) then return true end local myball = getPlayerSlotItem(cid, 8) if myball.itemid > 0 and getItemAttribute(myball.uid, cd) == "cd:"..id.."" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(myball.uid).." - "..movename.." (m"..n..") is ready!") return true end local p = getPokeballsInContainer(getPlayerSlotItem(cid, 3).uid) if not p or #p <= 0 then return true end for a = 1, #p do if getItemAttribute(p[a], cd) == "cd:"..id.."" then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, getPokeballName(p[a]).." - "..movename.." (m"..n..") is ready!") return true end end end function onSay(cid, words, param, channel) if param ~= "" then return true end if string.len(words) > 3 then return true end if #getCreatureSummons(cid) == 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need a pokemon to use moves.") return 0 end --alterado v1.5 local mypoke = getCreatureSummons(cid)[1] if getCreatureCondition(cid, CONDITION_EXHAUST) then return true end if getCreatureName(mypoke) == "Evolution" then return true end if getCreatureName(mypoke) == "Ditto" or getCreatureName(mypoke) == "Shiny Ditto" then name = getPlayerStorageValue(mypoke, 1010) --edited else name = getCreatureName(mypoke) end --local name = getCreatureName(mypoke) == "Ditto" and getPlayerStorageValue(mypoke, 1010) or getCreatureName(mypoke) local it = string.sub(words, 2, 3) local move = movestable[name].move1 if getPlayerStorageValue(mypoke, 212123) >= 1 then cdzin = "cm_move"..it.."" else cdzin = "move"..it.."" --alterado v1.5 end if it == "2" then move = movestable[name].move2 elseif it == "3" then move = movestable[name].move3 elseif it == "4" then move = movestable[name].move4 elseif it == "5" then move = movestable[name].move5 elseif it == "6" then move = movestable[name].move6 elseif it == "7" then move = movestable[name].move7 elseif it == "8" then move = movestable[name].move8 elseif it == "9" then move = movestable[name].move9 elseif it == "10" then move = movestable[name].move10 elseif it == "11" then move = movestable[name].move11 elseif it == "12" then move = movestable[name].move12 elseif it == "13" then move = movestable[name].move13 end if not move then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your pokemon doesn't recognize this move.") return true end if getPlayerLevel(cid) < move.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need be atleast level "..move.level.." to use this move.") return true end if getCD(getPlayerSlotItem(cid, 8).uid, cdzin) > 0 and getCD(getPlayerSlotItem(cid, 8).uid, cdzin) < (move.cd + 2) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have to wait "..getCD(getPlayerSlotItem(cid, 8).uid, cdzin).." seconds to use "..move.name.." again.") return true end if getTileInfo(getThingPos(mypoke)).protection then doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.") return true end if getTileInfo(getThingPos(cid)).protection then doPlayerSendCancel(cid, "Your pokemon cannot use moves while in protection zone.") return true end if getPlayerStorageValue(mypoke, 3894) >= 1 then return doPlayerSendCancel(cid, "You can't attack because you is with fear") --alterado v1.3 end --alterado v1.6 if (move.name == "Team Slice" or move.name == "Team Claw") and #getCreatureSummons(cid) < 2 then doPlayerSendCancel(cid, "Your pokemon need be in a team for use this move!") return true end --alterado v1.7 \/\/\/ if isCreature(getCreatureTarget(cid)) and isInArray(specialabilities["evasion"], getCreatureName(getCreatureTarget(cid))) then local target = getCreatureTarget(cid) if math.random(1, 100) <= passivesChances["Evasion"][getCreatureName(target)] then if isCreature(getMasterTarget(target)) then --alterado v1.6 doSendMagicEffect(getThingPos(target), 211) doSendAnimatedText(getThingPos(target), "TOO BAD", 215) doTeleportThing(target, getClosestFreeTile(target, getThingPos(mypoke)), false) doSendMagicEffect(getThingPos(target), 211) doFaceCreature(target, getThingPos(mypoke)) return true --alterado v1.6 end end end if move.target == 1 then if not isCreature(getCreatureTarget(cid)) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You don\'t have any targets.") return 0 end if getCreatureCondition(getCreatureTarget(cid), CONDITION_INVISIBLE) then return 0 end if getCreatureHealth(getCreatureTarget(cid)) <= 0 then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Your have already defeated your target.") return 0 end if not isCreature(getCreatureSummons(cid)[1]) then return true end if getDistanceBetween(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid))) > move.dist then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Get closer to the target to use this move.") return 0 end if not isSightClear(getThingPos(getCreatureSummons(cid)[1]), getThingPos(getCreatureTarget(cid)), false) then return 0 end end local newid = 0 if isSleeping(mypoke) or isSilence(mypoke) then --alterado v1.5 doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry you can't do that right now.") return 0 else newid = setCD(getPlayerSlotItem(cid, 8).uid, cdzin, move.cd) end doCreatureSay(cid, ""..getPokeName(mypoke)..", "..msgs[math.random(#msgs)]..""..move.name.."!", TALKTYPE_SAY) local summons = getCreatureSummons(cid) --alterado v1.6 addEvent(doAlertReady, move.cd * 1000, cid, newid, move.name, it, cdzin) for i = 2, #summons do if isCreature(summons) and getPlayerStorageValue(cid, 637501) >= 1 then docastspell(summons, move.name) --alterado v1.6 end end docastspell(mypoke, move.name) doCreatureAddCondition(cid, playerexhaust) return 0 end agora em configuration.lua muda usemovesdlls = false
  16. manda os arquivos menos o do goback pq esse erro não está configurado certo o pokemon e por isso da esse tipo de erro!
  17. ha vlw amigo já arrumei era a permissão tinha esquecido mais obg mesmo assim.
  18. alguma luz ? tfs 1.2 ./tfs: error while loading shared libraries: libboost_system.so.1.54.0: cannot open shared object file: No such file or directory
  19. são 2 arena uma arena de espera e outra de combate!
  20. obrigado nossa foi rápido
  21. Bom pessoal eu resolvi compartilhar o meu sistema de torneio agora sem site já postei o mesmo com site e rank. Esse está sem site porem é menor... qualquer ideia vocês comenta para eu modificar ou implemente e deixar cada vez melhor. Como funciona ? Mata todos e o ultimo que sobrar na arena de batalha é o ganhador! 1° Pasta LIB copie um arquivo e deverá renomear para torneio ficando torneio.lua apaga tudo que tem dentro e add torneio = { awardTournament = 2148, ---moeda usada para entra no torneio-- awardAmount = 1000, -- quantidade de moeda que o player vai ganhar ao vencer o torneio-- playerTemple = {x = 893, y = 499, z = 15}, --pra onde vai o player quando morrer ?-- tournamentFight = {x = 894, y = 538, z = 15}, --centro da arena torneio combate-- area = {fromx = 866, fromy = 508, fromz = 15, tox = 922, toy = 572, toz= 15},--canto acima direito da arena combate-canto esquerdo abaixo da arena combate-- waitPlace = {x = 969, y = 544, z = 15}, --centro da sala de espera-- waitArea = {fromx = 957, fromy = 536, fromz = 15, tox = 983, toy = 552, toz= 15}, --canto esquerdo acima da sala de espera--canto abaixo esquerdo da sala de espera-- startHour1 = "07:50:00", --horario do aviso?-- endHour1 = "08:00:00",--horario que começa?-- startHour2 = "11:50:00",--horario do aviso?-- endHour2 = "12:00:00",--horario do aviso?-- startHour3 = "17:50:00",--horario do aviso?-- endHour3 = "18:00:00",--horario do aviso?-- startHour4 = "22:50:00",--horario do aviso?-- endHour4 = "23:00:00",--horario do aviso?-- price = 500,--valor para entrar no torneio ? 500 dollar no caso-- revivePoke = 12344,--aqui é revive se tiver e se não tiver não precisa mexer-- } function getPlayersInArea(area) local players = {} for x = area.fromx,area.tox do for y = area.fromy,area.toy do for z = area.fromz,area.toz do local m = getTopCreature({x=x, y=y, z=z}).uid if m ~= 1 and isPlayer(m) then table.insert(players, m) end end end end return players end apaga os coments do scripts acima com --blablabla-- 2° GLOBALEVENTS vá na pasta globalevents/scripts copia um arquivo que voc?ê deverá renomear para torneio ficando torneio.lua e add function onTime() if #getPlayersInArea(torneio.area) > 1 then doBroadcastMessage("O Torneio dessa vez não teve vencedor, tente na proxima vez") return true end for _, pid in ipairs(getPlayersInArea(torneio.waitArea)) do puxar = math.random(-2, 2) doTeleportThing(pid, {x = torneio.tournamentFight.x + puxar, y = torneio.tournamentFight.y + puxar, z = torneio.tournamentFight.z}) end doBroadcastMessage("O torneio Iniciou!") return true end ou dependendo do tfs pode ser function onTimer() if #getPlayersInArea(torneio.area) > 1 then doBroadcastMessage("O Torneio dessa vez não teve vencedor, tente na proxima vez") return true end for _, pid in ipairs(getPlayersInArea(torneio.waitArea)) do puxar = math.random(-2, 2) doTeleportThing(pid, {x = torneio.tournamentFight.x + puxar, y = torneio.tournamentFight.y + puxar, z = torneio.tournamentFight.z}) end doBroadcastMessage("O torneio Iniciou!") return true end agora em globalevents.xml add as tag <globalevent name="TournamentStart1" time="08:00" event="script" value="torneio.lua"/> <globalevent name="TournamentStart2" time="12:00" event="script" value="torneio.lua"/> <globalevent name="TournamentStart3" time="18:00" event="script" value="torneio.lua"/> <globalevent name="TournamentStart4" time="23:00" event="script" value="torneio.lua"/> ou <globalevent name="TournamentStart1" timer="08:00" event="script" value="torneio.lua"/> <globalevent name="TournamentStart2" timer="12:00" event="script" value="torneio.lua"/> <globalevent name="TournamentStart3" timer="18:00" event="script" value="torneio.lua"/> <globalevent name="TournamentStart4" timer="23:00" event="script" value="torneio.lua"/> ainda em globalevents vá em globalevents/scripts copie outro arquivo e renomeia para, msgtorneio ficando msgtorneio.lua e add local i = { ["07:50"] = {nome = "O Torneio vai começar em 10 minutos, fale com o NPC Nike no CP de sua cidade, vai custar 500 Dollar's para participar!"}, ["07:55"] = {nome = "Faltam 5 minutos para fechar as inscrições do torneio!"}, ["07:59"] = {nome = "As inscrições do Torneio fecharam!"}, ["11:50"] = {nome = "O Torneio vai começar em 10 minutos, fale com o NPC Nike no CP de sua cidade, vai custar 500 Dollar's para participar!"}, ["11:55"] = {nome = "Faltam 5 minutos para fechar as inscrições do torneio!"}, ["11:59"] = {nome = "As inscrições do Torneio fecharam!"}, ["17:50"] = {nome = "O Torneio vai começar em 10 minutos, fale com o NPC Nike no CP de sua cidade, vai custar 500 Dollar's para participar!"}, ["17:55"] = {nome = "Faltam 5 minutos para fechar as inscrições do torneio!"}, ["17:59"] = {nome = "As inscrições do Torneio fecharam!"}, ["22:50"] = {nome = "O Torneio vai começar em 10 minutos, fale com o NPC Nike no CP de sua cidade, vai custar 500 Dollar's para participar!"}, ["22:55"] = {nome = "Faltam 5 minutos para fechar as inscrições do torneio!"}, ["22:59"] = {nome = "As inscrições do Torneio fecharam!"}, } function onThink(interval, lastExecution) hours = tostring(os.date("%X")):sub(1, 5) tb = i[hours] if tb then doBroadcastMessage(hours .. " - " .. tb.nome .. "") end return true end agora as tag globalevents.xml add <globalevent name="msg torneio" interval="60000" event="script" value="msgtorneio.lua"/> pronto agora vamos mexer com actions... 3° ACTIONS para o player receber a recompensa... vá em actions/scripts copie um arquivo lá e renomeia para torneio ficando torneio.lua e add function onUse(cid, item) if #getCreatureSummons(cid) >= 1 then doPlayerSendCancel(cid, "Volte seu pokémonDBR!") else if #getPlayersInArea(torneio.area) > 1 then doPlayerSendTextMessage(cid, 20 ,"Só o ultimo que ficar na arena, poderá abrir está porta! ") return true end doTeleportThing(cid, torneio.playerTemple) doBroadcastMessage("[Torneio] Parabéns ao treinador "..getCreatureName(cid).." foi o ganhador do torneio de hoje, verifique o rank em nosso site www.seusite.com!") doPlayerAddItem(cid,2148,300) doPlayerAddItem(cid, torneio.awardTournament, torneio.awardAmount) return true end end agora a tag de actions.xml add <action uniqueid="18279" event="script" value="torneio.lua"/> *18279 é unique ID que vc terá que por numa porta alavanca o que for pra depois o ultimo player clicar... 4° NPC vá na pasta npc/scripts copia um arquivo e você deverá renomear para torneio ficando torneio.lua e add 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 if msgcontains(msg, 'torneio') or msgcontains(msg, 'enter') then if getPlayerItemCount(cid, torneio.revivePoke) >= 1 then selfSay('Voce nao Pode entrar no torneio com {revives}, por favor guarde eles e volte a falar comigo novamente.', cid) return true end selfSay('Voce quer Participar no torneio por '..torneio.price..' de Dollars?', cid) talkState[talkUser] = 2 elseif talkState[talkUser] == 2 then if msgcontains(msg, 'yes') or msgcontains(msg, 'sim') then if os.date("%X") < torneio.startHour1 or os.date("%X") > torneio.endHour1 then if os.date("%X") < torneio.startHour2 or os.date("%X") > torneio.endHour2 then if os.date("%X") < torneio.startHour3 or os.date("%X") > torneio.endHour3 then if os.date("%X") < torneio.startHour4 or os.date("%X") > torneio.endHour4 then selfSay('As inscrições para o torneiro ainda não abriram, volte ás 07:50 AM, 11:50 AM, 17:50 AM ou ás 22:50 PM todo os dias', cid) return true end end end end if doPlayerRemoveMoney(cid, torneio.price) then doTeleportThing(cid, torneio.waitPlace) doPlayerSendTextMessage(cid, 21, "Bem vindo, esta e a sala de espera, voce espera aqui enquanto o torneio nao começa.") else selfSay('Voce não tem ('..torneio.price..') Dollars.', cid) end else selfSay('Certeza que voce não quer Participar? Ok, ate a Proxima', cid) talkState[talkUser] = 0 end end end npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback) npcHandler:addModule(FocusModule:new()) bom agora volte um pasta e copia um arquivo.xml e renomeia para torneio ficando torneio.xml e add <?xml version="1.0" encoding="UTF-8"?> <npc name="Nick" script="torneio.lua" walkinterval="999000" floorchange="0"> <health now="150" max="150"/> <look type="1245" head="20" body="100" legs="50" feet="99" corpse="2212"/>] <parameters> <parameter key="message_greet" value="Ola |PLAYERNAME|. Sou o NIKE, Encarregado pelo Torneio diario caso queira entrar diga: {torneio}."/> </parameters> </npc> isso ai pessoal é completo eu fiz pro meu PokémonDBR que tinha fechado então resolvi compartilhar.... qualquer copia favor bote devido créditos e não quero ver ninguém vendendo meu scrpts.... Créditos a mim... qualquer dúvida falando que não sou o dono aqui minha página da PokémonDBR agora somo otPokémon World Online http://facebook.com/otpwonline
  22. bota um end no final do script /torneio.lua sistema arrumado pessoal vou fazer um sem site agora pra vocês.... npc name = nome do npc ? script = nome do scripts em /scripts? walkinterval = tempo para se mexer ? health now = vida max = vida toltal ? looktype = aparencia ? head = cor da cabeça ? body = cor do tronco ? legs = cor da perna ? feet = cor dos pés ? corpse = corpo quando morrer ? npc n usa pra nada
  23. L3K0T postou uma resposta no tópico em Suporte Tibia OTServer
    pq tem que recompilar o cliente com a nova opção como eu disse....

Informação Importante

Confirmação de Termo