• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

I need help with DOTA event!

Kriggarrn

New Member
Joined
Aug 23, 2019
Messages
24
Reaction score
2
hey guys i'm using tfs 0.4
i have problem with my dota event ( globalevents).
----------------------------------------------------
<globalevent time="12:46" name="Dota" script="eventos/dota.lua"/>

-----------------------------------------------------

function onTime()
broadcastMessage("[DotA] Event opens and starts in 5 minutes, teleport opens in center, minimum 4 players for event to start.")
gatepos = {x=1789, y=1704, z=7, stackpos=1} -- Posiçمo da pedra inicial
getgate = getThingfromPos(gatepos)
doRemoveItem(getgate.uid,1)
addEvent(startDota, 0 * 60 * 1000) -- Tempo de espera
end

function startDota()
if Game.getStorageValue(140400) >= 4 then -- Minimo de jogadores para o evento iniciar
broadcastMessage("[DotA] Event started and teleport closed, the first team to destroy all three is the winner.") -- Mensagem quando evento inicia
local monster1 = "Gerador Azul I" -- Geradores Iniciais
local monster2 = "Gerador Vermelho I" -- Geradores Iniciais
gatepos = {x=1797, y=1732, z=7, stackpos=1} -- Posiçمo da Pedras 1
getgate = getThingfromPos(gatepos)
gatepos11 = {x=1797, y=1731, z=7, stackpos=1} -- Posiçمo da Pedras 11
getgate11 = getThingfromPos(gatepos11)
gatepos12 = {x=1797, y=1730, z=7, stackpos=1} -- Posiçمo da Pedras 12
getgate12 = getThingfromPos(gatepos12)
gatepos13 = {x=1797, y=1734, z=7, stackpos=1} -- Posiçمo da Pedras 13
getgate13 = getThingfromPos(gatepos13)
gatepos14 = {x=1797, y=1733, z=7, stackpos=1} -- Posiçمo da Pedras 14
getgate14 = getThingfromPos(gatepos14)
gatepos2 = {x=1713, y=1732, z=7, stackpos=1} -- Posiçمo da Pedra 2
getgate2 = getThingfromPos(gatepos2)
gatepos21 = {x=1713, y=1731, z=7, stackpos=1} -- Posiçمo da Pedra 21
getgate21 = getThingfromPos(gatepos21)
gatepos22 = {x=1713, y=1730, z=7, stackpos=1} -- Posiçمo da Pedra 22
getgate22 = getThingfromPos(gatepos22)
gatepos23 = {x=1713, y=1733, z=7, stackpos=1} -- Posiçمo da Pedra 23
getgate23 = getThingfromPos(gatepos23)
gatepos24 = {x=1713, y=1734, z=7, stackpos=1} -- Posiçمo da Pedra 24
getgate24 = getThingfromPos(gatepos24)
Game.createItem(1304, 1, Position(1789, 1704, 7)) -- Posiçمo da pedra inicial
doSummonCreature(monster1, {x=1719, y=1732, z=7}) -- Posiçمo do primeiro gerador vermelho
doSummonCreature(monster2, {x=1791, y=1732, z=7}) -- Posiçمo do primeiro gerador azul
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate11.uid,1)
doRemoveItem(getgate12.uid,1)
doRemoveItem(getgate13.uid,1)
doRemoveItem(getgate14.uid,1)
doRemoveItem(getgate2.uid,1)
doRemoveItem(getgate21.uid,1)
doRemoveItem(getgate22.uid,1)
doRemoveItem(getgate23.uid,1)
doRemoveItem(getgate24.uid,1)
else
broadcastMessage("[DotA] Event did not start because there were not enough players.") -- Msg caso nمo haja jogadores suficiente
Game.createItem(1304, 1, Position(1789, 1704, 7)) -- Posiçمo da pedra inicial
doCreateTeleport(1387, {x=1789, y=1706, z=7}, {x=1802, y=1730, z=7}) -- Teleport de saida time vermelho
doCreateTeleport(1387, {x=1789, y=1706, z=7}, {x=1708, y=1730, z=7}) -- Teleport de saida time azul
end
end



-------------------------------------------------------------------------dota.png

there's a broadcast message that : 13:01 [DotA] Event opens and starts in 5 minutes, teleport opens in center, minimum 4 players for event to start.

but i receive this error


if someone have idea how to fix it? thanks.
 
