Postado Agosto 18, 2014 11 anos Olá, peguei base da versão do PGalaxy do Wolf (http://www.tibiaking.com/forum/topic/39811-854-servidor-galaxy-pokeot/) E como não tive respostas corretas de como resolver do mesmo, resolvi pedir ajuda aos demais do fórum. O server vem como "non-pvp", mas mesmo em duelo, não tem como se atacarem, somente na arena pvp(que ainda nao tem como deixar target nos players, mas o AOE dos poke acerta eles). Se eu mudo para "pvp", todos podem atacar os pokemons dos outros(ainda não podem matar outros players, e as aoe não acertam os players).Config.lua -- The Forgotten Server Config -- Account manager accountManager = true namelockManager = true newPlayerChooseVoc = false newPlayerSpawnPosX = 92 newPlayerSpawnPosY = 66 newPlayerSpawnPosZ = 5 newPlayerTownId = 16 newPlayerLevel = 5 newPlayerMagicLevel = 0 generateAccountNumber = false lightInterval = 7500 -- a cada "lightInterval" ms vai passar 1 minuto lightChange = 1 -- quanto de light ira alterar durante passagem de dia/noite startupTime = 351 -- quantas horas serão ao ligar o server (360 = 6:00 a.m, 1080 = 6:00 p.m, varia de 0 a 1440) startupLight = 40 -- quanto de light vai estar ao ligar o server limitPokeballs = 6 -- deprecated happyDropTime = 120 -- a cada "happyDropTime" segundos o pokemon vai perder HAPPINESS minHappinessEffectDelay = 25 -- a cada min de "happinessEffectDelay" segundos o pokemon vai mostrar a felicidade maxHappinessEffectDelay = 40 -- a cada min de "happinessEffectDelay" segundos o pokemon vai mostrar a felicidade PokemonStageVeryHappy = 108 -- com quanto de happy o poke precisa pra estar muito feliz PokemonStageHappy = 80 -- ... pra estar feliz PokemonStageOK = 55 -- ... pra estar normal PokemonStageSad = 25 -- ... pra estar triste PokemonStageMad = 0 -- ... pra estar bravo maximumHunger = 120 -- maior fome possivel stateHunger = 100 -- 19estagio que precisa estar pra ficar com fome increaseHunger = 70 -- a cada X segundos (xml do monstro) aumenta o hunger em "increaseHunger" decreaseHappy = 1 -- HAPPINESS que o pokemon vai perder a cada "happyDropTime" decreaseHungryHappy = 2 -- 3HAPPINESS a mais que o pokemon vai perder se estiver com fome useTeleportWithFly = false dropHappyDuringBattles = true -- HAPPINESS vai cair enquanto estiver batalhando ? true / false allowBlockSpawn = true -- Unjustified kills -- NOTE: *Banishment and *BlackSkull variables are >summed up< -- (dailyFragsToRedSkull + dailyFragsToBanishment) with their -- *RedSkull equivalents. -- Auto banishing works only if useBlackSkull set to negative. -- advancedFragList is not advised if you use huge frags -- requirements. redSkullLength = 30 * 24 * 60 * 60 blackSkullLength = 45 * 24 * 60 * 60 dailyFragsToRedSkull = 3 weeklyFragsToRedSkull = 5 monthlyFragsToRedSkull = 10 dailyFragsToBlackSkull = dailyFragsToRedSkull weeklyFragsToBlackSkull = weeklyFragsToRedSkull monthlyFragsToBlackSkull = monthlyFragsToRedSkull dailyFragsToBanishment = dailyFragsToRedSkull weeklyFragsToBanishment = weeklyFragsToRedSkull monthlyFragsToBanishment = monthlyFragsToRedSkull blackSkulledDeathHealth = 40 blackSkulledDeathMana = 0 useBlackSkull = true useFragHandler = true advancedFragList = false -- Banishments -- violationNameReportActionType 1 = just a report, 2 = name lock, 3 = player banishment -- killsBanLength works only if useBlackSkull option is disabled. notationsToBan = 3 warningsToFinalBan = 4 warningsToDeletion = 5 banLength = 7 * 24 * 60 * 60 killsBanLength = 7 * 24 * 60 * 60 finalBanLength = 30 * 24 * 60 * 60 ipBanishmentLength = 1 * 24 * 60 * 60 broadcastBanishments = true maxViolationCommentSize = 200 violationNameReportActionType = 2 autoBanishUnknownBytes = false -- Battle -- NOTE: showHealingDamageForMonsters inheritates from showHealingDamage. -- loginProtectionPeriod is the famous Tibia anti-magebomb system. -- deathLostPercent set to nil enables manual mode. worldType = "pvp" protectionLevel = 1000000 pvpTileIgnoreLevelAndVocationProtection = true pzLocked = 18 * 1000 huntingDuration = 60 * 1000 criticalHitChance = 7 criticalHitMultiplier = 1 displayCriticalHitNotify = false removeWeaponAmmunition = true removeWeaponCharges = true removeRuneCharges = true whiteSkullTime = 15 * 60 * 1000 noDamageToSameLookfeet = false showHealingDamage = false showHealingDamageForMonsters = false fieldOwnershipDuration = 5 * 1000 stopAttackingAtExit = false oldConditionAccuracy = false loginProtectionPeriod = 10 * 1000 deathLostPercent = 1 stairhopDelay = 0 * 1000 pushCreatureDelay = 1 * 1000 deathContainerId = 0 gainExperienceColor = 130 addManaSpentInPvPZone = true squareColor = 0 allowFightback = true -- Connection config worldId = 0 ip = "25.35.179.102" bindOnlyConfiguredIpAddress = false loginPort = 7171 gamePort = 7172 adminPort = 7171 statusPort = 7171 loginTries = 10 retryTimeout = 5 * 1000 loginTimeout = 60 * 1000 maxPlayers = 50 -- codificado e limitado para 7 motd = "Bem-vindo ao Poke do Gian!" displayOnOrOffAtCharlist = false onePlayerOnlinePerAccount = true allowClones = true serverName = "Poke do Gian" loginMessage = "Bem-Vindo ao Poke do Gian!" statusTimeout = 5 * 60 * 1000 replaceKickOnLogin = true forceSlowConnectionsToDisconnect = false loginOnlyWithLoginServer = false premiumPlayerSkipWaitList = false -- Database -- NOTE: sqlFile is used only by sqlite database, and sqlKeepAlive by mysql database. -- To disable sqlKeepAlive such as mysqlReadTimeout use 0 value. sqlType = "sqlite" sqlHost = "localhost" sqlPort = 3306 sqlUser = "root" sqlPass = "" sqlDatabase = "theforgottenserver" sqlFile = "forgottenserver.s3db" sqlKeepAlive = 0 mysqlReadTimeout = 10 mysqlWriteTimeout = 10 encryptionType = "plain" -- Deathlist deathListEnabled = true deathListRequiredTime = 1 * 60 * 1000 deathAssistCount = 19 maxDeathRecords = 10 -- Guilds ingameGuildManagement = true levelToFormGuild = 40 premiumDaysToFormGuild = 0 guildNameMinLength = 2 guildNameMaxLength = 25 -- Highscores highscoreDisplayPlayers = 15 updateHighscoresAfterMinutes = 60 -- Houses buyableAndSellableHouses = true houseNeedPremium = false bedsRequirePremium = false levelToBuyHouse = 50 housesPerAccount = 0 houseRentAsPrice = false housePriceAsRent = false housePriceEachSquare = 2975 houseRentPeriod = "never" houseCleanOld = 0 guildHalls = false -- Item usage timeBetweenActions = 500 timeBetweenExActions = 500 hotkeyAimbotEnabled = true -- Map -- NOTE: storeTrash costs more memory, but will perform alot faster cleaning. mapName = "mastermap" mapAuthor = "brun123" randomizeTiles = true storeTrash = false cleanProtectedZones = true mailboxDisabledTowns = "1" -- Process -- NOTE: defaultPriority works only on Windows and niceLevel on *nix -- coresUsed are seperated by comma cores ids used by server process, -- default is -1, so it stays untouched (automaticaly assigned by OS). defaultPriority = "high" niceLevel = 5 coresUsed = "-1" -- Startup optimizeDatabaseAtStartup = true removePremiumOnInit = true confirmOutdatedVersion = false -- Spells formulaLevel = 5.0 formulaMagic = 1.0 bufferMutedOnSpellFailure = false spellNameInsteadOfWords = false emoteSpells = false -- Outfits allowChangeOutfit = true allowChangeColors = true allowChangeAddons = true disableOutfitsForPrivilegedPlayers = false addonsOnlyPremium = false -- Miscellaneous -- NOTE: promptExceptionTracerErrorBox works only with precompiled support feature, -- called "exception tracer" (__EXCEPTION_TRACER__ flag). dataDirectory = "data/" bankSystem = true displaySkillLevelOnAdvance = true promptExceptionTracerErrorBox = true separateViplistPerCharacter = false maximumDoorLevel = 500 maxMessageBuffer = 4 -- Saving-related -- useHouseDataStorage usage may be found at README. saveGlobalStorage = false useHouseDataStorage = false storePlayerDirection = false -- Loot -- monsterLootMessage 0 to disable, 1 - only party, 2 - only player, 3 - party or player (like Tibia's) checkCorpseOwner = true monsterLootMessage = 3 monsterLootMessageType = 22 -- Ghost mode ghostModeInvisibleEffect = true ghostModeSpellEffects = false -- Limits idleWarningTime = 14 * 60 * 1000 idleKickTime = 15 * 60 * 1000 expireReportsAfterReads = 1 playerQueryDeepness = 2 maxItemsPerPZTile = 0 maxItemsPerHouseTile = 0 -- Premium-related freePremium = false premiumForPromotion = true -- Blessings -- NOTE: blessingReduction* regards items/containers loss. -- eachBlessReduction is how much each bless reduces the experience/magic/skills loss. blessingOnlyPremium = true blessingReductionBase = 30 blessingReductionDecreament = 5 eachBlessReduction = 8 -- Rates -- NOTE: experienceStages configuration is located in data/XML/stages.xml. -- rateExperienceFromPlayers 0 to disable. experienceStages = false rateExperience = 0 rateExperienceFromPlayers = 0 rateSkill = 1 rateMagic = 1.0 rateLoot = 1 rateSpawn = 1 -- Monster rates rateMonsterHealth = 1.0 rateMonsterMana = 1.0 rateMonsterAttack = 1.0 rateMonsterDefense = 1.0 -- Experience from players -- NOTE: min~Threshold* set to 0 will disable the minimum threshold: -- player will gain experience from every lower leveled player. -- max~Threshold* set to 0 will disable the maximum threshold: -- player will gain experience from every higher leveled player. minLevelThresholdForKilledPlayer = 0.9 maxLevelThresholdForKilledPlayer = 1.1 -- Stamina -- NOTE: Stamina is stored in miliseconds, so seconds are multiplied by 1000. -- rateStaminaHits multiplies every hit done a creature, which are later -- multiplied by player attack speed. -- rateStaminaGain is divider of every logged out second, eg: -- 60000 / 3 = 20000 milliseconds, what gives 20 stamina seconds for 1 minute being logged off. -- rateStaminaThresholdGain is divider for the premium stamina. -- staminaRatingLimit* is in minutes. rateStaminaLoss = 1 rateStaminaGain = 3 rateStaminaThresholdGain = 12 staminaRatingLimitTop = 41 * 60 staminaRatingLimitBottom = 14 * 60 rateStaminaAboveNormal = 1.0 rateStaminaUnderNormal = 1.0 staminaThresholdOnlyPremium = true -- Party -- NOTE: experienceShareLevelDifference is float number. -- experienceShareLevelDifference is highestLevel * value experienceShareRadiusX = 0 experienceShareRadiusY = 0 experienceShareRadiusZ = 0 experienceShareLevelDifference = 0 extraPartyExperienceLimit = 0 extraPartyExperiencePercent = 0 experienceShareActivity = 0 -- Global save -- NOTE: globalSaveHour means like 03:00, not that it will save every 3 hours, -- if you want such a system please check out data/globalevents/globalevents.xml. globalSaveEnabled = false globalSaveHour = 8 shutdownAtGlobalSave = true cleanMapAtGlobalSave = false -- Spawns deSpawnRange = 2 deSpawnRadius = 25 -- Summons maxPlayerSummons = 1 teleportAllSummons = true teleportPlayerSummons = true -- Status ownerName = "Pokemon Dash Online [Advanced]" ownerEmail = "" url = "" location = "Brazil" displayGamemastersWithOnlineCommand = false -- Logs -- NOTE: This kind of logging does not work in GUI version. -- For such, please compile the software with __GUI_LOGS__ flag. adminLogsEnabled = false displayPlayersLogging = true prefixChannelLogs = "" runFile = "" outLogName = "" errorLogName = "" truncateLogsOnStartup = false Caso útil, duel system.lua do LIB storagesDuel = {52480, 52481, 52482, 52482, 52483, 52484, 52485, 6598754} --[[ Lista das storages Duel! 52480 = sto de duelo e do modo de duel; 52481 = sto de pokes no duel; 52482 = sto do seu time; 52483 = sto do time adversario; 52484 = sto de aceitaçao de duel e do começo do duel; 52485 = sto do nome do 'invitador'; 6598754 = sto do canAttackOther; ]] function beginDuel(cid, n) if getPlayerStorageValue(cid, 52482) == -1 or getPlayerStorageValue(cid, 52483) == -1 then return true end local t1 = string.explode(getPlayerStorageValue(cid, 52482), ",") local t2 = string.explode(getPlayerStorageValue(cid, 52483), ",") local sto2, sto3 = getPlayerStorageValue(cid, 52482), getPlayerStorageValue(cid, 52483) if n == 0 then for i = 1, #t1 do local pid, sid = getPlayerByName(t1), getPlayerByName(t2) if isCreature(pid) and getPlayerStorageValue(pid, 52480) >= 1 then setPlayerStorageValue(pid, 6598754, 5) setPlayerStorageValue(pid, 52482, sto2) setPlayerStorageValue(pid, 52483, sto3) setPlayerStorageValue(pid, 52484, 10) end --- if isCreature(sid) and getPlayerStorageValue(sid, 52480) >= 1 then setPlayerStorageValue(sid, 6598754, 10) setPlayerStorageValue(sid, 52482, sto2) setPlayerStorageValue(sid, 52483, sto3) setPlayerStorageValue(sid, 52484, 10) end --- doSendAnimatedText(getThingPosWithDebug(pid), "START", 215) doSendAnimatedText(getThingPosWithDebug(sid), "START", 215) end return true else for i = 1, #t1 do local pid, sid = getPlayerByName(t1), getPlayerByName(t2) if isCreature(pid) and getPlayerStorageValue(pid, 52480) >= 1 then doSendAnimatedText(getThingPosWithDebug(pid), (n == 6 and "" or ""..n.."!"), 215) end if isCreature(sid) and getPlayerStorageValue(sid, 52480) >= 1 then doSendAnimatedText(getThingPosWithDebug(sid), (n == 6 and "" or ""..n.."!"), 215) end end n = n-1 end addEvent(beginDuel, 1000, cid, n) end function removeFromTableDuel(cid, value) if not isCreature(cid) then return true end local t1 = string.explode(getPlayerStorageValue(cid, 52482), ",") local t2 = string.explode(getPlayerStorageValue(cid, 52483), ",") table.remove(t1, table.find(t1, value) or -1) table.remove(t2, table.find(t2, value) or -1) --- local str1, str2 = "", "" for i = 1, 3 do if t1 then str1 = str1..(t1 or "").."," end if t2 then str2 = str2..(t2 or "").."," end end setPlayerStorageValue(cid, 52482, str1) setPlayerStorageValue(cid, 52483, str2) return true end function isDuelingAgainst(cid, pid) if not isCreature(cid) or not isCreature(pid) then return false end ----- local t1 = string.explode(getPlayerStorageValue(cid, 52482), ",") local t2 = string.explode(getPlayerStorageValue(cid, 52483), ",") ----- local name1, name2 = getCreatureName(cid), getCreatureName(pid) ----- if table.find(t1, name1) ~= nil and table.find(t2, name2) ~= nil then return true elseif table.find(t2, name1) ~= nil and table.find(t1, name2) ~= nil then return true end return false end function doEndDuel(cid, desisto) if isCreature(cid) then if getPlayerStorageValue(cid, 52482) ~= -1 then t1 = string.explode(getPlayerStorageValue(cid, 52482), ",") t2 = string.explode(getPlayerStorageValue(cid, 52483), ",") end local invit = getPlayerByName(getPlayerStorageValue(cid, 52485)) if isCreature(invit) then table1 = string.explode(getPlayerStorageValue(invit, 52482), ",") table2 = string.explode(getPlayerStorageValue(invit, 52483), ",") end if getPlayerStorageValue(cid, 52484) ~= 10 then if getPlayerStorageValue(cid, 52482) ~= -1 then for a = 1, 3 do local pid, sid = getPlayerByName(t1[a]), getPlayerByName(t2[a]) if isCreature(pid) then doCreatureSetSkullType(pid, 0) doRemoveCondition(pid, CONDITION_INFIGHT) end if isCreature(sid) then doCreatureSetSkullType(sid, 0) doRemoveCondition(sid, CONDITION_INFIGHT) end for i = 1, #storagesDuel do if isCreature(pid) then setPlayerStorageValue(pid, storagesDuel, -1) end if isCreature(sid) then setPlayerStorageValue(sid, storagesDuel, -1) end end end else for i = 1, #storagesDuel do setPlayerStorageValue(cid, storagesDuel, -1) end doCreatureSetSkullType(cid, 0) doRemoveCondition(cid, CONDITION_INFIGHT) --------------------------------- if table2 then local numero = 0 for i = 1, #table2 do local ppid = getPlayerByName(table2) if not isCreature(ppid) or getPlayerStorageValue(ppid, 52480) ~= -1 then numero = numero+1 end end if numero == 0 then doEndDuel(invit) sendMsgToPlayer(invit, 20, "The opponents are give up! Duel is canceled!") end end -------------------------------- end if desisto then doSendAnimatedText(getThingPosWithDebug(cid), "GIVE UP", COLOR_BLUE) end return true end for a = 1, #t1 do local pid, sid = getPlayerByName(t1[a]), getPlayerByName(t2[a]) removeFromTableDuel(pid, getCreatureName(cid)) removeFromTableDuel(sid, getCreatureName(cid)) end local t3 = string.explode(getPlayerStorageValue(cid, 52482), ",") local t4 = string.explode(getPlayerStorageValue(cid, 52483), ",") if (#t3 == 0 and #t4 >= 1) or (#t4 == 0 and #t3 >= 1) then for j = 1, (#t3 > 0 and #t3 or #t4) do local winner = #t3 > 0 and getPlayerByName(t3[j]) or getPlayerByName(t4[j]) if isCreature(winner) then addEvent(doSendAnimatedText, 500, getThingPosWithDebug(winner), "WIN", COLOR_ELECTRIC) for i = 1, #storagesDuel do setPlayerStorageValue(winner, storagesDuel, -1) end doCreatureSetSkullType(winner, 0) doRemoveCondition(winner, CONDITION_INFIGHT) end end addEvent(doSendAnimatedText, 500, getThingPosWithDebug(cid), "LOSE", COLOR_BURN) for i = 1, #storagesDuel do setPlayerStorageValue(cid, storagesDuel, -1) end doCreatureSetSkullType(cid, 0) doRemoveCondition(cid, CONDITION_INFIGHT) else for i = 1, #storagesDuel do setPlayerStorageValue(cid, storagesDuel, -1) end doCreatureSetSkullType(cid, 0) doRemoveCondition(cid, CONDITION_INFIGHT) if desisto then doSendAnimatedText(getThingPosWithDebug(cid), "GIVE UP", COLOR_BLUE) else addEvent(doSendAnimatedText, 500, getThingPosWithDebug(cid), "LOSE", COLOR_BURN) end end end end function checkDuel(cid) if getPlayerStorageValue(cid, 52484) ~= 10 then return true end if getPlayerStorageValue(cid, 52481) >= 1 then setPlayerStorageValue(cid, 52481, getPlayerStorageValue(cid, 52481)-1) doSendAnimatedText(getThingPosWithDebug(cid), "POKE DOWN", 65) end if getPlayerStorageValue(cid, 52481) == 0 then doEndDuel(cid) end end --/////////////////////////////////////////////////////////////////////////////////////////////-- Precisar de outro arquivo só pedir. Grato desde já.
Postado Agosto 19, 2014 11 anos Autor up. Acho que errei no título do tópico, seria melhor "Os treinadores estão podendo matar os pokemons dos outros".
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.