• 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!

ERROR GLOBALEVENTS DOTA TFS 1.2

jukilo3d

New Member
Joined
May 5, 2011
Messages
16
Reaction score
2
Boa noite Amigos! estou com um probleminha em meu evento dota.

O evento abre a primeira pedra, mas na hora de iniciar ele da esse seguinte error:

errordota.png

alguém pode me ajudar?

meu script é esse:


function onTime()
broadcastMessage("[DotA] Event opens and starts in 5 minutes, teleport opens in center, minimum 4 players for event to start.")
gatepos = {x=597, y=696, 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=521, y=724, z=7, stackpos=1} -- Posiç?o da Pedras 1
getgate = getThingfromPos(gatepos)
gatepos11 = {x=521, y=723, z=7, stackpos=1} -- Posiç?o da Pedras 11
getgate11 = getThingfromPos(gatepos11)
gatepos12 = {x=521, y=722, z=7, stackpos=1} -- Posiç?o da Pedras 12
getgate12 = getThingfromPos(gatepos12)
gatepos13 = {x=521, y=725, z=7, stackpos=1} -- Posiç?o da Pedras 13
getgate13 = getThingfromPos(gatepos13)
gatepos14 = {x=521, y=726, z=7, stackpos=1} -- Posiç?o da Pedras 14
getgate14 = getThingfromPos(gatepos14)
gatepos2 = {x=605, y=724, z=7, stackpos=1} -- Posiç?o da Pedra 2
getgate2 = getThingfromPos(gatepos2)
gatepos21 = {x=605, y=723, z=7, stackpos=1} -- Posiç?o da Pedra 21
getgate21 = getThingfromPos(gatepos21)
gatepos22 = {x=605, y=722, z=7, stackpos=1} -- Posiç?o da Pedra 22
getgate22 = getThingfromPos(gatepos22)
gatepos23 = {x=605, y=725, z=7, stackpos=1} -- Posiç?o da Pedra 23
getgate23 = getThingfromPos(gatepos23)
gatepos24 = {x=605, y=726, z=7, stackpos=1} -- Posiç?o da Pedra 24
getgate24 = getThingfromPos(gatepos24)
Game.createItem(1304, 1, Position(597, 696, 7)) -- Posiç?o da pedra inicial
doSummonCreature(monster1, {x=599, y=724, z=7}) -- Posiç?o do primeiro gerador vermelho
doSummonCreature(monster2, {x=527, y=724, 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(597, 696, 7)) -- Posiç?o da pedra inicial
doCreateTeleport(1387, {x=160, y=54, z=7}, {x=564, y=723, z=7}) -- Teleport de saida time vermelho
doCreateTeleport(1387, {x=160, y=54, z=7}, {x=562, y=723, z=7}) -- Teleport de saida time azul
end
end
 

Azakelis

Advanced OT User
Joined
Feb 17, 2014
Messages
161
Solutions
15
Reaction score
225
hola, dominando,
donde esta rashid?


vamos:

above this:
Lua:
if Game.getStorageValue(140400) > 4 then -- Minimo de jogadores para o evento iniciar

add this:
Lua:
if Game.getStorageValue(140400) == nil or Game.getStorageValue(140400) == -1 then
    Game.setStorageValue(140400, 0)
end
 
OP
OP
J

jukilo3d

New Member
Joined
May 5, 2011
Messages
16
Reaction score
2
hola, dominando,
donde esta rashid?


vamos:

above this:
Lua:
if Game.getStorageValue(140400) > 4 then -- Minimo de jogadores para o evento iniciar

add this:
Lua:
if Game.getStorageValue(140400) == nil or Game.getStorageValue(140400) == -1 then
    Game.setStorageValue(140400, 0)
end


it worked really thank you!

it was just a little problem, he starts the event with any number of players, and I would like to impose limits.
example: does not start if you do not have 4 players.

but even so thank you very much! :D
 
Top