• 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 FootBall , automatic. [0.3.6 + 0.4]-Updated-

Please recopy the mod and dont player in anything except the config part ..

Ok, i'm going test this...
Man, when the soccer end, the outfits dont return ? Oo'

-------
edit: How to play with 4 players for team? :X

sorry for my bad english, again ;x
 
Last edited:
60 is seconds - 4 *60 = 240 (4 minutes)


@Damadger - very nice script - using it on tfs 0.3.6pl1. I had a nice soccer field already built but couldn't make it functional because of the scripts...This script is better than I had imagined when I mapped the field. Rep given...

The only issue I have is that after a soccer game - I have to reload mods to get it to reset. Is there some sort of code we could put into the mod that would automatically reload mods when the players end the game?
What reset you talking about ,goals are already reseted when event finished , player reset their storages , and ball back in middle of pitch , so?


@up
Also players can just change their outfits when the event is finished....

if you want to increase players in each team
You will have to edit these locals :
Lua:
Players = 3   -- make it 4
 team1pos = {   -- you will add new pos for the 4th player in both teams team 1 and 2 
destination  =    -- also you will add1 pos for the destination of players , in both teams 1 and 2
 
Last edited:
Hmm, i can't edit this to be played with 4 players per team ? :x

I go edit this adding it on final of soccer:
doRemoveCondition(cid, CONDITION_OUTFIT)

If the player dont have the changed's outfit, his not allowed to use the same, and return to your old outfit :s

(again, sorry for my bad english rs)
 
Dude i didnt add outfits in a condition way, When event is finished players can change there outfit normally

But in a while i will make that players cant change their outfit in event.

Edit : done.
 
Last edited:
if you want to increase players in each team
You will have to edit these locals :
Lua:
Players = 3   -- make it 4
 team1pos = {   -- you will add new pos for the 4th player in both teams team 1 and 2 
destination  =    -- also you will add1 pos for the destination of players , in both teams 1 and 2

I think i explained up ..lol

But anyway here it is..

Open your modfile--> go to the config area:--Will show you down an example to what will you do

1- You will increase the number of the "players" , in your case we will make it 4

2- You will put on 2 extra pos in each of this variable "team1pos" , "destination" --extra pos to team1, and extra position to team 2


So it should be like that(this is the config part only not whole script) :
Code:
      <config name="tutorial_m"><![CDATA[
 c = {
  [COLOR="red"]  players = 4,  -- ****dont change this.***[/COLOR]
 
	 pitchpos = {fromx = 1013, fromy = 1016, tox = 1034, toy = 1022, z = 7},    -- here you need to put the x and y from the farest north west sqm of the pitch, to the farest west east sqm in the pitch(including goal)
 
     ballpos =  {x = 1023, y = 1019, z = 7}, -- default position of ball in middle of pitch
 
     original = 60 , --match time ( it will be devided by 2 for each half)
 
     team1pos = {
                          --Position of #TEAM_1# players standing to pull the lever
                              {x = 1025, y = 1024, z = 7},
                              {x = 1026, y = 1024, z = 7},
                              {x = 1026, y = 1024, z = 7},
                                [COLOR="red"] {x = 1026, y = 1024, z = 7},[/COLOR]
			 --- Position of #TEAM_2# players standing to pull the lever
                              {x = 1023, y = 1024, z = 7},
			      {x = 1022, y = 1024, z = 7},
                              {x = 1026, y = 1024, z = 7},
         [COLOR="red"] {x = 1022, y = 1024, z = 7}[/COLOR]
	                  },
 
	 destination = {
	                    --- team 1 pitch side
                             {x = 1026, y = 1018, z = 7},
	                     {x = 1026, y = 1020, z = 7},
                             {x = 1026, y = 1024, z = 7},
                           [COLOR="#ff8c00"]  {x = 1026, y = 1024, z = 7},[/COLOR]
			    --- team 2 pitch side
	                     {x = 1021, y = 1020, z = 7},
                             {x = 1021, y = 1018, z = 7},
                             {x = 1026, y = 1024, z = 7},
                           [COLOR="#ff8c00"]  {x = 1026, y = 1024, z = 7} [/COLOR]
                      },
 
     storage = 1919,
 
	 BLUE_SCORE = 1223,
 
	 RED_SCORE = 1224,
 
 
	 rewards = true,    -- false if you want to disable rewards
	       rewards_id = {2494, 2472, 2514, 2160} --Player are rewarded randomly
	 }
 
]]></config>
 
You should pass the players a storage value witch shows how many wins/loose they had, and how many goals they had.

This can then later, be developed into a website highscore. <--- Awesome. :D

SQL:
ALTER TABLE players ADD footballwin int(11);
ALTER TABLE players ADD footballloss int(11);
ALTER TABLE players ADD footballgoals int(11);
 
Last edited:
Can you make the site part? Cause It could also count the own goals each player have score in his team :)
 
Hmm, now I know, thanks Damadger *_*'

but I find a bug '-'
If some player logout during the game, his fucking the soccer ;O
The global storage don't return, and the game dont finish o.o'
And not's possible start another game, because have one running, but is not running shit ;-;

I have a idea, put no-logout zone in camp (-.-'), and make a security creaturescript, if the player logout in the camp (server down or... whatever), the player is teleported to your hometown

Again, sorry for my horrible english -.-' i'm br :S
Thanks
 
@up
Thnx.

Fixed. recopy the map every one .... Or just make the pitch a non logout zone :)
 
Can you explain me how i make to return the global storage of the players ?
My soccer game is bugged sniff X_X'
 
return the global storage what are you taking about...... ??
 
yes, the column samples I gave will display each individual players wins, losses and goals he made, not his team.

This way they can form their own teams and mix as much as they want, they can find mates with good scores.

You could make an own OT server, dedicated to your football system. (you make methods where we can insert sql commands) so we can count the scores and get it into a website scoreboard.

2 vocations:
Manager (promoted player)
Player

Only one manager each team.

The manager can seek players, form a team, make a great football team.
The manager can make deals with players, purchase good players, sell bad players.

And the good old freelancer football play, lots of players without any manager plays football, gain scores and will luckily be purshased by a manager later on. D:

If you make it compatible with the sql queries. Someone will definetely make a website highscore for it.
 
see the globals you made and make them to zero, + make your pitch non logout zone, or copy new map

@up

o.0, may be a nice server to make :p
 
In LUA, if you want to get in-game football highscores, you can use this I think:

Lua:
db.getResult("SELECT * FROM blabla SQL query")

And to send the information to SQL database (after winning, loosing, getting a goal)

Lua:
db.executeQuery("UPDATE `players` blablabal sql query")
 
Ye seems i know this stuff. I am just trying to stylize the website page :), thx anyway.
 
Back
Top