Ir para conteúdo
  • Cadastre-se

(Resolvido)[Duvida] Tempo de Frags


Ir para solução Resolvido por fezeRa,

Posts Recomendados

Eu queria saber se tem como diminuir o tempo de frags no server?

Não é o tempo de red skull/white skull...

É o tempo de frags mesmo, tipo se eu matar um cara agora, daqui 1 hora vai sair o frag dele, ou daqui 2 hora, etc, tem como mudar isso?

Link para o post
Compartilhar em outros sites

Abra o config.lua e procura por:


Esse é o tempo que demora só se algum monstro te atacar ou você atacar alguém e ela não morrer.
pzLocked = 50 * 1000
huntingDuration = 50 * 1000

está em 50 segundos, modifique pro desejado.

Esse é o tempo que demora pra sair o pz se você matar alguém:
whiteSkullTime = 15 * 60 * 1000 no caso ai é 15 minutos, diminui ali em 15 até quanto você quer. 

Link para o post
Compartilhar em outros sites

Fiz uma coisa doida, tenta ae

accountManager = true
namelockManager = true
newPlayerChooseVoc = true
newPlayerSpawnPosX = 156
newPlayerSpawnPosY = 51
newPlayerSpawnPosZ = 7
newPlayerTownId = 1
newPlayerLevel = 20
newPlayerMagicLevel = 1
generateAccountNumber = false

redSkullLength = 1 * 3 * 60 * 60
blackSkullLength = 1 * 6 * 60 * 60
dailyFragsToRedSkull = 15
weeklyFragsToRedSkull = 105
monthlyFragsToRedSkull = 420
dailyFragsToBlackSkull = 20
weeklyFragsToBlackSkull = 140
monthlyFragsToBlackSkull = 560
dailyFragsToBanishment = dailyFragsToRedSkull
weeklyFragsToBanishment = weeklyFragsToRedSkull
monthlyFragsToBanishment = monthlyFragsToRedSkull
blackSkulledDeathHealth = 40
blackSkulledDeathMana = 0
useBlackSkull = false
useWhiteSkull = false
useRedSkull = false
useFragHandler = false
advancedFragList = false

notationsToBan = 3
warningsToFinalBan = 4
warningsToDeletion = 5
banLength = 7 * 24 * 60 * 60
killsBanLength = 7 * 24 * 60 * 60
finalBanLength = 30 * 24 * 60 * 60
ipBanishmentLength = 7 * 24 * 60 * 60
broadcastBanishments = true
maxViolationCommentSize = 200
violationNameReportActionType = 2
autoBanishUnknownBytes = false

worldType = "open"
protectionLevel = 300
pvpTileIgnoreLevelAndVocationProtection = true
pzLocked = 1 * 10 * 1000
huntingDuration = 10 * 1000
criticalHitChance = 50
criticalHitMultiplier = 1
displayCriticalHitNotify = false
removeWeaponAmmunition = false
removeWeaponCharges = false
removeRuneCharges = false
whiteSkullTime = 2 * 60 * 1000
noDamageToSameLookfeet = false
showHealingDamage = false
showHealingDamageForMonsters = false
fieldOwnershipDuration = 5 * 1000
stopAttackingAtExit = false
oldConditionAccuracy = false
loginProtectionPeriod = 1 * 1000
deathLostPercent = 10
stairhopDelay = 1 * 1000
pushCreatureDelay = 0.5 * 1000
deathContainerId = 1987
gainExperienceColor = 215
addManaSpentInPvPZone = true
squareColor = 0
allowFightback = true

worldId = 0
ip = ""
bindOnlyConfiguredIpAddress = false
loginPort = 7171
gamePort = 7172
adminPort = 7171
statusPort = 7171
loginTries = 10
retryTimeout = 5 * 1000
loginTimeout = 60 * 1000
maxPlayers = 1000
motd = ""
displayOnOrOffAtCharlist = false
onePlayerOnlinePerAccount = true
allowClones = false
serverName = ""
loginMessage = ""
statusTimeout = 5 * 60 * 1000
replaceKickOnLogin = true
forceSlowConnectionsToDisconnect = false
loginOnlyWithLoginServer = false
premiumPlayerSkipWaitList = true

sqlType = "mysql"
sqlHost = "localhost"
sqlPort = 3306
sqlUser = "root"
sqlPass = ""
sqlDatabase = ""
sqlFile = ".s3db"
sqlKeepAlive = 0
mysqlReadTimeout = 10
mysqlWriteTimeout = 10
encryptionType = "sha1"

deathListEnabled = true
deathListRequiredTime = 1 * 60 * 1000
deathAssistCount = 19
maxDeathRecords = 5

ingameGuildManagement = true
levelToFormGuild = 300
premiumDaysToFormGuild = 0
guildNameMinLength = 4
guildNameMaxLength = 30

highscoreDisplayPlayers = 20
updateHighscoresAfterMinutes = 1

buyableAndSellableHouses = true
houseNeedPremium = false
bedsRequirePremium = false
levelToBuyHouse = 300
housesPerAccount = 0
houseRentAsPrice = false
housePriceAsRent = false
housePriceEachSquare = 30000
houseRentPeriod = "never"
houseCleanOld = 0
guildHalls = true

timeBetweenActions = 200
timeBetweenExActions = 1000
checkCorpseOwner = true
hotkeyAimbotEnabled = true
maximumDoorLevel = 500

mapName = "Baiak Yurots.otbm"
mapAuthor = ""
randomizeTiles = true
useHouseDataStorage = false
storeTrash = true
cleanProtectedZones = true
mailboxDisabledTowns = "-1"

defaultPriority = "high"
niceLevel = 5
coresUsed = "-1"
optimizeDatabaseAtStartup = true
removePremiumOnInit = true
confirmOutdatedVersion = false

maxMessageBuffer = 10
bufferMutedOnSpellFailure = false

dataDirectory = "data/"
allowChangeOutfit = true
allowChangeColors = true
allowChangeAddons = true
addonsOnlyPremium = false
disableOutfitsForPrivilegedPlayers = false
bankSystem = true
saveGlobalStorage = true
displaySkillLevelOnAdvance = true
spellNameInsteadOfWords = false
emoteSpells = true
promptExceptionTracerErrorBox = true
storePlayerDirection = false
monsterLootMessage = 3
monsterLootMessageType = 25
separateViplistPerCharacter = false

ghostModeInvisibleEffect = false
ghostModeSpellEffects = true

idleWarningTime = 14 * 60 * 1000
idleKickTime = 15 * 60 * 1000
expireReportsAfterReads = 1
playerQueryDeepness = 2
maxItemsPerPZTile = 0
maxItemsPerHouseTile = 0

freePremium = true
premiumForPromotion = true

blessingOnlyPremium = false
blessingReductionBase = 30
blessingReductionDecreament = 5
eachBlessReduction = 8

experienceStages = true
rateExperience = 2000
rateExperienceFromPlayers = 0
rateSkill = 200
rateMagic = 200
rateLoot = 4
rateSpawn = 5

rateMonsterHealth = 1.0
rateMonsterMana = 1.0
rateMonsterAttack = 1.0
rateMonsterDefense = 1.0

minLevelThresholdForKilledPlayer = 0.9
maxLevelThresholdForKilledPlayer = 1.1

rateStaminaLoss = 1
rateStaminaGain = 4
rateStaminaThresholdGain = 12
staminaRatingLimitTop = 41 * 60
staminaRatingLimitBottom = 14 * 60
rateStaminaAboveNormal = 1.5
rateStaminaUnderNormal = 0.5
staminaThresholdOnlyPremium = true

experienceShareRadiusX = 30
experienceShareRadiusY = 30
experienceShareRadiusZ = 1
experienceShareLevelDifference = 2 / 3
extraPartyExperienceLimit = 20
extraPartyExperiencePercent = 5
experienceShareActivity = 2 * 60 * 1000

globalSaveEnabled = false
globalSaveHour = 12
shutdownAtGlobalSave = true
cleanMapAtGlobalSave = false

deSpawnRange = 2
deSpawnRadius = 50

maxPlayerSummons = 2
teleportAllSummons = false
teleportPlayerSummons = false

ownerName = ""
ownerEmail = ""
url = ""
location = "Brazil"
displayGamemastersWithOnlineCommand = false

adminLogsEnabled = true
displayPlayersLogging = true
prefixChannelLogs = ""
runFile = ""
outLogName = ""
errorLogName = ""
truncateLogsOnStartup = false
Link para o post
Compartilhar em outros sites

Wat?

useBlackSkull = false
useWhiteSkull = false
useRedSkull = false

?

 

O que eu tenho dúvida é de diminuir o tempo de frag(ou seja se eu mata um cara agora, o frag sair daqui X tempo, deve ter como mudar esse tempo padrão),

não desativar frag/skull

Link para o post
Compartilhar em outros sites

Axo que agora entendi o que você quer.

 

em talkactions/script/frags.lua procure por:

local times = {today = (time - 86400), week = (time - (7 * 86400))} 

86400 segundos = 1 dia

7 representa os dias, ou seja 86400 segundos vezes 7 = 1 semana.

 

então 24h fica:

local times = {today = (time - 86400), week = (time - (1 * 86400))}

e 10h fica:

local times = {today = (time - 36000), week = (time - (1 * 36000))}

Crédito: Swishy

Link para o post
Compartilhar em outros sites

