Ir para conteúdo

DarkWore

Conde
  • Total de itens

    584
  • Registro em

  • Última visita

  • Dias Ganhos

    9

Tudo que DarkWore postou

  1. Boa Noite gente, Hoje eu venho postar um Sistema de Multi Addon System feito para o data do PDA 1.9 pode funcionar em TFS 0.3.6 com pequenas adaptações, como eu havia dito em outra postagem esse Sistema foi feito por meu Amigo Slicer e tem algumas coisas minhas e de alguns amigos, Bom em outra base aqui no fórum, na base vazada havia esse sistema que o amigo que eu passei passou para esse outro colega, enfim eu conversei com meu Amigo Slicer e decidimos por postar, vamos la. data\actions\scripts crie um arquivo com nome de addon.lua e cole isso dentro: local addons = { -- Shiny Alakazam [13089] = {addon_num = 1, pokemon= "Shiny Alakazam", looktype = 2013, nome = "Adventurer addon", fly = 0, ride = 0, surf = 0}, [13091] = {addon_num = 2, pokemon= "Shiny Alakazam", looktype = 2014, nome = "Grey hat addon", fly = 0, ride = 0, surf = 0}, [13092] = {addon_num = 3, pokemon= "Shiny Alakazam", looktype = 2016, nome = "Ret hat addon", fly = 0, ride = 0, surf = 0}, [13090] = {addon_num = 4, pokemon= "Shiny Alakazam", looktype = 2015, nome = "Purple hat addon", fly = 0, ride = 0, surf = 0}, -- Alakazam [13093] = {addon_num = 1, pokemon= "Alakazam", looktype = 2009, nome = "Adventurer addon", fly = 0, ride = 0, surf = 0}, [13095] = {addon_num = 2, pokemon= "Alakazam", looktype = 2010, nome = "Grey hat addon", fly = 0, ride = 0, surf = 0}, [13096] = {addon_num = 3, pokemon= "Alakazam", looktype = 2012, nome = "Ret hat addon", fly = 0, ride = 0, surf = 0}, [13094] = {addon_num = 4, pokemon= "Alakazam", looktype = 2011, nome = "Purple hat addon", fly = 0, ride = 0, surf = 0}, -- Shiny Tropius [13101] = {addon_num = 1, pokemon= "Shiny Tropius", looktype = 2019, nome = "Sorcerer addon", fly = 2065, ride = 0, surf = 0}, [13106] = {addon_num = 2, pokemon= "Shiny Tropius", looktype = 2069, nome = "Desert flower addon", fly = 2070, ride = 0, surf = 0}, -- Shiny Metagross [13098] = {addon_num = 1, pokemon= "Shiny Metagross", looktype = 2021, nome = "King's crown addon", fly = 0, ride = 2064, surf = 0}, [13099] = {addon_num = 2, pokemon= "Shiny Metagross", looktype = 2020, nome = "Queen's crown addon", fly = 0, ride = 2067, surf = 0}, -- Shiny Clefable [13097] = {addon_num = 1, pokemon= "Shiny Clefable", looktype = 2068, nome = "Angel addon", fly = 0, ride = 0, surf = 0}, -- Clefable [13102] = {addon_num = 1, pokemon= "Clefable", looktype = 2025, nome = "Angel addon", fly = 0, ride = 0, surf = 0}, -- Shiny Jynx [13100] = {addon_num = 1, pokemon= "Shiny Jynx", looktype = 2023, nome = "Witch addon", fly = 0, ride = 0, surf = 0}, -- Metagross [13103] = {addon_num = 1, pokemon= "Metagross", looktype = 2018, nome = "King's crown addon", fly = 0, ride = 2063, surf = 0}, [13104] = {addon_num = 2, pokemon= "Metagross", looktype = 2017, nome = "Queen's crown addon", fly = 0, ride = 2066, surf = 0}, -- Halloween [13105] = {addon_num = 1, pokemon= "Elder Charizard", looktype = 2074, nome = "Halloween addon", fly = 2072, ride = 0, surf = 0}, [13107] = {addon_num = 2, pokemon= "Charizard", looktype = 2073, nome = "Halloween addon", fly = 2071, ride = 0, surf = 0}, -- Shiny Blastoise [13108] = {addon_num = 1, pokemon= "Shiny Blastoise", looktype = 2078, nome = "Purple ninja pack addon", fly = 0, ride = 0, surf = 2083}, [13109] = {addon_num = 2, pokemon= "Shiny Blastoise", looktype = 2076, nome = "Orange ninja pack addon", fly = 0, ride = 0, surf = 2088}, [13110] = {addon_num = 3, pokemon= "Shiny Blastoise", looktype = 2075, nome = "Red ninja pack addon", fly = 0, ride = 0, surf = 2090}, [13111] = {addon_num = 4, pokemon= "Shiny Blastoise", looktype = 2077, nome = "Blue ninja pack addon", fly = 0, ride = 0, surf = 2086}, -- Blastoise [13112] = {addon_num = 1, pokemon= "Blastoise", looktype = 2082, nome = "Purple ninja pack addon", fly = 0, ride = 0, surf = 2083}, [13113] = {addon_num = 2, pokemon= "Blastoise", looktype = 2080, nome = "Orange ninja pack addon", fly = 0, ride = 0, surf = 2087}, [13114] = {addon_num = 3, pokemon= "Blastoise", looktype = 2079, nome = "Red ninja pack addon", fly = 0, ride = 0, surf = 2089}, [13115] = {addon_num = 4, pokemon= "Blastoise", looktype = 2081, nome = "Blue ninja pack addon", fly = 0, ride = 0, surf = 2085}, -- Shiny Gardevoir [13320] = {addon_num = 1, pokemon= "Shiny Gardevoir", looktype = 2159, nome = "Witch Apparentice addon", fly = 0, ride = 0, surf = 0}, [13324] = {addon_num = 2, pokemon= "Shiny Gardevoir", looktype = 2164, nome = "Housekeeper addon", fly = 0, ride = 0, surf = 0}, [13337] = {addon_num = 3, pokemon= "Shiny Gardevoir", looktype = 2136, nome = "Bride Saint Join addon", fly = 0, ride = 0, surf = 0}, -- Gardevoir [13291] = {addon_num = 1, pokemon= "Gardevoir", looktype = 2156, nome = "Witch Apparentice addon", fly = 0, ride = 0, surf = 0}, [13295] = {addon_num = 2, pokemon= "Gardevoir", looktype = 2161, nome = "Housekeeper addon", fly = 0, ride = 0, surf = 0}, [13302] = {addon_num = 3, pokemon= "Gardevoir", looktype = 2198, nome = "Bride Saint Join addon", fly = 0, ride = 0, surf = 0}, -- Shiny Spiritomb [13322] = {addon_num = 1, pokemon= "Shiny Spiritomb", looktype = 2204, nome = "Green Ballon addon", fly = 0, ride = 0, surf = 0}, [13345] = {addon_num = 2, pokemon= "Shiny Spiritomb", looktype = 2208, nome = "Orange Ballon addon", fly = 0, ride = 0, surf = 0}, [13347] = {addon_num = 3, pokemon= "Shiny Spiritomb", looktype = 2163, nome = "Clown Box addon", fly = 0, ride = 0, surf = 0}, -- Spiritomb [13293] = {addon_num = 1, pokemon= "Spiritomb", looktype = 2202, nome = "Green Ballon addon", fly = 0, ride = 0, surf = 0}, [13314] = {addon_num = 2, pokemon= "Spiritomb", looktype = 2206, nome = "Orange Ballon addon", fly = 0, ride = 0, surf = 0}, [13316] = {addon_num = 3, pokemon= "Spiritomb", looktype = 2200, nome = "Clown Box addon", fly = 0, ride = 0, surf = 0}, -- Shiny Togekiss [13321] = {addon_num = 1, pokemon= "Shiny Togekiss", looktype = 2205, nome = "Champion 2016 addon", fly = 2193, ride = 0, surf = 0}, [13339] = {addon_num = 2, pokemon= "Shiny Togekiss", looktype = 2158, nome = "Superman addon", fly = 2155, ride = 0, surf = 0}, [13342] = {addon_num = 3, pokemon= "Shiny Togekiss", looktype = 2201, nome = "Piloto addon", fly = 2203, ride = 0, surf = 0}, -- Togekiss [13292] = {addon_num = 1, pokemon= "Togekiss", looktype = 2121, nome = "Champion 2016 addon", fly = 2189, ride = 0, surf = 0}, [13303] = {addon_num = 2, pokemon= "Togekiss", looktype = 2158, nome = "Superman addon", fly = 2160, ride = 0, surf = 0}, [13308] = {addon_num = 3, pokemon= "Togekiss", looktype = 2162, nome = "Piloto addon", fly = 2183, ride = 0, surf = 0}, [13309] = {addon_num = 4, pokemon= "Togekiss", looktype = 2179, nome = "Batman addon", fly = 2182, ride = 0, surf = 0}, } local msgs = { return_poke = { [0] = "Por favor volte seu pokémon.", [1] = "Por favor, vuelve su pokémon.", [2] = "Please back your pokémon." }, cant_use = { [0] = "Desculpa, você não pode usar esse addon nesse pokémon.", [1] = "Lo sentimos, no se puede utilizar este addon en esse pokémon.", [2] = "Sorry, you can't use this addon on this pokémon." } } function onUse(cid, item, fromPosition, itemEx, toPosition) if #getCreatureSummons(cid) > 0 then doPlayerSendCancel(cid, msgs.return_poke[getPlayerLanguage(cid)]) return false end local addonNum = addons[item.itemid].addon_num local addon = addons[item.itemid].looktype local fly = addons[item.itemid].fly local ride = addons[item.itemid].ride local surf = addons[item.itemid].surf local addonlook = addons[item.itemid].nome local pb = getPlayerSlotItem(cid, 8).uid local pk = addons[item.itemid].pokemon if getItemAttribute(pb, "poke") ~= pk then doPlayerSendCancel(cid, msgs.cant_use[getPlayerLanguage(cid)]) return false end if getItemAttribute(pb, "pokeballusada") == 0 then doRemoveItem(item.uid, 1) doSendMagicEffect(fromPosition, 173) updateAddonAttr(pb, "addon" , addon , addonNum) updateAddonAttr(pb, "addonfly" , fly , addonNum) updateAddonAttr(pb, "addonride", ride , addonNum) updateAddonAttr(pb, "addonsurf", surf , addonNum) updateAddonAttr(pb, "addonlook", addonlook, addonNum) if not getItemAttribute(pb, "current_addon") then doSetItemAttribute(pb, "current_addon", addonNum) end return true end return false end Ainda em data\actions\scripts em goback.lua procure por: if useOTClient then doPlayerSendCancel(cid, '12//,show') --alterado v1.7 end Embaixo cole: -- ADDON SYSTEM local pk = getCreatureSummons(cid)[1] local pb = getPlayerSlotItem(cid, 8).uid local look = getAddonValue(pb, "addon") if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) end else doPlayerSendCancel(cid, "This pokemon is fainted.") end Ainda em data\actions\scripts em order.lua procure por: doRemoveCondition(cid, CONDITION_OUTFIT) Embaixo cole: -- ADDON SYSTEM local look = getAddonValue(item.uid, "addon") if look > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) end Ainda em data\actions\scripts em surf.lua procure por: setPlayerStorageValue(cid, 63215, 1) Embaixo cole: -- ADDON SYSTEM local look = getAddonValue(pb, "addonsurf") if look > 0 then doSetCreatureOutfit(cid, {lookType = look}, -1) else doSetCreatureOutfit(cid, pokes[getCreatureName(getCreatureSummons(cid)[1])], -1) end Agora em data\creaturescripts\scripts em login.lua procure por: doRemoveCondition(cid, CONDITION_OUTFIT) Embaixo cole: -- ADDON SYSTEM local look = getAddonValue(item.uid, "addonfly") if look > 0 then doSetCreatureOutfit(cid, {lookType = look}, -1) else doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) end Ainda em data\creaturescripts\scripts em look.lua procure por: if getItemAttribute(thing.uid, "nick") then table.insert(str, " [Nickname]: "..getItemAttribute(thing.uid, "nick")..". ") end Depois do end coloque embaixo: if getItemAttribute(thing.uid, "addonlook") then table.insert(str, "Addons: "..getAddonTotalLook(getItemAttribute(thing.uid, "addonlook")).."\n") end Agora em data\lib em order.lua procure por: setPlayerStorageValue(cid, 54844, speed) Embaixo cole: -- ADDON SYSTEM local pb = getPlayerSlotItem(cid, 8).uid local look = getAddonValue(pb, "addonfly") if look > 0 then doSetCreatureOutfit(cid, {lookType = look}, -1) else doSetCreatureOutfit(cid, {lookType = pokemon[1] + 351}, -1) end Ainda em data\lib crie um arquivo com nome de addon.lua e cole isso dentro: ADDON_LIMIT = 5 --Limite de addons que um poke pode ter local ADDON_BASE_STRING = string.rep("0;", ADDON_LIMIT) --String base no formato: "0;0;0;0;0;" local function checkAddonTableConsistency(tab) if #tab < ADDON_LIMIT then --proteção para quando muda o ADDON_LIMIT for i = #tab+1, ADDON_LIMIT do tab[i] = 0 end end end function updateAddonAttr(uid, attr, value, pos) local tmp = getItemAttribute(uid, attr) or ADDON_BASE_STRING tmp = type(tmp) == "string" and tmp or ADDON_BASE_STRING local t = string.explode(tmp, ";") checkAddonTableConsistency(t) if pos > 0 and pos <= ADDON_LIMIT then t[pos] = value return doSetItemAttribute(uid, attr, table.concat(t, ";")) else return false end end function getAddonValue(uid, attr) local tmp = getItemAttribute(uid, attr) or ADDON_BASE_STRING tmp = type(tmp) == "string" and tmp or ADDON_BASE_STRING tmp = string.explode(tmp, ";") local pos = getItemAttribute(uid, "current_addon") or 0 checkAddonTableConsistency(tmp) if pos > 0 and pos <= ADDON_LIMIT then return tonumber(tmp[pos]) else return 0 end end function getAddonCount(uid) local tmp = getItemAttribute(uid, "addon") if type(tmp) ~= "string" then return 0 end local t = string.explode(tmp, ";") checkAddonTableConsistency(t) local count = 0 for _,v in ipairs(t) do if tonumber(v) ~= 0 then count = count + 1 end end return count end function getAddonTotalLook(value) local str = {} addonValue = 0 for addonList = 1, 5 do local addons = tostring(value:explode(";")[addonList]) if addons ~= '0' then addonValue = addonValue + 1 end end addonValue = addonValue == 0 and "Não possui addon." or addonValue return addonValue end Agora em data\talkactions/scripts crie um arquivo com nome de addon_talk.lua e cole isso dentro: function onSay(cid, words, param) local pb = getPlayerSlotItem(cid, 8).uid local pos = tonumber(param) if #getCreatureSummons(cid) >= 1 then doPlayerSendCancel(cid, "Volte seu pokemon para a pokebola antes de trocar o addon.") return true end if not pos then doPlayerSendCancel(cid, "O numero do Addon deve ser um valor entre 0 e " ..ADDON_LIMIT.. ".") return true end if pos >= 0 and pos <= ADDON_LIMIT then doSetItemAttribute(pb, "current_addon", pos) end return true end Arquivos Completos que eu utilizava, já que o sistema foi feito para a minha base, pode necessitar pequenas adaptações: data\actions\scripts: addon.lua goback.lua order.lua surf.lua data\creaturescripts\scripts: login.lua look.lua data\lib: addon.lua order.lua data\talkactions\scripts: addon_talk.lua Bom é isso, Só usarem agora, Não se esqueçam de registrar os scripts no xml e os comandos do talkactions, etc. Créditos: @Slicer (Desenvolvimento em Geral) @DarkWore (Completar Algumas coisas que ficaram pendentes/erros que surgiram) @Jair Kevick (Completar problema que estava havendo com o Look) Lembrando Nenhum dos citados oferece suporte ao sistema para erros que surgirem ou qualquer coisa do tipo, até porque ainda existe muita coisa incompleto e que pode ser melhorado nos scripts.
  2. Pode ser na Source em Game.cpp no Trade, Envia seu Game.cpp aqui.
  3. Faz tempo que não mexo com PDA, As vezes me perco nas bagunças dos scripts, 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) sendAllPokemonsBarPoke(cid) 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 or getPlayerStorageValue(cid, 54275) >= 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 getItemAttribute(item.uid, "hp") == 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 local x = pokes[pokemon] local boost = getItemAttribute(item.uid, "boost") or 0 if getPlayerLevel(cid) < (x.level) then doPlayerSendCancel(cid, "You need level "..(x.level).." to use this pokemon.") return true end local pk = getCreatureSummons(cid)[1] doSummonMonster(cid, pokemon) doItemSetAttribute(item.uid, "pokeballusada", 0) local pk = getCreatureSummons(cid)[1] if not isCreature(pk) then return true 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) doCreatureSetNick(pk, nick) 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) local mgoen = gobackmsgsen[math.random(1, #gobackmsgsen)].go:gsub("doka", pokename) local mgoes = gobackmsgses[math.random(1, #gobackmsgses)].go:gsub("doka", pokename) if getPlayerLanguage(cid) == 2 then doCreatureSay(cid, mgoen, 19) end if getPlayerLanguage(cid) == 0 then doCreatureSay(cid, mgo, 19) end if getPlayerLanguage(cid) == 1 then doCreatureSay(cid, mgoes, 19) end -- doItemSetAttribute(item.uid, "gender", math.random(3, 4)) 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 getItemAttribute(pb,"addon") then doSetItemAttribute(pb,"addon",0) end if getItemAttribute(pb,"addon") > 0 then doSetCreatureOutfit(pk, {lookType = look}, -1) 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 if useKpdoDlls then doUpdateMoves(cid) end return true end Informe os Resultados.
  4. O Erro que está dando no spawn.lua não é por isso que as vezes acaba bugando "?" é simplesmente pelo fato de que a chamada da função isSummon está passando valor nulo.
  5. Tente assim: function onUse(cid, item, fromPosition, itemEx, toPosition, words, param, channel, item2, topos) local quest = { level = 50, -- level mínimo max_times = 3, -- quantas vezes poderá usar timetowait = {1, "day"}, -- tempo para usar novamente após atingir o max_times max_players = 3, -- máximo de players dentro da área room = {from = {x = 32477, y = 32481, z = 8}, to = {x = 32488, y = 32489, z = 8}}, -- posição do canto superior esquerdo, posição do canto inferior direito da sala newpos = {x = 32479, y = 32484, z = 8}, -- posição para onde o player será teleportado ao entrar stone = {id = 1304, pos = {x = 32320, y = 32516, z = 8}}, -- id da pedra, posição timetokick = {2, "min"}, -- tempo para ser kikado da sala } local pos = {x=32497, y=32481, z=6, stackpos=1} kickpos = {x = 32497 , y = 32481, z = 6} -- quando kikados da área, o player vai para essa posição local p, inside = getPlayerPosition(cid), getPlayersInArea(quest.room.from, quest.room.to) if getPlayerStorageValue(cid, 84309) > os.time() then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You can use again at " .. os.date("%d %B %Y %X", getPlayerStorageValue(cid, 84309))..".") return true else if getPlayerStorageValue(cid, 84310) == quest.max_times then setPlayerStorageValue(cid, 84310, -1) end end if #inside >= quest.max_players then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Wait for the team to leave the room.") doSendMagicEffect(p, CONST_ME_POFF) return true end if getPlayerLevel(cid) < quest.level then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "You need at least level " .. quest.level .. " to go.") doSendMagicEffect(p, CONST_ME_POFF) return true end local max_times = getPlayerStorageValue(cid, 84310) > 0 and getPlayerStorageValue(cid, 84310) or 0 if (max_times + 1) == quest.max_times then setPlayerStorageValue(cid, 84309, mathtime(quest.timetowait) + os.time()) end local stone = getTileItemById(quest.stone.pos, quest.stone.id).uid if stone > 0 then doSendMagicEffect(quest.stone.pos, CONST_ME_POFF) doRemoveItem(stone) end doTeleportThing(cid, quest.room.newpos) doSendMagicEffect(quest.room.newpos, CONST_ME_TELEPORT) setPlayerStorageValue(cid, 84310, max_times+1) addEvent(kickFromArea, mathtime(quest.timetokick) * 1000, cid) return true end function getPlayersInArea(fromPos, toPos) local players = {} for _, pid in ipairs(Game.getPlayers()) do if isInRange(getPlayerPosition(pid), fromPos, toPos) then tabl e.insert(players, pid) end end return players end function mathtime(table) -- by dwarfer local unit = {"sec", "min", "hour", "day"} for i, v in pairs(unit) do if v == table[2] then return table[1]*(60^(v == unit[4] and 2 or i-1))*(v == unit[4] and 24 or 1) end end return error("Bad declaration in mathtime function.") end function kickFromArea(cid) local stone = getTileItemById(quest.stone.pos, quest.stone.id) if stone.uid == 0 then doCreateItem(quest.stone.id, 1, quest.stone.pos) end if isPlayer(cid) and isInRange(getPlayerPosition(cid), quest.room.from, quest.room.to) then doTeleportThing(cid, quest.kickpos) end doSendMagicEffect(quest.kickpos, CONST_ME_TELEPORT) end
  6. Você vai ter que por o sistema de monstros passivos, Siga esse git: https://gist.github.com/ranisalt/a238128104b7af3a17f1 Créditos ao Criador do Código: Ranieri Althoff.
  7. Isso é um Exhaust no Sistema de Moves, Vá em data\talkactions\scripts\move1.lua e procure por: doCreatureAddCondition(cid, playerexhaust) Apenas comente a linha e pronto o exhaust vai ser retirado, a linha deverá ficar assim: --doCreatureAddCondition(cid, playerexhaust) Espero ter ajudado, Abraço.
  8. Todas as Imagens principais do OTClient ficam localizadas em otclient-master\data\images\ui basta editar ao seu gosto e com a cor que preferir.
  9. O Servidor está com seus ports alterados, você vai ter que alterar eles para o mesmo do cliente, segue explicação. Port Alterado: loginPort = 7171 gamePort = 7178 adminPort = 7171 statusPort = 9091 Port Geral: loginPort = 7171 gamePort = 7172 adminPort = 7171 statusPort = 7171 Em Data/XML/servers.xml verifique e corrija: Port Alterado: <server id="0" name="Gold" versionMin="854" versionMax="854" address="127.0.0.1" port="7179"/>; Port Geral: <server id="0" name="Blue" versionMin="850" versionMax="850" address="127.0.0.1" port="7171"/> Verifique também se o cliente que está sendo usado está com o port correto, bom que eu me lembre são só esses locais, acredito que vá funcionar, abraço.
  10. Bem Legal, Obrigado por compartilhar.
  11. No seu distro a maioria dos erros são por Monstros que estão tentando ser spawnados sem existirem no seu servidor, para resolver isso basta ir no seu data/world/algumnome-spawn.xml e remover os monstros que não existem no seu servidor, temos também alguns erros como Unserialization of invalid tile at position esse erro provavelmente está sendo causado por tiles invalidos em determinada posição, pode ser também tiles sobrepostos, e alguns erros de unique id duplicado e de scripts em geral, nesse caso você terá que ir manualmente nos scripts e fixar um por um.
  12. Você tem que ter o código fonte da DLL e alterar diretamente nela.
  13. Tente adicionar novamente o pokémon, provavelmente você esqueceu de algo, eu costumava ter esse problema no PDA. Tutorial:
  14. Desejo Sorte amigo, boa sorte na caminhada!
  15. Pronto, Verifique e informe os resultados: local config = { loginMessage = getConfigValue('loginMessage'), useFragHandler = getBooleanFromString(getConfigValue('useFragHandler')) } local flys = { ["Moltres"] = {229, 2300}, -- moltres ["Articuno"] = {230, 2100}, -- artic ["Zapdos"] = {224, 2600}, -- zapdos ["Mew"] = {232, 2200}, -- 1000 ["Mewtwo"] = {233, 2200},-- two ["Dragonite"] = {221, 1300},-- nite ["Pidgeot"] = {222, 900}, -- geot ["Fearow"] = {226, 800}, -- fearow ["Aerodactyl"] = {227, 1100}, -- aero ["Charizard"] = {216, 1000}, -- chari ["Porygon"] = {316, 600}, -- porygon ["Shiny Moltres"] = {229, 2300}, -- Shiny moltres ["Shiny Articuno"] = {1018, 2100}, -- Shiny artic ["Shiny Zapdos"] = {1019, 2600}, -- Shiny zapdos ["Shiny Mew"] = {1022, 2200}, -- Shiny 1000 ["Shiny Mewtwo"] = {1021, 2200},-- Shiny two ["Shiny Dragonite"] = {1020, 1300},-- Shiny nite ["Shiny Pidgeot"] = {996, 900}, -- Shiny geot ["Shiny Fearow"] = {997, 800}, -- Shiny fearow ["Shiny Aerodactyl"] = {1017, 1100}, -- Shiny aero ["Shiny Charizard"] = {995, 1000}, -- Shiny chari ["Shiny Porygon"] = {1016, 600}, -- Shiny porygon ["Porygon2"] = {648, 890}, -- 2 ["Skarmory"] = {649, 1000}, -- skarmory ["Crobat"] = {652, 1190}, -- crobat ["Shiny Farfetch'd"] = {1073, 1000}, -- Shiny farfetch'd ["Gengar"] = {1074, 1000}, -- gengar ["Shiny Gengar"] = {1075, 1000}, -- Shiny gengar ["Heracross"] = {1071, 1000}, -- heracross ["Scyther"] = {1070, 1000}, -- scyther ["Shiny Scyther"] = {1072, 1000}, -- Shiny scyther ["Xatu"] = {1076, 1000}, -- xatu ["Farfetch'd"] = {1077, 1000}, -- farfetch'd ["Dragonair"] = {1078, 1000}, -- dragonair ["Shiny Dragonair"] = {1079, 1000}, -- Shiny dragonair } local rides = { ["Tauros"] = {128, 580}, -- tauros ["Ninetales"] = {129, 800}, -- kyuubi ["Rapidash"] = {130, 800}, -- rapid ["Ponyta"] = {131, 410}, -- ponyta ["Rhyhorn"] = {132, 400}, -- rhyhorn ["Arcanine"] = {12, 900}, -- arcan ["Onix"] = {126, 450}, -- onix ["Venusaur"] = {134, 390}, -- venu ["Dodrio"] = {133, 750}, -- dodrio ["Doduo"] = {135, 420}, -- doduo ["Shiny Tauros"] = {1024, 580}, -- tauros ["Shiny Ninetales"] = {999, 800}, -- kyuubi ["Shiny Rapidash"] = {1005, 800}, -- rapid ["Shiny Ponyta"] = {1004, 410}, -- ponyta ["Shiny Rhyhorn"] = {1023, 400}, -- rhyhorn ["Shiny Arcanine"] = {1003, 900}, -- arcan ["Shiny Onix"] = {126, 450}, -- onix ["Shiny Venusaur"] = {1040, 390}, -- venu ["Shiny Dodrio"] = {1007, 750}, -- dodrio ["Shiny Doduo"] = {1006, 420}, -- doduo ["Crystal Onix"] = {293, 480}, -- cristal onix ["Steelix"] = {646, 750}, -- steelix ["Meganium"] = {685, 720}, -- meganium ["Bayleef"] = {686, 555}, -- bayleef ["Stantler"] = {687, 595}, -- stantler ["Houndoom"] = {647, 820}, -- houndoom ["Piloswine"] = {689, 450}, -- piloswine ["Mareep"] = {688, 400}, -- marip } local surf = { ["Poliwag"] = {lookType=278, speed = 320}, ["Poliwhirl"] = {lookType=137, speed = 480}, ["Seaking"] = {lookType=269, speed = 520}, ["Dewgong"] = {lookType=183, speed = 700}, ["Blastoise"] = {lookType=184, speed = 850}, ["Tentacruel"] = {lookType=185, speed = 750}, ["Lapras"] = {lookType=186, speed = 960}, ["Gyarados"] = {lookType=187, speed = 1050}, ["Omastar"] = {lookType=188, speed = 680}, ["Kabutops"] = {lookType=189, speed = 840}, ["Poliwrath"] = {lookType=190, speed = 680}, ["Vaporeon"] = {lookType=191, speed = 800}, ["Staryu"] = {lookType=266, speed = 385}, ["Starmie"] = {lookType=267, speed = 685}, ["Goldeen"] = {lookType=268, speed = 355}, ["Seadra"] = {lookType=270, speed = 655}, ["Golduck"] = {lookType=271, speed = 760}, ["Squirtle"] = {lookType=273, speed = 365}, ["Wartortle"] = {lookType=275, speed = 605}, ["Tentacool"] = {lookType=277, speed = 340}, ["Snorlax"] = {lookType=300, speed = 500}, ["Shiny Poliwag"] = {lookType=1010, speed = 320}, ["Shiny Poliwhirl"] = {lookType=1011, speed = 480}, ["Shiny Seaking"] = {lookType=1027, speed = 520}, ["Shiny Dewgong"] = {lookType=1015, speed = 700}, ["Shiny Blastoise"] = {lookType=1002, speed = 850}, ["Shiny Tentacruel"] = {lookType=1014, speed = 750}, ["Shiny Lapras"] = {lookType=1031, speed = 960}, ["Shiny Gyarados"] = {lookType=1030, speed = 1050}, ["Shiny Omastar"] = {lookType=1033, speed = 680}, ["Shiny Kabutops"] = {lookType=1034, speed = 840}, ["Shiny Poliwrath"] = {lookType=1012, speed = 680}, ["Shiny Vaporeon"] = {lookType=1032, speed = 800}, ["Shiny Staryu"] = {lookType=1028, speed = 385}, ["Shiny Starmie"] = {lookType=1029, speed = 685}, ["Shiny Goldeen"] = {lookType=1026, speed = 355}, ["Shiny Seadra"] = {lookType=1025, speed = 655}, ["Shiny Golduck"] = {lookType=1009, speed = 760}, ["Shiny Squirtle"] = {lookType=1000, speed = 365}, ["Shiny Wartortle"] = {lookType=1001, speed = 605}, ["Shiny Tentacool"] = {lookType=1013, speed = 340}, ["Shiny Snorlax"] = {lookType=1035, speed = 500}, ["Mantine"] = {lookType=636, speed = 820}, ["Totodile"] = {lookType=637, speed = 360}, ["Croconow"] = {lookType=638, speed = 590}, ["Feraligatr"] = {lookType=645, speed = 900}, ["Marill"] = {lookType=639, speed = 340}, ["Azumarill"] = {lookType=642, speed = 680}, ["Quagsire"] = {lookType=643, speed = 740}, ["Kingdra"] = {lookType=644, speed = 1020}, ["Octillery"] = {lookType=641, speed = 600}, ["Wooper"] = {lookType=640, speed = 315}, } function onLogin(cid) doPlayerSetLossPercent(cid, PLAYERLOSS_EXPERIENCE, 100) doCreatureSetDropLoot(cid, false) local accountManager = getPlayerAccountManager(cid) if(accountManager == MANAGER_NONE) then local lastLogin, str = getPlayerLastLoginSaved(cid), config.loginMessage if(lastLogin > 0) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) str = "Your last visit was on " .. os.date("%a %b %d %X %Y", lastLogin) .. "." else str = str end doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, str) elseif(accountManager == MANAGER_NAMELOCK) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, it appears that your character has been namelocked, what would you like as your new name?") elseif(accountManager == MANAGER_ACCOUNT) then doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to manage your account and if you want to start over then type 'cancel'.") else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Hello, type 'account' to create an account or type 'recover' to recover an account.") end if getCreatureName(cid) == "Account Manager" then local outfit = {} if accountManagerRandomPokemonOutfit then outfit = {lookType = getPokemonXMLOutfit(oldpokedex[math.random(151)][1])} else outfit = accountManagerOutfit end doSetCreatureOutfit(cid, outfit, -1) return true end if(not isPlayerGhost(cid)) then doSendMagicEffect(getCreaturePosition(cid), CONST_ME_TELEPORT) end local outfit = {} if getPlayerVocation(cid) == 0 then doPlayerSetMaxCapacity(cid, 0) doPlayerSetVocation(cid, 1) setPlayerStorageValue(cid, 86228, 0) setPlayerStorageValue(cid, 862281, 0) setCreatureMaxMana(cid, 6) doPlayerAddSoul(cid, -getPlayerSoul(cid)) setPlayerStorageValue(cid, 19898, 0) if getCreatureOutfit(cid).lookType == 128 then outfit = {lookType = 510, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} elseif getCreatureOutfit(cid).lookType == 136 then outfit = {lookType = 511, lookHead = math.random(0, 132), lookBody = math.random(0, 132), lookLegs = math.random(0, 132), lookFeet = math.random(0, 132)} end doCreatureChangeOutfit(cid, outfit) end registerCreatureEvent(cid, "ExpVip") registerCreatureEvent(cid, "TP") registerCreatureEvent(cid, "tasksystem") registerCreatureEvent(cid, "WatchTv") registerCreatureEvent(cid, "StopWatchingTv") registerCreatureEvent(cid, "monster") registerCreatureEvent(cid, "WalkTv") registerCreatureEvent(cid, "RecordTv") --registerCreatureEvent(cid, "deadd") --registerCreatureEvent(cid, "Death") registerCreatureEvent(cid, "PlayerLogout") registerCreatureEvent(cid, "WildAttack") registerCreatureEvent(cid, "Idle") registerCreatureEvent(cid, "PokemonIdle") registerCreatureEvent(cid, "EffectOnAdvance") registerCreatureEvent(cid, "GeneralConfiguration") registerCreatureEvent(cid, "ReportBug") registerCreatureEvent(cid, "LookSystem") registerCreatureEvent(cid, "T1") registerCreatureEvent(cid, "T2") if getPlayerStorageValue(cid, 99284) == 1 then setPlayerStorageValue(cid, 99284, -1) end doChangeSpeed(cid, -(getCreatureSpeed(cid))) if getPlayerStorageValue(cid, 17000) >= 1 then -- fly local item = getPlayerSlotItem(cid, 8) local poke = getItemAttribute(item.uid, "poke") doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = flys[poke][1] + 351}, -1) local apos = getFlyingMarkedPos(cid) apos.stackpos = 0 if getTileThingByPos(apos).itemid <= 2 then doCombatAreaHealth(cid, FIREDAMAGE, getFlyingMarkedPos(cid), 0, 0, 0, CONST_ME_NONE) doCreateItem(460, 1, getFlyingMarkedPos(cid)) end doTeleportThing(cid, apos, false) local posicao = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao) elseif getPlayerStorageValue(cid, 63215) >= 1 then -- surf local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") doSetCreatureOutfit(cid, {lookType = surf[poke].lookType + 351}, -1) doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) elseif getPlayerStorageValue(cid, 17001) >= 1 then -- ride local item = getPlayerSlotItem(cid, ? local poke = getItemAttribute(item.uid, "poke") if rides[poke] then doChangeSpeed(cid, getPlayerStorageValue(cid, 54844)) doRemoveCondition(cid, CONDITION_OUTFIT) doSetCreatureOutfit(cid, {lookType = rides[poke][1] + 351}, -1) else setPlayerStorageValue(cid, 17001, -1) doChangeSpeed(cid, PlayerSpeed) end local posicao2 = getTownTemplePosition(getPlayerTown(cid)) markFlyingPos(cid, posicao2) elseif getPlayerStorageValue(cid, 13008) >= 1 then -- dive if not isInArray({5405, 5406, 5407, 5408, 5409, 5410}, getTileInfo(getThingPos(cid)).itemid) then setPlayerStorageValue(cid, 13008, 0) doChangeSpeed(cid, PlayerSpeed) doRemoveCondition(cid, CONDITION_OUTFIT) if getPlayerStorageValue(cid, 50000) == -1 then setPlayerStorageValue(cid, 50000, 0) end return true end if getPlayerSex(cid) == 1 then doSetCreatureOutfit(cid, {lookType = 1034, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) else doSetCreatureOutfit(cid, {lookType = 1035, lookHead = getCreatureOutfit(cid).lookHead, lookBody = getCreatureOutfit(cid).lookBody, lookLegs = getCreatureOutfit(cid).lookLegs, lookFeet = getCreatureOutfit(cid).lookFeet}, -1) end doChangeSpeed(cid, 800) elseif getPlayerGroupId(cid) >= 4 and getPlayerGroupId(cid) <= 7 then doChangeSpeed(cid, 140*getPlayerGroupId(cid)) else doChangeSpeed(cid, PlayerSpeed) end return true end
  16. Teste e Informe os Resultados:
  17. Quando eu ainda usava meu PDA Adaptado eu estava com esse erro mais por fim foi solucionado, se não me engano eu apenas removi, pois não influenciava em nada no servidor, tentei com o arquivo seu que editei. exp2.0.lua
  18. é PDA, não contem código fonte.
  19. Opa, fico feliz que tenha dado certo, agradeço pela oferta de trabalho também, podemos conversar melhor sobre isso, mais meu tempo ultimamente está sendo bem limitado, abraço.
  20. DarkWore

    Name Displacement

    Parabéns, Tio Porai mitando como sempre, Obrigado por compartilhar, abração.
  • Quem Está Navegando   0 membros estão online

    • Nenhum usuário registrado visualizando esta página.
×
×
  • Criar Novo...