Forum

> > CS2D > Scripts > Reroute script
ForenübersichtCS2D-Übersicht Scripts-ÜbersichtEinloggen, um zu antworten

Englisch Reroute script

20 Antworten
Seite
Zum Anfang Vorherige 1 2 Nächste Zum Anfang

alt Reroute script

Marcell
Super User Off Offline

Zitieren
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?
1× editiert, zuletzt 10.02.14 18:55:49

alt Re: Reroute script

Yates
Reviewer Off Offline

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

Also the city table is fucked.

alt Re: Reroute script

Marcell
Super User Off Offline

Zitieren
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

alt Re: Reroute script

M0BSTAZ
User Off Offline

Zitieren
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

alt Re: Reroute script

AlcatrazZ
BANNED Off Offline

Zitieren
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

alt Re: Reroute script

AlcatrazZ
BANNED Off Offline

Zitieren
user Marcell hat geschrieben
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

alt Re: Reroute script

Marcell
Super User Off Offline

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

alt Re: Reroute script

M0BSTAZ
User Off Offline

Zitieren
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.?

alt Re: Reroute script

AlcatrazZ
BANNED Off Offline

Zitieren
user M0BSTAZ hat geschrieben
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.

alt Re: Reroute script

Marcell
Super User Off Offline

Zitieren
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...

alt Re: Reroute script

AlcatrazZ
BANNED Off Offline

Zitieren
user Marcell hat geschrieben
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 hat geschrieben
Reroute script

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

@user M0BSTAZ Sry, I thought that you create the post
1× editiert, zuletzt 17.02.14 17:15:19

alt Re: Reroute script

Marcell
Super User Off Offline

Zitieren
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

alt Re: Reroute script

Avo
User Off Offline

Zitieren
@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 >

alt Re: Reroute script

AlcatrazZ
BANNED Off Offline

Zitieren
user Avo hat geschrieben
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 !
Mehr >

alt Re: Reroute script

Avo
User Off Offline

Zitieren
@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.
Zum Anfang Vorherige 1 2 Nächste Zum Anfang
Einloggen, um zu antworten Scripts-ÜbersichtCS2D-ÜbersichtForenübersicht