Mas tipo, esse script acredito eu, que ele só serve pra falar os frags que voce tem, dai ele vai puxa o tempo do frag, pelo tempo que voce colocar ali no script,
mas o frag acho que vai continuar com o tempo dele mesmo se for mudar ali (minha opinião)

Link para o post
Compartilhar em outros sites
  • Solução

Bom, voltando aqui, eu resolvi o que eu queria, no caso pra voce diminuir o tempo do FRAG.

É necessário mudar nas sources e compilar, caso contrario não tem como mudar apenas no frags.lua ou config.lua !!

Link para o post
Compartilhar em outros sites
  • 7 months later...

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.

Visitante
Responder

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emojis são permitidos.

×   Seu link foi automaticamente incorporado.   Mostrar como link

×   Seu conteúdo anterior foi restaurado.   Limpar o editor

×   Não é possível colar imagens diretamente. Carregar ou inserir imagens do URL.

  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.


  • Conteúdo Similar

    • Por FeeTads
      SALVE rapaziada do TK, esses dias vim pensando em novos scripts pro meu OT, e em um deles eu precisava que determinada area não contasse frag pro player que matasse outros, PORÉM eu precisava que os players que morressem nessa area ainda assim tivessem as penalidades da sua morte, procurei por ai, achei alguns scripts que apenas tiravam o SKULL e não realmente o FRAG do player.

      **script atualizado 22/10/2023** - melhorado e otimizado, levei o script pra puxar as infos por .lua / creatureScripts

      vou disponibilizar o code aqui, e o que fazer pra determinada area não contar frag.

      SOURCE OTX 2 / TFS 0.x, Funciona em TFS 1.x mudando as tags e ajeitando as sintaxes.

      vá em creatureevent.cpp

      procure por:
      else if(type == "preparedeath") _type = CREATURE_EVENT_PREPAREDEATH;
      Adiciona abaixo:
      else if(type == "nocountfrag") _type = CREATURE_EVENT_NOCOUNTFRAG;

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "onPrepareDeath";  
      Adicione abaixo: 
      case CREATURE_EVENT_NOCOUNTFRAG: return "noCountFragArea";

      procure por:
      case CREATURE_EVENT_PREPAREDEATH: return "cid, deathList";
      Adicione abaixo:
      case CREATURE_EVENT_NOCOUNTFRAG: return "cid, target";

      agora no mesmo arquivo, vá até o final do arquivo e adicione essa função:
      uint32_t CreatureEvent::executeNoCountFragArea(Creature* creature, Creature* target) { //noCountFragArea(cid, target) if(m_interface->reserveEnv()) { ScriptEnviroment* env = m_interface->getEnv(); if(m_scripted == EVENT_SCRIPT_BUFFER) { env->setRealPos(creature->getPosition()); std::ostringstream scriptstream; scriptstream << "local cid = " << env->addThing(creature) << std::endl; scriptstream << "local target = " << env->addThing(target) << std::endl; if(m_scriptData) scriptstream << *m_scriptData; bool result = true; if(m_interface->loadBuffer(scriptstream.str())) { lua_State* L = m_interface->getState(); result = m_interface->getGlobalBool(L, "_result", true); } m_interface->releaseEnv(); return result; } else { #ifdef __DEBUG_LUASCRIPTS__ std::ostringstream desc; desc << creature->getName(); env->setEvent(desc.str()); #endif env->setScriptId(m_scriptId, m_interface); env->setRealPos(creature->getPosition()); lua_State* L = m_interface->getState(); m_interface->pushFunction(m_scriptId); lua_pushnumber(L, env->addThing(creature)); lua_pushnumber(L, env->addThing(target)); bool result = m_interface->callFunction(2); m_interface->releaseEnv(); return result; } } else { std::clog << "[Error - CreatureEvent::noCountFragArea] Call stack overflow." << std::endl; return 0; } }

      agora vá em creatureevent.h

      procure por:
      CREATURE_EVENT_PREPAREDEATH
      adicione abaixo:
      CREATURE_EVENT_NOCOUNTFRAG

      procure por:
      uint32_t executePrepareDeath(Creature* creature, DeathList deathList);
      Adicione abaixo:
      uint32_t executeNoCountFragArea(Creature* creature, Creature* target);

      agora vá em player.cpp

      procure por:
      bool Player::onKilledCreature(Creature* target, DeathEntry& entry)
      abaixo de:
      War_t enemy; if(targetPlayer->getEnemy(this, enemy)) { if(entry.isLast()) IOGuild::getInstance()->updateWar(enemy); entry.setWar(enemy); }
      Adicione o seguinte código:
      if (targetPlayer){ CreatureEventList killEvents = getCreatureEvents(CREATURE_EVENT_NOCOUNTFRAG); for (const auto &event : killEvents) { if (!event->executeNoCountFragArea(this, target)) { return true; } } }

      //

      Feito isso, tudo completo na sua source, agora é necessário adicionar o creaturescript dentro do servidor

      vá até creaturescripts/scripts
      crie um arquivo chamado, "noCountFragInArea.lua"
      e dentro dele cole o código:
       
      --[[ script feito por feetads / TibiaKing ]]-- --[[ discord: feetads / FeeTads#0246 ]]-- -- Add positions here for which you do not want to count frags local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, -- from = area superior esquerda / to = area inferior direita (formando um quadrado) } local onlyKillerInArea = false -- only killer need to be in area? function noCountFragArea(cid, target) if not isCreature(cid) or not isCreature(target) then return true end local posKiller = getPlayerPosition(cid) local posTarget = getPlayerPosition(target) for i = 1, #areas do local area = areas[i] if isInArea(posKiller, area.from, area.to) then if onlyKillerInArea then return false elseif isInArea(posTarget, area.from, area.to) then return false end end end return true end
      agora em creaturescripts.xml
      <event type="nocountfrag" name="fragarea" event="script" value="noCountFragInArea.lua"/>
      agora em creaturescripts/scripts/login.lua
       procure por OU semelhante a esse:
      registerCreatureEvent(cid, "AdvanceSave")
      e abaixo adicione:
      registerCreatureEvent(cid, "fragarea")

      //


      Agora tudo certo, quando quiser adiciona uma area que não pega frag, vá até o script e apenas coloque a area, igual o demonstrado no script

      Exemplo:
      local areas = { [1] = {from = {x = 91, y = 122, z = 7}, to = {x = 98, y = 127, z = 7}}, [2] = {from = {x = 1000, y = 1000, z = 7}, to = {x = 1100, y = 1100, z = 7}}, }
      assim somente colocando a area no script e abrindo o server ou dando /reload, já funcionará a area como não pegar frag.
      Esse sistema pode ser bom pra areas de pvp ativo, onde você ainda quer que o player que morrer perca os atributos, como se fosse uma morte normal, porém não conta frag pra quem matar.
      Bom pra sistemas tipo castle 48h (guild war), onde há diversas mortes e risco de pegar red, atrapalhando a war.

      Façam bom proveito dos scripts, e deixem os créditos no script rsrs

      **Eu fiz as alterações e o simples código por isso vim disponibilizar, créditos meus**
    • Por tataboy67
      Opa galera beleza?
      Meu amigo esses dias pediu um sistema basicamente assim:
      sistema:
      !quests charizard (você é teleportado para hunt ou quest por "x" tempo, e após esse tempo, você é teleportado para 1 posição "y" (cp/templo)) !quest time (o jogador recebe uma msg de quanto tempo ainda resta para ele ficar nessa hunt/quest) !quest (abre uma janela aonde fala as informações dessa hunt/quest)
      bom eu tentei usar o "for" para fazer com que tenha varios tipos de hunts dentro (criando uma tabela), mas como ainda estou estudando lua e esse é meu 1º script, eu não consegui fazer, então eu to usando o "param" E eu fui pesquisar aqui no forum e em outro forums tbm esse sistema, e vi que ninguem nunca postou  
      então resolvi cria-lo.
       
      Em Talkactions.xml, adicione a linha:

      Em Talkactions, crie um arquivo com o nome de quest_time.lua, e adicione:

      Creditos:
      Eu: Pelo script

      Desculpa se o script ficou ruim, é que é meu primeiro script, tenham pena de mim.  
      Eu farei melhoras nesse script mais pra frente.
    • Por 001rafa
      Galera como faz para poder criar um slot a mais no otcliente para poder equipar com itens por exemplo mais um ring e mais um colar?
      sei que tem q modificar no source do cliente e no distro alguem poderia me ajudar com um tutorial?

      grato pela atenção.

      up
    • Por M Cronos
      Boa Noite amigos, eu estava usando o Object builder e o item editor para adicionar uns sprites no meu servidor para usar com um script, este aqui >>> 
       que o @Comedinha postou para ajudar um outro membro.
      Bom a questão é que o script parece estar funcionando,por que não dá nenhum erro, mas o item também não é usado. bom eu fucei bastante e ainda  não consegui resultado então eu pensei que talvez eu tivesse que setar o item como usável no OB ou no IE, pois me lembro de ter visto isso em algum lugar, mas não consigo achar onde eu faço isso. alguém pode me ajudar? se possível. obrigado.
    • Por fezeRa
      Estou com um problema chato. Seguinte:
       
      O player pega , compra promotion, dai fica lá "Elder Druid", dai se ele reloga, ele volta pra Druid.
      Ou seja não ta salvando a vocation, é algum problema no login.lua que nao salva a vocation atual? Alguem sabe?
×
×
  • Criar Novo...

Informação Importante

Confirmação de Termo