L2Tower Discord Let's keep the community alive with discord. Discussions about plugins and scripts L2Tower Discord

Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get to teleport
Author Message
xManiac Offline
Expired VIP Member
**

Posts: 47
Joined: Dec 2013
Reputation: 0
Version: 1.4.2.133
Post: #1
How to get to teleport

When character press To Village he can appear in many places in village. How can i make it work in exp script? Shoul i write MoveTo from teleport place to teleport npc for each teleport place?
(This post was last modified: 02-06-2015 01:50 AM by xManiac.)
02-06-2015 01:46 AM
Find all posts by this user Quote this message in a reply
TheQQmaster Offline
Trolling the Trolls
*****

Posts: 1,532
Joined: Jun 2012
Reputation: 642
Version: 1.4.2.133
Post: #2
RE: How to get to teleport

(02-06-2015 01:46 AM)xManiac Wrote:  When character press To Village he can appear in many places in village. How can i make it work in exp script? Shoul i write MoveTo from teleport place to teleport npc for each teleport place?

soe soe soe soe soe while u get all loc Big Grin

PUSH [Image: knUu53] IF HELPED
02-06-2015 02:08 AM
Visit this user's website Find all posts by this user Quote this message in a reply
UgliBiBagli Offline
Expired VIP Member
**

Posts: 175
Joined: Jan 2015
Reputation: 29
Version: 1.4.2.132
Post: #3
RE: How to get to teleport

yeah, you either get every single spawn location and its coordinates or loop soe until you spawn on the one youve set up xd (that might be a lot of soes Big Grin)

or... if you have nice geo on the server you can try to move right to the gk or wherever you need xd
02-06-2015 02:32 AM
Find all posts by this user Quote this message in a reply
Pelukis Offline
MaboX
**

Posts: 50
Joined: Oct 2014
Reputation: 21
Version: 1.4.2.138
Post: #4
RE: How to get to teleport

Record all locations , and look for the easiest place to reach from all spawm locations.

I use this for Godard :

    LUA Programming
function CenterLocation()
	InProgres = true;
	loc = GetMe():GetLocation();
	if loc.Z < -2900 then
		if (loc.X > 148000) then 
			MoveTo(150282, -57248, -2976, moveDistance);
		elseif (loc.X < 146000) then 
			MoveTo(145175, -57242, -2976, moveDistance);
		else
			MoveTo(147713, -58995, -2976, moveDistance);
		end;
	end;
	MoveTo(147860 + (math.random(2)*50) , -55928, -2752, moveDistance);
	GoCenter = true;
	InProgres = false;
	return true;
end;

02-06-2015 02:56 AM
Find all posts by this user Quote this message in a reply
tophersoccer Offline
Expired VIP Member
**

Posts: 422
Joined: Aug 2012
Reputation: 142
Version: 1.4.3.143
Post: #5
RE: How to get to teleport

i brute force it:

    LUA Programming
tp = false
SetPause(true)
moveDistance = 30;
loc1 = FVector( 148293, -58309, -2986) -- confirmed
loc2 = FVector( 147685, -58213, -2986) --confirmed
loc3 = FVector( 146837, -58213, -2786)
loc4 = FVector( 150405, -56757, -2986) -- confirmed
loc5 = FVector( 144501, -55093, -2986) -- confirmed
loc6 = FVector( 147685, -56933, -2786) --confirmed
loc7 = FVector( 144757, -56757, -2986)
loc8 = FVector( 149877, -57429, -2986)
loc9 = FVector( 147669, -56469, -2786)
loc10 = FVector( 145489, -59767, -3064)
loc11 = FVector( 148565, -55909, -2786) --confirmed
loc12 = FVector( 144949, -55397, -2981) --confirmed
 
