Forum

> > CS2D > Scripts > Reroute script
Forums overviewCS2D overview Scripts overviewLog in to reply

English Reroute script

20 replies
Page
To the start Previous 1 2 Next To the start

old Reroute script

Marcell
Super User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
city = {}
city[0] = "server0.com:36963"
city[1] = "server1.com:29968"
city[2] = "server2.com:29969"
city[3] = "server3.com:32543"

Areas = {
     {116, 239, 123, 239, "City 1"}
}
addhook("movetile", "HookMoveTile")
function HookMoveTile(id, x, y)
     for k, v in pairs(Areas) do
          if x >= v[1] and y >= v[2] and x <= v[3] and y <= v[4] then
          parse("reroute "..id.." "..server_route[1])
	 end
end
end

What would be wrong?
edited 1×, last 10.02.14 06:55:49 pm

old Re: Reroute script

Yates
Reviewer Off Offline

Quote
You have no id parameter. So.., no.

Also the city table is fucked.

old Re: Reroute script

Marcell
Super User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- Travel System by Salad Fingers --
------------------------------------


city = { 
[0] = "test:36963",
[1] = "test1:36963",
[2] = "test2:36963",
[3] = "test3:36963"
}

v = {
     {116, 239}
}
addhook("movetile", "HookMoveTile")
function HookMoveTile(id, x, y)
     for k, v in pairs(v) do
          if x >= v[1] and y >= v[2] then
          parse("reroute "..id.." "..city[1])
	 end
end
end

Fixed some lines, but still not work

old Re: Reroute script

M0BSTAZ
User Off Offline

Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
------------Server Re-Route--------------
-----------------------------------------
addhook("menu","rer_menu")

---IP's---
server_route = {}
server_route[1] = "Your IP and Port here"
server_route[2] = "Your IP and Port here"
server_route[3] = "Your IP and Port here"
server_route[4] = "Your IP and Port here"
server_route[5] = "Your IP and Port here"

function rer_menu(id, title, button)
if (title=="Clan name here") then -- Menu Name
if button==1 then 
parse("reroute "..id.." "..server_route[1])
end
if button==2 then
parse("reroute "..id.." "..server_route[2])
end
if button==3 then
parse("reroute "..id.." "..server_route[3])
end
if button==4 then
parse("reroute "..id.." "..server_route[3])
end
if button==5 then
parse("reroute "..id.." "..server_route[3])
end
end
end

old Re: Reroute script

AlcatrazZ
BANNED Off Offline

Quote
I haven't tested is but it should be works.
------------------------------------
-- Travel System by Salad Fingers --
-- Support: AlcatrazZ     #131166 --
------------------------------------


city = { 
	[0] = {
		ip = 'test0:36963';
		pos = {116,239}; -- It should be written in tile
	};
	[1] = {
		ip = 'test1:36963';
		pos = {0,0};
	};
	[2] = {
		ip = 'test2:36963';
		pos = {0,0};
	};
	[3] = {
		ip = 'test3:36963';
		pos = {0,0};
	};
}

addhook('movetile','hook_movetile')
function hook_movetile(id,x,y)
	for _, i in pairs(city) do
		if x == i.pos[1] and y == i.pos[2] then
			parse('reroute '..id..' '..i.ip)
		end
	end
end

old Re: Reroute script

AlcatrazZ
BANNED Off Offline

Quote
user Marcell has written
user M0BSTAZ: did you read the post? i want to create "travel system".... not change server via menu....
user AlcatrazZ: haven't got any error, but not works

Are you change 116,239 to tile possition? like 32x32 is 1x1.
Look at map editor

old Re: Reroute script

Marcell
Super User Off Offline

Quote
116,239 is that position, what i wanted to use... and its available on the map, but when i reach it, it wont work

old Re: Reroute script

M0BSTAZ
User Off Offline

Quote
what the? you said Reroute Script not Travel System, so the Subject is Reroute script and i give you a code, and you said not a change server and you want to create a Travel System! flame

@user AlcatrazZ: How big is your map in a map editor? I mean x & y.?

old Re: Reroute script

AlcatrazZ
BANNED Off Offline

Quote
user M0BSTAZ has written
what the? you said Reroute Script not Travel System, so the Subject is Reroute script and i give you a code, and you said not a change server and you want to create a Travel System! flame

Wtf? Command reroute, move player to other server! Wtf travel? It's exacly works.

old Re: Reroute script

Marcell
Super User Off Offline

Quote
are you abnormal?

I pasted lua and it's says travel system... this is not my problem, if you cant read the posts...
anyway if you go to xy tile and its change server its can be travel system...

old Re: Reroute script

AlcatrazZ
BANNED Off Offline

Quote
user Marcell has written
are you abnormal?

I pasted lua and it's says travel system... this is not my problem, if you cant read the posts...
anyway if you go to xy tile and its change server its can be travel system...

user Marcell has written
Reroute script

Go to learn lua! I don't help you f*ck.

@user M0BSTAZ Sry, I thought that you create the post
edited 1×, last 17.02.14 05:15:19 pm

old Re: Reroute script

Marcell
Super User Off Offline

Quote
reroute not means it can't be travel system..
and you should learn lua.. not me..

are you blind? Its a travel system, if somebody reach this point he travels to somewhere(another server)
its may reroute but its travel too...

seriously read and think before you post something shit

1
2
3
4
------------------------------------
 -- Travel System by Salad Fingers --
 -- Support: AlcatrazZ #131166 --
 ------------------------------------

and stop flamming child

old Re: Reroute script

Avo
User Off Offline

Quote
@user AlcatrazZ: It's quite obvious what he wants.

I made it in my way but it doesn't work neither. I guess it's something wrong with reroute command.

Code >

old Re: Reroute script

AlcatrazZ
BANNED Off Offline

Quote
user Avo has written
I made it in my way but it doesn't work neither. I guess it's something wrong with reroute command.

It's not work at own server host . While I was try it at my dedicated server, it's works !
More >

old Re: Reroute script

Avo
User Off Offline

Quote
@user AlcatrazZ: There's no sense to search through whole table. Here faster will be my idea. I mean: with
1
Map[x..","..y]
table keys. Just saying.
To the start Previous 1 2 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview