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

MoveEvent Three Rounds Tic-Tac-Toc System(Fixed Version + more features)

I tried on TFS 0.3.6, Everything working but it never ends, they dont get tped out :S

Code:
[Error - Action Interface]
In a timer event called from:
data/actions/scripts/tic.lua:onUse
Description:
(luaDoRemoveCreature) Creature not found

Help Please :D?
 
@sweedy i didnt atcually tried on 0.3.6 ,
does the chicken appear ?
 
I'm using TFS 0.3.6pl1 Crying Damson, and it does works.

sweddy, maybe you didn't edit/paste correctly, try checking/pasting again.
 
Only problem I got is that if there is a draw, it doesn't announce it, and players can keep playing until someone wins.
 
What ?! what you mean by draw , if a both reached a dead end the chicken says no one won , and it repeats the same round untill some win this round then it starts next round.
 
I don't liked yout script have alot of inuseful things =z
In your script you used alot of storages and positions when you could have done otherwise easier
So i made one example for help you xD
Look my Tic Tac Toe, note that this is ONLY LUA and you can run in a debbuger =)

I made that in 1 hour of work i dont know if have bugs =P probably not

this is easy to adapt to you system take a look:

Lua:
local gameT = {
		{0,0,0},
		{0,0,0},
		{0,0,0},
	}
function checkTicTacToe(gameT)
local P1 = 1  -- Player 1
local P2 = 2  -- Player 2
local winner = 0 

local count = {
		[P1] = {V={0,0,0},H={0,0,0},D={0,0}},
		[P2] = {V={0,0,0},H={0,0,0},D={0,0}},
	}
 
	for i = 1, 3 do
		for k = 1,3 do
			
			if gameT[i][k] > 0 then -- horizontal
			   count[gameT[i][k]].H[i] = count[gameT[i][k]].H[i] + 1
			   if count[gameT[i][k]].H[i] == 3 then
			      winner = gameT[i][k]
			   end
			end
                
			if gameT[k][i] > 0 then -- vertical
			   count[gameT[k][i]].V[i] = count[gameT[k][i]].V[i] + 1
			   if count[gameT[k][i]].V[i] == 3 then
                                  winner = gameT[k][i]
			   end
			end

			if i == 1 and gameT[k][k] > 0 then -- diagonal  1
			   count[gameT[k][k]].D[1] = count[gameT[k][k]].D[1] + 1
			   if  count[gameT[k][k]].D[1] == 3 then
                  winner = gameT[k][k]
			   end
	     	end
	     	
			if i == 3 and gameT[k][(i-k)+1] > 0 then -- diagonal  2
			   count[gameT[k][(i-k)+1]].D[2] = count[gameT[k][(i-k)+1]].D[2] + 1
			   if  count[gameT[k][(i-k)+1]].D[2] == 3 then
                                   winner = gameT[k][(i-k)+1]
			   end
	     	end
			
		end
	end
	
         print(winner == 0 and "Draw." or "Player:" .. winner .." won the game.")
end	


  checkTicTacToe(gameT)
 
Last edited:
This is just a pure system of no need as i can do things the easy way no need to do it th hard way ,by hard way i dont mean this is a hard scripting , it is just a way of math and thinking, And the whole unuseful things you talking about is really useful in a event game.

What are these stuff?

They are Checks, animations, more better look, more options , in all more advanced in a way that would make it a good to have in a server.
 
I'm not talking about effects and this things.
I only tried to help you showing a other way with bugless and better perfomance to do this script.
If you adepted my script with yours in the end everyone would come out a winner
I'm talking about this part of the script that arent necessary:
Lua:
Phases_Tic_Tac = { 
					-- // Horizontal raws \\--
					{ {x = tic_pos.frompos.x, y = tic_pos.frompos.y, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+1, y = tic_pos.frompos.y, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+2, y = tic_pos.frompos.y, z = tic_pos.frompos.z } }, 
 
					{ {x = tic_pos.frompos.x, y = tic_pos.frompos.y+1, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+1, y = tic_pos.frompos.y+1, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+2, y = tic_pos.frompos.y+1, z = tic_pos.frompos.z } },
 
					{ {x = tic_pos.frompos.x, y = tic_pos.frompos.y+2, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+1, y = tic_pos.frompos.y+2, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+2, y = tic_pos.frompos.y+2, z = tic_pos.frompos.z } },
 
					-- // Vertical raws \\--
					{ {x = tic_pos.frompos.x, y = tic_pos.frompos.y, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x, y = tic_pos.frompos.y+1, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x, y = tic_pos.frompos.y+2, z = tic_pos.frompos.z } },
 
					{ {x = tic_pos.frompos.x+1, y = tic_pos.frompos.y, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+1, y = tic_pos.frompos.y+1, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+1, y = tic_pos.frompos.y+2, z = tic_pos.frompos.z } },
 
					{ {x = tic_pos.frompos.x+2, y = tic_pos.frompos.y, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+2, y = tic_pos.frompos.y+1, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+2, y = tic_pos.frompos.y+2, z = tic_pos.frompos.z } },
 
 
					--// Crosses raws \\--
					{ {x = tic_pos.frompos.x, y = tic_pos.frompos.y, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+1, y = tic_pos.frompos.y+1, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+2, y = tic_pos.frompos.y+2, z = tic_pos.frompos.z } },
 
					{ {x = tic_pos.frompos.x, y = tic_pos.frompos.y+2, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+1, y = tic_pos.frompos.y+1, z = tic_pos.frompos.z } , {x = tic_pos.frompos.x+2, y = tic_pos.frompos.y, z = tic_pos.frompos.z } }
 
This is just a pure system of no need as i can do things the easy way no need to do it th hard way ,by hard way i dont mean this is a hard scripting , it is just a way of math and thinking.

No need as they both perform the same as it is also bugless.
 
Updated, to mod file, more improvements and a new map(recommend download have some portections like pz nonlogout etc).
 
Thank you Bogart:)

Edit: i cant go to 8.60 in map editor. :( i do the right thing :(
 
Last edited:
Back
Top