--same stairs - implementation complete
--------------------------------------------------
loc13 = FVector( 145701, -57701, -2981) --confirmed
loc14 = FVector( 145269, -57685, -2981)
loc15 = FVector( 144965, -56229, -2981) -- confirmed
--------------------------------------------
loc16 = FVector( 150709, -55749, -2981) --confirmed
loc17 = FVector( 147237, -58485, -2981.1042480469) --confirmed
loc18 = FVector( 145397, -56965, -2981)
loc19 = FVector( 146837, -55909, -2781.1049804688) --confirmed
loc20 = FVector( 146373, -56261, -2781) --confirmed
loc21 = FVector( 149093, -56261, -2781) 
loc22 = FVector( 14125, -58069, -2985) 
 
 
repeat
	if GetMe():IsAlikeDeath() then
		break
	end;
Sleep(2000)
	if (GetDistanceVector(GetMe():GetLocation(), loc1) < 300) then
		ShowToClient("GOD", "Loc1",3)
		MoveTo(147725, -58082, -2986, moveDistance);
		MoveTo(147707, -56232, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc2) < 300) then
		ShowToClient("GOD", "Loc2",3)
		MoveTo(147725, -58082, -2986, moveDistance);
		MoveTo(147707, -56232, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc3) < 300) then
		ShowToClient("GOD", "Loc3",3)
		MoveTo(147733, -56124, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc4) < 300) then
		ShowToClient("GOD", "Loc4",3)
		MoveTo(149918, -56878, -2986, moveDistance);
		MoveTo(149181, -56395, -2786, moveDistance);
		MoveTo(147743, -56105, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc5) < 300) then
		ShowToClient("GOD", "Loc5",3)
		MoveTo(145372, -56911, -2986, moveDistance);
		MoveTo(146544, -56256, -2786, moveDistance);
		MoveTo(147733, -56124, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc6) < 300) then
		ShowToClient("GOD", "Loc6",3)
		MoveTo(147733, -56124, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc7) < 300) then
		ShowToClient("GOD", "Loc7",3)
		MoveTo(145320, -57033, -2972, moveDistance);
		MoveTo(146299, -56360, -2786, moveDistance);
		MoveTo(147733, -56124, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc8) < 300) then
		ShowToClient("GOD", "Loc8",3)
		MoveTo(150156, -57101, -2981, moveDistance);
		MoveTo(149592, -56655, -2882, moveDistance);
		MoveTo(149181, -56395, -2786, moveDistance);
		MoveTo(147743, -56105, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc9) < 300) then
		ShowToClient("GOD", "Loc9",3)
		MoveTo(147733, -56124, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc10) < 300) then
		ShowToClient("GOD", "Loc10",3)
		MoveTo(147725, -58082, -2986, moveDistance);
		MoveTo(147707, -56232, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc11) < 300) then
		ShowToClient("GOD", "Loc11",3)
		MoveTo(147733, -56124, -2786, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc12) < 300) then
		ShowToClient("GOD", "Loc12",3)
		MoveTo(144985, -56759, -2981, moveDistance);
		MoveTo(145597, -56833, -2978, moveDistance);
		MoveTo(146580, -56174, -2781, moveDistance);
		MoveTo(147493, -56227, -2781, moveDistance);
		Sleep(1000)
		tp = true;
		------------------------------------------------------------new
	elseif (GetDistanceVector(GetMe():GetLocation(), loc13) < 300) then
		ShowToClient("GOD", "Loc13",3)
		MoveTo(144871.515625, -57275.796875, -2981.1042480469, moveDistance);
		MoveTo(146180.671875, -56427.19140625, -2781.1547851563, moveDistance);
		MoveTo(146750.046875, -56126.01953125, -2781.1547851563, moveDistance);
		MoveTo(147687.09375, -56296.65234375, -2781.1547851563, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc14) < 300) then
		ShowToClient("GOD", "Loc14",3)
		MoveTo(144871.515625, -57275.796875, -2981.1042480469, moveDistance);
		MoveTo(146180.671875, -56427.19140625, -2781.1547851563, moveDistance);
		MoveTo(146750.046875, -56126.01953125, -2781.1547851563, moveDistance);
		MoveTo(147687.09375, -56296.65234375, -2781.1547851563, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc15) < 300) then
		ShowToClient("GOD", "Loc15",3)
		MoveTo(144871.515625, -57275.796875, -2981.1042480469, moveDistance);
		MoveTo(146180.671875, -56427.19140625, -2781.1547851563, moveDistance);
		MoveTo(146750.046875, -56126.01953125, -2781.1547851563, moveDistance);
		MoveTo(147687.09375, -56296.65234375, -2781.1547851563, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc16) < 300) then
		ShowToClient("GOD", "Loc16",3)
		MoveTo(150163.046875,	-57022.125,	-2972.5, moveDistance);
		MoveTo(148698.96875, -56127.5859375, -2781.1547851563, moveDistance);
		MoveTo(147765.984375, -56316.67578125, -2781.1547851563, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc17) < 300) then
		ShowToClient("GOD", "Loc17",3)
		MoveTo(147685.3125, -58350.62890625, -2985.4040527344, moveDistance);
		MoveTo(147723.125, -56716.25390625, -2785.4548339844, moveDistance);
		Sleep(1000)
		tp = true;
