Histórico de Curtidas
-
miguelprojac recebeu reputação de russo000 em Duvida script Texto animado - REVSCRIPT@Marvok Muito obrigado mano.. consegui adaptar
Ficou assim:
local effects = { {position = Position(32365, 32236, 7), text = 'Trainers'} } local textoEvent = GlobalEvent("textoEvent") function textoEvent.onThink(interval) for i = 1, #effects do local settings = effects[i] local spectators = Game.getSpectators(settings.position, false, true, 7, 7, 5, 5) if #spectators > 0 then if settings.text then for i = 1, #spectators do spectators[i]:say(settings.text, TALKTYPE_MONSTER_SAY, false, spectators[i], settings.position) end end if settings.effect then settings.position:sendMagicEffect(settings.effect) end end end return true end textoEvent:interval(3500) textoEvent:register()
-
miguelprojac deu reputação a leomacedin em [AJUDA] monster.events.Qual servidor ou website você utiliza como base?
OTserver-BR
Qual o motivo deste tópico?
Fala pessoal beleza?
Gostaria de saber se é possivel colocar 2 monsters.events no mesmo monster.xml
monster.events = {
"LeidenHeal"
}
Como queria colocar
monster.events = {
"LeidenHeal",
"LeidenDead"
}
eu criei uma função onde quando o boss leiden morrer nascer o boss principal, porem ja tem um evento setado ao leiden que é "LeidenHeal" e são duas funções diferentes.
LeidenHeal = function leidenHeal.onHealthChange
LeidenDead = function leidenDeath.onDeath
vou postar os scripts abaixo com as duas funções e o monster.xml
Scripts criados em REVSCRIPT
Você tem o código disponível? Se tiver publique-o aqui:
CREATURESCRIPT.XML local leidenHeal = CreatureEvent("LeidenHeal") function leidenHeal.onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) if creature:getName():lower() == "leiden" then if attacker and attacker:isPlayer() then primaryType = COMBAT_HEALING secondaryType = primaryType if primaryDamage < 0 then primaryDamage = primaryDamage * -1 end secondaryDamage = primaryDamage creature:addHealth(primaryDamage < 0 and -primaryDamage or primaryDamage) return primaryDamage, primaryType, secondaryDamage, secondaryType end end end leidenHeal:register() local leidenDeath = CreatureEvent("LeidenDead") function leidenDeath.onDeath(creature, corpse, deathList) local pool = Tile(creature:getPosition()):getItemById(2016) if pool then pool:remove() end Game.createMonster("bug", creature:getPosition(), true, true) end leidenDeath:register() LEIDEN.XML local mType = Game.createMonsterType("Leiden") local monster = {} monster.description = "Leiden" monster.experience = 0 monster.outfit = { lookType = 988, lookHead = 0, lookBody = 0, lookLegs = 0, lookFeet = 0, lookAddons = 0, lookMount = 0 } monster.health = 30000 monster.maxHealth = 30000 monster.race = "blood" monster.corpse = 0 monster.speed = 240 monster.manaCost = 390 monster.maxSummons = 2 monster.changeTarget = { interval = 4000, chance = 20 } monster.strategiesTarget = { nearest = 70, health = 10, damage = 10, random = 10, } monster.flags = { summonable = true, attackable = true, hostile = true, convinceable = true, pushable = false, rewardBoss = false, illusionable = false, canPushItems = true, canPushCreatures = true, staticAttackChance = 95, targetDistance = 1, runHealth = 0, healthHidden = false, isBlockable = false, canWalkOnEnergy = false, canWalkOnFire = false, canWalkOnPoison = false, pet = false } monster.events = { "LeidenHeal" } monster.light = { level = 0, color = 0 } monster.summons = { {name = "Barkless Fanatic", chance = 20, interval = 2000}, {name = "Barkless Fanatic", chance = 30, interval = 2000} } monster.voices = { interval = 5000, chance = 10, {text = "Bring me the pain! Make me suffer!", yell = false} } monster.loot = { } monster.attacks = { {name ="melee", interval = 2000, chance = 100, minDamage = 0, maxDamage = -400} } monster.defenses = { defense = 50, armor = 35 } monster.reflects = { {type = COMBAT_PHYSICALDAMAGE, percent = 100}, {type = COMBAT_ENERGYDAMAGE, percent = 100}, {type = COMBAT_EARTHDAMAGE, percent = 100}, {type = COMBAT_FIREDAMAGE, percent = 100}, {type = COMBAT_LIFEDRAIN, percent = 100}, {type = COMBAT_MANADRAIN, percent = 100}, {type = COMBAT_DROWNDAMAGE, percent = 100}, {type = COMBAT_ICEDAMAGE, percent = 100}, {type = COMBAT_HOLYDAMAGE , percent = 100}, {type = COMBAT_DEATHDAMAGE , percent = 100} } monster.elements = { {type = COMBAT_PHYSICALDAMAGE, percent = 100}, {type = COMBAT_ENERGYDAMAGE, percent = 0}, {type = COMBAT_EARTHDAMAGE, percent = 0}, {type = COMBAT_FIREDAMAGE, percent = 0}, {type = COMBAT_LIFEDRAIN, percent = 0}, {type = COMBAT_MANADRAIN, percent = 0}, {type = COMBAT_DROWNDAMAGE, percent = 0}, {type = COMBAT_ICEDAMAGE, percent = 0}, {type = COMBAT_HOLYDAMAGE , percent = 0}, {type = COMBAT_DEATHDAMAGE , percent = 0} } monster.immunities = { {type = "paralyze", condition = false}, {type = "outfit", condition = false}, {type = "invisible", condition = false}, {type = "bleed", condition = false} } mType:register(monster)
-
miguelprojac deu reputação a Marvok em Duvida script Texto animado - REVSCRIPTEstá no caminho certo porém na tfs1.3 não possui doSendAnimatedText, você vai precisar usar parecido a isso aqui:
function onThink(interval)
local effects = {
--[[
Exemplos:
{position = Position(986, 1216, 7), effect = 29}, **Somente Effect**
{position = Position(1622, 1458, 7), text = "[Teste]", effect = 40, say = true, color = math.random(1,255)}, **say ativo é fala estilo monstro**
{position = Position(1622, 1458, 7), text = "[1SET]", say = false, color = math.random(1,255)}, **say desativado, é levado color em consideração**
]]
}
for i = 1, #effects do
local settings = effects[i]
local spectators = Game.getSpectators(settings.position, false, true, 7, 7, 5, 5)
if #spectators > 0 then
if settings.text then
for i = 1, #spectators do
if settings.say then
spectators[i]:say(settings.text, TALKTYPE_MONSTER_SAY, false, spectators[i], settings.position)
else
Game.sendAnimatedText(settings.text, settings.position, settings.color)
end
end
end
if settings.effect then
settings.position:sendMagicEffect(settings.effect)
end
end
end
return true
end
-
miguelprojac deu reputação a Natanael Beckman em [GlobalEvents] ServeSave - Shutdown/AutomáticoGalera é um script muito simples, porém pra mim é muito ÚTIL.
Abra a pasta data/globalevents/scripts crie um arquivo .lua com o nome GlobalSave.lua, em seguida adicone o code:
function prepareShutdown(minutes) if(minutes <= 0) then doSetGameState(GAMESTATE_SHUTDOWN) return false end if(minutes == 1) then doBroadcastMessage("Server is going down in " .. minutes .. " minute for global save, please log out now!") elseif(minutes <= 3) then doBroadcastMessage("Server is going down in " .. minutes .. " minutes for global save, please log out.") else doBroadcastMessage("Server is going down in " .. minutes .. " minutes for global save.") end shutdownEvent = addEvent(prepareShutdown, 60000, minutes - 1) return true end function onTime() return prepareShutdown(5) -- Quantos minutos pra executar o ServeSave. end Ajustes:
Quando quiser modificar os minutos altere: -return prepareShutdown(5) - (5) = 5 minutos, eu recomendo no mínimo 5 minutos, em outras palavras não mexa. Em globalevents.xml adicione a tag seguinte:
<globalevent name="GlobalSave" time="05:30" event="script" value="GlobalSave.lua"/> No meu ServeSave é feito as 05:30 da manhã, modifique pro horário desejado!
Em config.lua verifique essa regra:
Se tiver TRUE deixa, assim ele fecha o .exe se não tiver no seu config.lua não tem problema closeInstanceOnShutdown = true -
-
-
Esse tutorial é só isso, clique em GOSTEI, e comente no tópico, muito obrigado!
--------------------------------------------------------------------------------------------------------------------------------------------------------
AUTO RESTART
--------------------------------------------------------------------------------------------------------------------------------------------------------
Pra você que utiliza Windows esse é perfeito:
Dezon OT Admin [restarter]
Pra você que utiliza Linux:
Baixe esse arquivo, TFS.SH, bote dentro da pasta do seu OT.
Esse arquivo está configurado pra abrir outro arquivo chamado tfs caso o seu seja outro nome mude pra esse, tfs.
Sempre que for abrir seu OT execute esse comando ./tfs.sh& e assim toda vez que o OT cair ele renicia automaticamente.
-
miguelprojac deu reputação a xnerd9234 em Comprar item por alavanca - revscriptquando eu chegar em casa eu adapto pra ti
-
miguelprojac deu reputação a xnerd9234 em Comprar item por alavanca - revscriptlocal c = { ['item'] = 2565, ['cost'] = 200 * 10000, [1945] = 1946, -- lever [1946] = 1945, -- lever uniqueID = 4819 } local leverBuy = Action() function leverBuy.onUse(player, item, fromPosition, itemEx, toPosition) local cid = player:getId() if doPlayerRemoveMoney(cid, c.cost) then doPlayerAddItem(cid, c.item, 1) doPlayerSendTextMessage(cid, 25,"You bought an item for ".. c.cost .." gold") else doPlayerSendCancel(cid, "You do not have enough money!") end item:transform(c[item.itemid]) return true end leverBuy:uid(c.uniqueID) leverBuy:register() Testa ai, não testei.
-
miguelprojac deu reputação a Toruk em Ao dar use no item, receber tibia coinslocal addCoins = Action() function addCoins.onUse(player, item, fromPosition, target, toPosition, isHotkey) local coins = 1 db.query("UPDATE `accounts` SET `coins` = `coins` + '" .. coins .. "' WHERE `id` = '" .. player:getAccountId() .. "';") player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Voce recebeu "..coins.." coins") item:remove(1) return true end addCoins:id(XXXXXX) addCoins:register()
Lembre de mudar o id.
-
miguelprojac deu reputação a Deletera em [OTX 12.64] Baiak StyllerAtenção! Os arquivos disponibilizados abaixo são da versão 12.64!
Para obter otserv 12.64+ atualizado com novas áreas e novos gráficos acesse o github oficial do projeto OTX: https://github.com/opentibiabr/otservbr-global
Servidor feito especialmente para jogadores que gostam do Tibia Oldstyle,
mas colocado na versao 12 com novas funcionalidades, mounts, outfits e itens.
Todos Outfits sao frees & Addons coletando itens
PVP clássico, old school times
Spells adaptadas a versao 8.60
Mais de 50 quests na Teleport Room
Tasks e Missions para explorar o mapa
Raids automáticas com novos bosses
Reward System desabilitado, loot tradicional (bem melhor assim, certo?)
Áreas custom e inovadoras como Hogwarts
Em resumo, o OT busca ser simples, resgatando a naturalidade do que era o baiak da versão 8.60 em 2009, mas com implementações 12x+
◄IMAGENS►
◄DATAPACK & DLLS►
» OTX Baiak Styller 12.64 MediaFire (Scan)
» OtservBR Dlls & Executável (Windows 64x)
(Antes de rodar o OT verifique de usar a mesma database e configurar o login no config.lua)
◄CLIENTS►
» Tibia Client 12.64 MediaFire (Scan)
(Para conectar ao cliente 12 (localhost), acesse usando 127.0.0.1_client.exe, localizado na pasta bin.)
◄WEB►
» [GesiorAcc] para Tibia 12.64 MediaFire (Scan)
Instale o XAMP para rodar com a data base e site disponíveis
(não se esquece de alterar o login e senha no config.lua, para o atual a senha do mysql está como "XIPA2")
» [Data base] acc/email e senha: god/god MediaFire (Scan)
O OT está configurado para aceitar acc no lugar de email (opcional) para usar as acc de testes é senha 123123
◄Créditos►
Waldir Teixeira (Saruman/Deletera) &