Ir para conteúdo

mezuf

Membro
  • Registro em

  • Última visita

  1. Pessoal estou aprendo a usar os Opcodes, mas esse aqui não estou sabendo como fazer... Basicamente o que eu queria era isso: doSendPlayerExtendedOpcode(cid, 2, spellsVoc). E então seria enviado as informações de vocations e spells para o client. Agradeço a quem puder ajudar!
  2. mezuf reagiu a uma resposta no tópico: [TFS 0.2.11] Cap System no config.lua
  3. mezuf reagiu a uma resposta no tópico: Heal com cores diferentes
  4. mezuf reagiu a uma resposta no tópico: Creature Information Offset
  5. mezuf reagiu a uma resposta no tópico: Criando um mod simples
  6. mezuf reagiu a uma resposta no tópico: Critical Skill System
  7. mezuf reagiu a uma resposta no tópico: (Resolvido)Script de Passiva para Players
  8. mezuf reagiu a uma resposta no tópico: (Resolvido)Script de Passiva para Players
  9. mezuf reagiu a uma resposta no tópico: Sistema de Reset 100%
  10. UP, o verdadeiro problema que descobri é que as vocations tem suas respectivas outfits normais, mas qndo a vocation é acima de 10 ela começa do 1... Por exemplo: Vocation 1 = Sanji, sua outfit é 424 ... até vocation 10 normal .. a partir da vocation 11 começa meu problema... Vocation 11 = Buggy, sua outfit era pra ser a 9, porém copia a do sanji(424) O que me parece é que ele usa o ultimo número para "ler" a outfit... se fosse vocation 12 ele copiaria o 2 no caso. No script tem uma função index, tentei mecher mas não cheguei em nada pois não sei direito como funcina mesmo lendo varias vezes. Segue o script e agradeço qualquer ajuda! -------------------------------------------------------------------------------- -- Se falso, gm fica com outfit de player normal, incluindo as transformacoes. Costumo desativar so pra testar as magias ATIVAR_GM_OUTFIT_ON_LOGIN = not getConfigValue('SERVER_MODO_DE_TESTES') -------------------------------------------------------------------------------- CONST_GAMEMASTER_OUTFIT = 57 -- 220 (antigo CONST_OUTFIT_SANJI = 424 CONST_OUTFIT_SANJI_ADDON = 425 CONST_OUTFIT_SANJI_FIRE = 485 CONST_OUTFIT_SANJI_FIRE_ADDON = 486 CONST_OUTFIT_LUFFY_KID = 65 CONST_OUTFIT_LUFFY_KID_ROSA = 65 CONST_OUTFIT_LUFFY = 350 CONST_OUTFIT_LUFFY_ROSA = 372 CONST_OUTFIT_LUFFY_GORDO = 270 CONST_OUTFIT_LUFFY_GORDO_ROSA = 271 CONST_OUTFIT_LUFFY_2 = 420 CONST_OUTFIT_LUFFY_2_ROSA = 60 CONST_OUTFIT_LUFFY_2_GORDO = 61 CONST_OUTFIT_LUFFY_2_GORDO_ROSA = 62 CONST_OUTFIT_SMOKER = 8 CONST_OUTFIT_SMOKER_SMOKE = 92 CONST_OUTFIT_SMOKER_2 = 96 CONST_OUTFIT_SMOKER_2_SMOKE = 94 OUTFIT_LIST = { [1] = {424, 425}, -- sanji [2] = {350, 420}, -- luffy [3] = {422, 423}, -- zoro [4] = {362, 428}, -- ace [5] = {339, 427}, -- usopp [6] = {341, 421}, -- nami [7] = {323, 473, 474}, -- chopper [8] = {8, 96}, -- smoker [11] = {400}, --buggy } OUTFIT_PRICE = { [1] = {15}, [2] = {15}, [3] = {15}, [4] = {15}, [5] = {15}, [6] = {15}, [7] = {5}, [8] = {15}, [11] = {15}, } --------------------- Gerar automatico tabela do que voc é determinado outfit OUTFIT_IS_ALLOWED = {} -- [outfit_id] = voc_base, for voc, outfits in pairs(OUTFIT_LIST) do for _, outfit_id in pairs(outfits) do OUTFIT_IS_ALLOWED[outfit_id] = voc end end --------------------- OUTFIT_PURCHASE_MANAGER = { LIST = function (cid) local base_voc = getPlayerBaseVocation(cid) --if base_voc == 7 then -- chopper -- local transf = getPlayerStorageValue(cid, STORAGE_CHOPPER_TRANSFORMATION) -- return (OUTFIT_LIST[base_voc] or {})[transf] or {} --end return OUTFIT_LIST[base_voc] or {} end, GET_PRICE = function (cid, index) return OUTFIT_PRICE[getPlayerBaseVocation(cid)][index - 1] end, PURCHASE = function (cid, index) local price = OUTFIT_PRICE[getPlayerBaseVocation(cid)][index - 1] if not price then doPlayerSendCancel(cid, "[ERROR] INVALID OUTFIT") return false end return doPlayerRemoveItem(cid, ITEM_VIP_COIN, price) end, ADD = function (cid, index) -- index da outfit_list if index == 1 then return true end if index < 1 or index > 10 then return false end setPlayerStorageValue(cid, STORAGE_PURCHASE_OUTFIT_BASE + index, 1) end, HAS = function (cid, index) if index < 1 or index > 10 then return false end return index == 1 and true or getPlayerStorageValue(cid, STORAGE_PURCHASE_OUTFIT_BASE + index) == 1 end, HAS_OUTFIT = function (cid, id_outfit) local outfits = OUTFIT_LIST[getPlayerBaseVocation(cid)] or {} for index, outfit in pairs(outfits) do if id_outfit == outfit and OUTFIT_PURCHASE_MANAGER.HAS(cid, index) then return true end end return false end, } TABLE_VOCATION_OUTFIT = { [1] = 424, -- sanji [2] = 350, -- luffy [3] = 422, -- zoro [4] = 362, -- ace [5] = 339, -- usopp [6] = 341, -- nami [7] = 323, -- chopper [8] = 8, -- smoker [11] = 400 -- buggy } local TABLE_LUFFY_NORMAL_OUTFIT = -- convert normal to pink { [CONST_OUTFIT_LUFFY] = CONST_OUTFIT_LUFFY_ROSA, [CONST_OUTFIT_LUFFY_KID] = CONST_OUTFIT_LUFFY_KID_ROSA, [CONST_OUTFIT_LUFFY_GORDO] = CONST_OUTFIT_LUFFY_GORDO_ROSA, } local TABLE_LUFFY_PINK_OUTFIT = -- convert pink to normal { [CONST_OUTFIT_LUFFY_ROSA] = CONST_OUTFIT_LUFFY, [CONST_OUTFIT_LUFFY_KID_ROSA] = CONST_OUTFIT_LUFFY_KID, [CONST_OUTFIT_LUFFY_GORDO_ROSA] = CONST_OUTFIT_LUFFY_GORDO, } -------------------------------------------------------------------------------- local TABLE_TRANSFORMATION_OUTFITS = { [CONST_OUTFIT_LUFFY_ROSA] = { [CONST_OUTFIT_LUFFY] = CONST_OUTFIT_LUFFY_ROSA, [CONST_OUTFIT_LUFFY_GORDO] = CONST_OUTFIT_LUFFY_GORDO_ROSA, [CONST_OUTFIT_LUFFY_2] = CONST_OUTFIT_LUFFY_2_ROSA, [CONST_OUTFIT_LUFFY_2_GORDO] = CONST_OUTFIT_LUFFY_2_GORDO_ROSA, }, [CONST_OUTFIT_LUFFY] = { [CONST_OUTFIT_LUFFY_ROSA] = CONST_OUTFIT_LUFFY, [CONST_OUTFIT_LUFFY_GORDO_ROSA] = CONST_OUTFIT_LUFFY_GORDO, [CONST_OUTFIT_LUFFY_2_ROSA] = CONST_OUTFIT_LUFFY_2, [CONST_OUTFIT_LUFFY_2_GORDO_ROSA] = CONST_OUTFIT_LUFFY_2_GORDO, }, [CONST_OUTFIT_LUFFY_GORDO] = { [CONST_OUTFIT_LUFFY] = CONST_OUTFIT_LUFFY_GORDO, [CONST_OUTFIT_LUFFY_ROSA] = CONST_OUTFIT_LUFFY_GORDO_ROSA, [CONST_OUTFIT_LUFFY_2] = CONST_OUTFIT_LUFFY_2_GORDO, [CONST_OUTFIT_LUFFY_2_ROSA] = CONST_OUTFIT_LUFFY_2_GORDO_ROSA, }, [CONST_OUTFIT_LUFFY_2] = { [CONST_OUTFIT_LUFFY] = CONST_OUTFIT_LUFFY_2, [CONST_OUTFIT_LUFFY_ROSA] = CONST_OUTFIT_LUFFY_2_ROSA, [CONST_OUTFIT_LUFFY_GORDO] = CONST_OUTFIT_LUFFY_2_GORDO, [CONST_OUTFIT_LUFFY_GORDO_ROSA] = CONST_OUTFIT_LUFFY_2_GORDO_ROSA, }, [CONST_OUTFIT_SMOKER_SMOKE] = { [CONST_OUTFIT_SMOKER] = CONST_OUTFIT_SMOKER_SMOKE, [CONST_OUTFIT_SMOKER_2] = CONST_OUTFIT_SMOKER_2_SMOKE, }, [CONST_OUTFIT_SANJI_FIRE] = { [CONST_OUTFIT_SANJI] = CONST_OUTFIT_SANJI_FIRE, [CONST_OUTFIT_SANJI_ADDON] = CONST_OUTFIT_SANJI_FIRE_ADDON, }, } local OUTFIT_MANAGER_UIDS = {} -- [ [{id :: Int, time :: Int}] ] local OUTFIT_MANAGER_EVENTS = {} -- [Int] -- salva os addevent -- luffy -- luffy rosa 30.000 -- luffy gordo 5.000 local function __private__update_outfit_manager(cid, remove) if not isPlayer(cid) then --print("NOT PLAYER KRA K K K") return false end local outfits = OUTFIT_MANAGER_UIDS[cid] or {} if #outfits == 0 and not remove then --print("JA TA OK rsrsrsrs") return true end -- Procurar o outfit temporario que acaba primeiro, e sera esse o tempo de addEvent local time = nil for index, outfit in pairs(outfits) do if os.time() > outfit.time then table.remove(OUTFIT_MANAGER_UIDS[cid], index) --print("AGORA COM: " .. #OUTFIT_MANAGER_UIDS[cid]) if outfit.reset_on_end then OUTFIT_MANAGER_UIDS[cid] = {} doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, STORAGE_IS_IN_TRANSFORMATION, -1) if isChopper(cid) then setPlayerStorageValue(cid, STORAGE_CHOPPER_TRANSFORMATION, 1) local DLL = DLLClass:new(cid) :addTransformation(1) :send() end --print(">>REMOVI K K K K K END") return true end else if not time or outfit.time - os.time() < time then time = outfit.time - os.time() end end end -- Reatualiza o outfit local last_outfit = getCreatureDefaultOutfit(cid).lookType for index, outfit in pairs(outfits) do last_outfit = (TABLE_TRANSFORMATION_OUTFITS[outfit.id] or {})[last_outfit] or outfit.id end doSetCreatureOutfit(cid, {lookType = last_outfit}, -1) if time then --print("DAKI A " .. time) addEvent(__private__update_outfit_manager, time, cid) else --print("FLW OTARIOS") doRemoveCondition(cid, CONDITION_OUTFIT) setPlayerStorageValue(cid, STORAGE_IS_IN_TRANSFORMATION, -1) OUTFIT_MANAGER_EVENTS[cid] = nil end end OUTFIT_MANAGER = { get_last_outfit = function (cid) local outfits = (OUTFIT_MANAGER_UIDS[cid] or {}) if #outfits > 0 then return outfits[#outfits].id else return getCreatureOutfit(cid).lookType end end, remove = function (cid, removed_looktype) -- Remove OUTFIT_MANAGER_UIDS[cid] = table.filter(OUTFIT_MANAGER_UIDS[cid] or {}, function (_, looktype) return looktype.id ~= removed_looktype end) -- Parar algum evento caso exista e adicionar novamente if OUTFIT_MANAGER_EVENTS[cid] then stopEvent(OUTFIT_MANAGER_EVENTS[cid]) end OUTFIT_MANAGER_EVENTS[cid] = addEvent(__private__update_outfit_manager, 0, cid, true) end, change = function (cid, id_outfit, time, is_real, is_chopper_transformation) -- is_real somente para os outfits que trocam pelo `Set Outfit` if not id_outfit then return print('[ERROR] OUTFIT_MANAGER.change ~ Invalid id_outfit') and false elseif not time then return print('[ERROR] OUTFIT_MANAGER.change ~ time must be a non nil value') and false end if is_real then doCreatureChangeOutfit(cid, {lookType = id_outfit}) else setPlayerStorageValue(cid, STORAGE_IS_IN_TRANSFORMATION, 1) if is_chopper_transformation then OUTFIT_MANAGER_UIDS[cid] = {} else OUTFIT_MANAGER_UIDS[cid] = OUTFIT_MANAGER_UIDS[cid] or {} end --print("AGORA: " .. os.time()) local transformation_table = {id = id_outfit, time = os.time() + time - 1, reset_on_end = is_chopper_transformation} local found = table.filterFind(OUTFIT_MANAGER_UIDS[cid], function (_, value) return value.id == id_outfit end) if found then OUTFIT_MANAGER_UIDS[cid][found.index] = transformation_table else table.insert(OUTFIT_MANAGER_UIDS[cid], transformation_table) end end -- Parar algum evento caso exista e adicionar novamente if OUTFIT_MANAGER_EVENTS[cid] then stopEvent(OUTFIT_MANAGER_EVENTS[cid]) end OUTFIT_MANAGER_EVENTS[cid] = addEvent(__private__update_outfit_manager, 0, cid) end, }
  11. Aparece o nome da vocation que criei... no caso "novice buggy"
  12. Estou tentando adicionar novas vocations no server World of Piece v2, porém nao estou coseguindo... Estou adicionando a vocation no xml/vocations, e criando normalmente pelo account manager. Mas quando clico para mudar de outfit sempre está a outfit do "Sanji"... Ficarei mto grato por qualquer suporte! Valeu!!
  13. mezuf postou uma resposta no tópico em OTServer Derivados
    Alguem sabe como adiciona novas vocations ? Ou pelo menos sabe me dizer se tem como nesse server, pra que eu possa continuar tentando...
  14. Galera procurei por toda parte, mas nao achei o MSVC 2013 pra baixar... apenas o 2012 e 2015. Alguem tem o link ai precisando bastante! vlw
  15. Baxei o OTclient aqui no tibiaking --> Porém estou com uma dúvida. Na versão 10.90 a qual uso, as sprites de todas outfit estão dando um passo(sendo que estão parados) tanto player quanto monstro. Queria saber se ainda não existe nenhuma versão sem este erro, ou se é possível que eu faça alguma coisa para arrumar, tipo compilar algo nas sources... Agradeço qualquer suporte !
  16. Sou novo no fórum e gostaria da ajuda de vcs com este script... Tentei usar esse --> Porém não funcionou no tfs 1.2 Rep+ pela ajuda! vlw
  17. Estou com uma duvida como fazer para alterar a formula de dano da minha spell.. Estava querendo algo do tipo que some com o lvl ou ml ou skill. Desde já agradeço! Aqui vai a script : local config = { efeitoTele = 3, -- efeito q ira aparacer a cada teleport. efeitoDamage = 134, -- efeito q ira aparecer ao hitar no alvo hits = 1, -- quantos hits vai dar delay = 500, -- intervalo de tempo a cada hit min = 100, -- dano minimo max = 200, -- dano maximo damage = COMBAT_PHYSICALDAMAGE -- tipo do dano } function isWalkable(pos, creature, pz, proj) -- nord if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end if getTopCreature(pos).uid > 0 and creature then return false end if getTileInfo(pos).protection and not pz then return false end local n = not proj and 3 or 2 for i = 0, 255 do pos.stackpos = i local tile = getTileThingByPos(pos) if tile.itemid ~= 0 and not isCreature(tile.uid) then if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then return false end end end return true end function getPosDirs(p, dir) -- mkalo return dir == 1 and {x=p.x-1, y=p.y, z=p.z} or dir == 2 and {x=p.x-1, y=p.y+1, z=p.z} or dir == 3 and {x=p.x, y=p.y+1, z=p.z} or dir == 4 and {x=p.x+1, y=p.y+1, z=p.z} or dir == 5 and {x=p.x+1, y=p.y, z=p.z} or dir == 6 and {x=p.x+1, y=p.y-1, z=p.z} or dir == 7 and {x=p.x, y=p.y-1, z=p.z} or dir == 8 and {x=p.x-1, y=p.y-1, z=p.z} end function validPos(pos) tb = {} for i = 1, 8 do newpos = getPosDirs(pos, i) if isWalkable(newpos) then table.insert(tb, newpos) end end table.insert(tb, pos) return tb end spell500 = { start500 = function (cid, target, markpos, hits) if not isCreature(cid) then return true end if not isCreature(target) or hits < 1 then doTeleportThing(cid, markpos) doSendMagicEffect(getThingPos(cid), config.efeitoTele) return true end posAv = validPos(getThingPos(target)) rand = #posAv == 1 and 1 or #posAv - 1 doSendMagicEffect(getThingPos(cid), config.efeitoTele) doTeleportThing(cid, posAv[math.random(1, rand)]) doAreaCombatHealth(cid, config.damage, getThingPos(target), 0, -config.min, -config.max, config.efeitoDamage) end } function onCastSpell(cid) local position1 = {x=getThingPosition(getCreatureTarget(cid)).x+1, y=getThingPosition(getCreatureTarget(cid)).y+1, z=getThingPosition(getCreatureTarget(cid)).z} target = getCreatureTarget(cid) if target then spell500.start500(cid, target, getThingPos(cid), config.hits) doSendMagicEffect(position1, 138) end return true end

Informação Importante

Confirmação de Termo