elseif (GetDistanceVector(GetMe():GetLocation(), loc18) < 300) then
		ShowToClient("GOD", "Loc18",3)
		MoveTo(146738.109375, -56061.83984375, -2781.1547851563, moveDistance);
		MoveTo(147581.96875, -56201.06640625, -2781.1547851563, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc19) < 300) then
		ShowToClient("GOD", "Loc19",3)
		MoveTo(147660.546875, -56174.9296875, -2781.1049804688, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc20) < 300) then
		ShowToClient("GOD", "Loc20",3)
		MoveTo(147727.4375, -56251.78125, -2781.1049804688, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc21) < 300) then
		ShowToClient("GOD", "Loc21",3)
		MoveTo(147727.4375, -56251.78125, -2781.1049804688, moveDistance);
		Sleep(1000)
		tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc22) < 300) then
		ShowToClient("GOD", "Loc22",3)
		MoveTo(147706.921875, -58276.79296875, -2985.4040527344, moveDistance);
		MoveTo(147740.859375, -56384.6015625, -2785.4548339844, moveDistance);
		Sleep(1000)
		tp = true;
	else UseItem(736);
		ShowToClient("GOD", "No match, SOE",3)
		Sleep(30*1000);
	end
until tp == true

02-06-2015 05:53 AM
Find all posts by this user Quote this message in a reply
 Reputed by : xManiac(+2)
capucine Offline
Expired VIP Member
**

Posts: 1,083
Joined: Jan 2013
Reputation: 208
Version: 1.4.2.142
Post: #6
RE: How to get to teleport

Tested many times and working fine, except some spawn locations are not in the script... So it soes again until it gets to a spawn known in the script...

(02-06-2015 05:53 AM)tophersoccer Wrote:  i brute force it:

    LUA Programming
tp = false
SetPause(true)
moveDistance = 30;
loc1 = FVector( 148293, -58309, -2986) -- confirmed
loc2 = FVector( 147685, -58213, -2986) --confirmed
loc3 = FVector( 146837, -58213, -2786)
loc4 = FVector( 150405, -56757, -2986) -- confirmed
loc5 = FVector( 144501, -55093, -2986) -- confirmed
loc6 = FVector( 147685, -56933, -2786) --confirmed
loc7 = FVector( 144757, -56757, -2986)
loc8 = FVector( 149877, -57429, -2986)
loc9 = FVector( 147669, -56469, -2786)
loc10 = FVector( 145489, -59767, -3064)
loc11 = FVector( 148565, -55909, -2786) --confirmed
loc12 = FVector( 144949, -55397, -2981) --confirmed
 