here is how to share a code you will find this sign </> click on it and paste next time.
Code:
function onTime()
broadcastMessage("[DotA] Event opens and starts in 5 minutes, teleport opens in center, minimum 4 players for event to start.")
gatepos = {x=1789, y=1704, z=7, stackpos=1} -- Posiçمo da pedra inicial
getgate = getThingfromPos(gatepos)
doRemoveItem(getgate.uid,1)
addEvent(startDota, 0 * 60 * 1000) -- Tempo de espera
end

function startDota()
if Game.getStorageValue(140400) >= 4 then -- Minimo de jogadores para o evento iniciar
broadcastMessage("[DotA] Event started and teleport closed, the first team to destroy all three is the winner.") -- Mensagem quando evento inicia
local monster1 = "Gerador Azul I" -- Geradores Iniciais
local monster2 = "Gerador Vermelho I" -- Geradores Iniciais
gatepos = {x=1797, y=1732, z=7, stackpos=1} -- Posiçمo da Pedras 1
getgate = getThingfromPos(gatepos)
gatepos11 = {x=1797, y=1731, z=7, stackpos=1} -- Posiçمo da Pedras 11
getgate11 = getThingfromPos(gatepos11)
gatepos12 = {x=1797, y=1730, z=7, stackpos=1} -- Posiçمo da Pedras 12
getgate12 = getThingfromPos(gatepos12)
gatepos13 = {x=1797, y=1734, z=7, stackpos=1} -- Posiçمo da Pedras 13
getgate13 = getThingfromPos(gatepos13)
gatepos14 = {x=1797, y=1733, z=7, stackpos=1} -- Posiçمo da Pedras 14
getgate14 = getThingfromPos(gatepos14)
gatepos2 = {x=1713, y=1732, z=7, stackpos=1} -- Posiçمo da Pedra 2
getgate2 = getThingfromPos(gatepos2)
gatepos21 = {x=1713, y=1731, z=7, stackpos=1} -- Posiçمo da Pedra 21
getgate21 = getThingfromPos(gatepos21)
gatepos22 = {x=1713, y=1730, z=7, stackpos=1} -- Posiçمo da Pedra 22
getgate22 = getThingfromPos(gatepos22)
gatepos23 = {x=1713, y=1733, z=7, stackpos=1} -- Posiçمo da Pedra 23
getgate23 = getThingfromPos(gatepos23)
gatepos24 = {x=1713, y=1734, z=7, stackpos=1} -- Posiçمo da Pedra 24
getgate24 = getThingfromPos(gatepos24)
Game.createItem(1304, 1, Position(1789, 1704, 7)) -- Posiçمo da pedra inicial
doSummonCreature(monster1, {x=1719, y=1732, z=7}) -- Posiçمo do primeiro gerador vermelho
doSummonCreature(monster2, {x=1791, y=1732, z=7}) -- Posiçمo do primeiro gerador azul
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate11.uid,1)
doRemoveItem(getgate12.uid,1)
doRemoveItem(getgate13.uid,1)
doRemoveItem(getgate14.uid,1)
doRemoveItem(getgate2.uid,1)
doRemoveItem(getgate21.uid,1)
doRemoveItem(getgate22.uid,1)
doRemoveItem(getgate23.uid,1)
doRemoveItem(getgate24.uid,1)
else
broadcastMessage("[DotA] Event did not start because there were not enough players.") -- Msg caso nمo haja jogadores suficiente
Game.createItem(1304, 1, Position(1789, 1704, 7)) -- Posiçمo da pedra inicial
doCreateTeleport(1387, {x=1789, y=1706, z=7}, {x=1802, y=1730, z=7}) -- Teleport de saida time vermelho
doCreateTeleport(1387, {x=1789, y=1706, z=7}, {x=1708, y=1730, z=7}) -- Teleport de saida time azul
end
end
first insert this in your database because you have mysql error missing one of gesior aac tables
Code:
CREATE TABLE IF NOT EXISTS `z_ots_comunication` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `login` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  `action` varchar(255) NOT NULL,
  `param1` varchar(255) NOT NULL,
  `param2` varchar(255) NOT NULL,
  `param3` varchar(255) NOT NULL,
  `param4` varchar(255) NOT NULL,
  `param5` varchar(255) NOT NULL,
  `param6` varchar(255) NOT NULL,
  `param7` varchar(255) NOT NULL,
  `delete_it` int(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=230 ;
in line 6, 0*60*1000 = 0 you can remove the 0 and change 60 with 30 to be 30 * 1000 = 30 second or 1 * 60 * 1000 for 1 min and in line 10; you didn't need >= because after checking the event files you are using i found that the values cannot be = 4 so try it and tell me how its going.
Code:
function onTime()
broadcastMessage("[DotA] Event opens and starts in 5 minutes, teleport opens in center, minimum 4 players for event to start.")
gatepos = {x=1789, y=1704, z=7, stackpos=1} -- Posiçمo da pedra inicial
getgate = getThingfromPos(gatepos)
doRemoveItem(getgate.uid,1)
addEvent(startDota, 1 * 60 * 1000) -- Tempo de espera
end

function startDota()
if Game.getStorageValue(140400) > 4 then -- Minimo de jogadores para o evento iniciar
broadcastMessage("[DotA] Event started and teleport closed, the first team to destroy all three is the winner.") -- Mensagem quando evento inicia
local monster1 = "Gerador Azul I" -- Geradores Iniciais
local monster2 = "Gerador Vermelho I" -- Geradores Iniciais
gatepos = {x=1797, y=1732, z=7, stackpos=1} -- Posiçمo da Pedras 1
getgate = getThingfromPos(gatepos)
gatepos11 = {x=1797, y=1731, z=7, stackpos=1} -- Posiçمo da Pedras 11
getgate11 = getThingfromPos(gatepos11)
gatepos12 = {x=1797, y=1730, z=7, stackpos=1} -- Posiçمo da Pedras 12
getgate12 = getThingfromPos(gatepos12)
gatepos13 = {x=1797, y=1734, z=7, stackpos=1} -- Posiçمo da Pedras 13
getgate13 = getThingfromPos(gatepos13)
gatepos14 = {x=1797, y=1733, z=7, stackpos=1} -- Posiçمo da Pedras 14
getgate14 = getThingfromPos(gatepos14)
gatepos2 = {x=1713, y=1732, z=7, stackpos=1} -- Posiçمo da Pedra 2
getgate2 = getThingfromPos(gatepos2)
gatepos21 = {x=1713, y=1731, z=7, stackpos=1} -- Posiçمo da Pedra 21
getgate21 = getThingfromPos(gatepos21)
gatepos22 = {x=1713, y=1730, z=7, stackpos=1} -- Posiçمo da Pedra 22
getgate22 = getThingfromPos(gatepos22)
gatepos23 = {x=1713, y=1733, z=7, stackpos=1} -- Posiçمo da Pedra 23
getgate23 = getThingfromPos(gatepos23)
gatepos24 = {x=1713, y=1734, z=7, stackpos=1} -- Posiçمo da Pedra 24
getgate24 = getThingfromPos(gatepos24)
Game.createItem(1304, 1, Position(1789, 1704, 7)) -- Posiçمo da pedra inicial
doSummonCreature(monster1, {x=1719, y=1732, z=7}) -- Posiçمo do primeiro gerador vermelho
doSummonCreature(monster2, {x=1791, y=1732, z=7}) -- Posiçمo do primeiro gerador azul
doRemoveItem(getgate.uid,1)
doRemoveItem(getgate11.uid,1)
doRemoveItem(getgate12.uid,1)
doRemoveItem(getgate13.uid,1)
doRemoveItem(getgate14.uid,1)
doRemoveItem(getgate2.uid,1)
doRemoveItem(getgate21.uid,1)
doRemoveItem(getgate22.uid,1)
doRemoveItem(getgate23.uid,1)
doRemoveItem(getgate24.uid,1)
else
broadcastMessage("[DotA] Event did not start because there were not enough players.") -- Msg caso nمo haja jogadores suficiente
Game.createItem(1304, 1, Position(1789, 1704, 7)) -- Posiçمo da pedra inicial
doCreateTeleport(1387, {x=1789, y=1706, z=7}, {x=1802, y=1730, z=7}) -- Teleport de saida time vermelho
doCreateTeleport(1387, {x=1789, y=1706, z=7}, {x=1708, y=1730, z=7}) -- Teleport de saida time azul
end
end
Edit : [ Failed to execute event: Dota] ; you will recieve this error if positions isn't correct
 
thank you for replying i did what you told me but i received this error this time

dota1.png


dotaa.png

have idea?
and about the position i gonna check it right now, i just want to fix this time problem you know
 

Attachments

Back
Top