--same stairs - implementation complete
--------------------------------------------------
loc13 = FVector( 145701, -57701, -2981) --confirmed
loc14 = FVector( 145269, -57685, -2981)
loc15 = FVector( 144965, -56229, -2981) -- confirmed
--------------------------------------------
loc16 = FVector( 150709, -55749, -2981) --confirmed
loc17 = FVector( 147237, -58485, -2981.1042480469) --confirmed
loc18 = FVector( 145397, -56965, -2981)
loc19 = FVector( 146837, -55909, -2781.1049804688) --confirmed
loc20 = FVector( 146373, -56261, -2781) --confirmed
loc21 = FVector( 149093, -56261, -2781) 
loc22 = FVector( 14125, -58069, -2985) 
 
 
repeat
	if GetMe():IsAlikeDeath() then
 break
	end;
Sleep(2000)
	if (GetDistanceVector(GetMe():GetLocation(), loc1) < 300) then
 ShowToClient("GOD", "Loc1",3)
 MoveTo(147725, -58082, -2986, moveDistance);
 MoveTo(147707, -56232, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc2) < 300) then
 ShowToClient("GOD", "Loc2",3)
 MoveTo(147725, -58082, -2986, moveDistance);
 MoveTo(147707, -56232, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc3) < 300) then
 ShowToClient("GOD", "Loc3",3)
 MoveTo(147733, -56124, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc4) < 300) then
 ShowToClient("GOD", "Loc4",3)
 MoveTo(149918, -56878, -2986, moveDistance);
 MoveTo(149181, -56395, -2786, moveDistance);
 MoveTo(147743, -56105, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc5) < 300) then
 ShowToClient("GOD", "Loc5",3)
 MoveTo(145372, -56911, -2986, moveDistance);
 MoveTo(146544, -56256, -2786, moveDistance);
 MoveTo(147733, -56124, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc6) < 300) then
 ShowToClient("GOD", "Loc6",3)
 MoveTo(147733, -56124, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc7) < 300) then
 ShowToClient("GOD", "Loc7",3)
 MoveTo(145320, -57033, -2972, moveDistance);
 MoveTo(146299, -56360, -2786, moveDistance);
 MoveTo(147733, -56124, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc8) < 300) then
 ShowToClient("GOD", "Loc8",3)
 MoveTo(150156, -57101, -2981, moveDistance);
 MoveTo(149592, -56655, -2882, moveDistance);
 MoveTo(149181, -56395, -2786, moveDistance);
 MoveTo(147743, -56105, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc9) < 300) then
 ShowToClient("GOD", "Loc9",3)
 MoveTo(147733, -56124, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc10) < 300) then
 ShowToClient("GOD", "Loc10",3)
 MoveTo(147725, -58082, -2986, moveDistance);
 MoveTo(147707, -56232, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc11) < 300) then
 ShowToClient("GOD", "Loc11",3)
 MoveTo(147733, -56124, -2786, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc12) < 300) then
 ShowToClient("GOD", "Loc12",3)
 MoveTo(144985, -56759, -2981, moveDistance);
 MoveTo(145597, -56833, -2978, moveDistance);
 MoveTo(146580, -56174, -2781, moveDistance);
 MoveTo(147493, -56227, -2781, moveDistance);
 Sleep(1000)
 tp = true;
 ------------------------------------------------------------new
	elseif (GetDistanceVector(GetMe():GetLocation(), loc13) < 300) then
 ShowToClient("GOD", "Loc13",3)
 MoveTo(144871.515625, -57275.796875, -2981.1042480469, moveDistance);
 MoveTo(146180.671875, -56427.19140625, -2781.1547851563, moveDistance);
 MoveTo(146750.046875, -56126.01953125, -2781.1547851563, moveDistance);
 MoveTo(147687.09375, -56296.65234375, -2781.1547851563, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc14) < 300) then
 ShowToClient("GOD", "Loc14",3)
 MoveTo(144871.515625, -57275.796875, -2981.1042480469, moveDistance);
 MoveTo(146180.671875, -56427.19140625, -2781.1547851563, moveDistance);
 MoveTo(146750.046875, -56126.01953125, -2781.1547851563, moveDistance);
 MoveTo(147687.09375, -56296.65234375, -2781.1547851563, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc15) < 300) then
 ShowToClient("GOD", "Loc15",3)
 MoveTo(144871.515625, -57275.796875, -2981.1042480469, moveDistance);
 MoveTo(146180.671875, -56427.19140625, -2781.1547851563, moveDistance);
 MoveTo(146750.046875, -56126.01953125, -2781.1547851563, moveDistance);
 MoveTo(147687.09375, -56296.65234375, -2781.1547851563, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc16) < 300) then
 ShowToClient("GOD", "Loc16",3)
 MoveTo(150163.046875,	-57022.125,	-2972.5, moveDistance);
 MoveTo(148698.96875, -56127.5859375, -2781.1547851563, moveDistance);
 MoveTo(147765.984375, -56316.67578125, -2781.1547851563, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc17) < 300) then
 ShowToClient("GOD", "Loc17",3)
 MoveTo(147685.3125, -58350.62890625, -2985.4040527344, moveDistance);
 MoveTo(147723.125, -56716.25390625, -2785.4548339844, moveDistance);
 Sleep(1000)
 tp = true;
elseif (GetDistanceVector(GetMe():GetLocation(), loc18) < 300) then
 ShowToClient("GOD", "Loc18",3)
 MoveTo(146738.109375, -56061.83984375, -2781.1547851563, moveDistance);
 MoveTo(147581.96875, -56201.06640625, -2781.1547851563, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc19) < 300) then
 ShowToClient("GOD", "Loc19",3)
 MoveTo(147660.546875, -56174.9296875, -2781.1049804688, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc20) < 300) then
 ShowToClient("GOD", "Loc20",3)
 MoveTo(147727.4375, -56251.78125, -2781.1049804688, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc21) < 300) then
 ShowToClient("GOD", "Loc21",3)
 MoveTo(147727.4375, -56251.78125, -2781.1049804688, moveDistance);
 Sleep(1000)
 tp = true;
	elseif (GetDistanceVector(GetMe():GetLocation(), loc22) < 300) then
 ShowToClient("GOD", "Loc22",3)
 MoveTo(147706.921875, -58276.79296875, -2985.4040527344, moveDistance);
 MoveTo(147740.859375, -56384.6015625, -2785.4548339844, moveDistance);
 Sleep(1000)
 tp = true;
	else UseItem(736);
 ShowToClient("GOD", "No match, SOE",3)
 Sleep(30*1000);
	end
until tp == true

02-06-2015 17:09 PM
Find all posts by this user Quote this message in a reply
 Reputed by : xManiac(+2)
xManiac Offline
Expired VIP Member
**

Posts: 47
Joined: Dec 2013
Reputation: 0
Version: 1.4.2.133
Post: #7
RE: How to get to teleport

Its good but takes a lot of time against real person.
02-06-2015 17:17 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
Photo Problem with teleport cuongbeo88 0 1,976 08-11-2014 10:03 AM
Last Post: cuongbeo88
  teleport for script changing vito54 1 2,413 08-06-2014 16:21 PM
Last Post: tophersoccer
  Massive Teleport to town from Gm in Naia. zooms 161 63,792 06-16-2014 21:49 PM
Last Post: NaoJogoMais
  Problem with teleport Champagne275 0 2,006 03-13-2014 10:46 AM
Last Post: Champagne275
  [HELP] Autofarm teleport marianolibertad 3 6,237 03-11-2014 03:24 AM
Last Post: knutoz
  Don't do teleport toweris 0 1,935 04-07-2013 18:21 PM
Last Post: toweris



User(s) browsing this thread: 1 Guest(s)