teleport anoying problem

Forum for any discussion not Dawn of Light related

Moderator: Support Team

teleport anoying problem

Postby lion228 » Fri Jun 26, 2015 2:00 am

how do i make it teleport two times, when i teleport once it teleports me to a blank zone 0
then it removeobject =player, when i teleport command again it gose correct zone like in pictures
the code is bellow but what code do i add to make it teleport twice with a waiting period till it shows the removeobject on console screen then teleport 2nd time ?




static public List<GmCommandHandler> BaseCommand = new List<GmCommandHandler>()
{
new GmCommandHandler("info",Info, null, 1, 0, "Info of selected target"),
new GmCommandHandler("invinsible",Invinsible, null, 1, 0, "Set target invinsible"),
new GmCommandHandler("save",Save, null, 1, 0, "Save target"),
new GmCommandHandler("gps",Gps, null, 1, 0, "Print your position"),
new GmCommandHandler("kill",Kill, null, 1, 0, "Kill target"),
new GmCommandHandler("revive",Revive, null, 1, 0, "Rez target Unit"),
new GmCommandHandler("teleport",null, TeleportCommands, 1, 0, "Teleport commands"),
new GmCommandHandler("gmmode",GmMode, null, 1, 0, "Set Invisible / Invinsible"),




Code: Select all
#region Teleport static public bool TeleportMap(Player Plr, ref List<string> Values) { int ZoneID = GetInt(ref Values); int WorldX = GetInt(ref Values); int WorldY = GetInt(ref Values); int WorldZ = GetInt(ref Values); Plr.Teleport((UInt16)ZoneID, (uint)WorldX, (uint)WorldY, (UInt16)WorldZ, 0); GMCommandLog Log = new GMCommandLog(); Log.PlayerName = Plr.Name; Log.AccountId = (uint)Plr.Client._Account.AccountId; Log.Command = "TELEPORT TO " + ZoneID + " " + WorldX + " " + WorldY; Log.Date = DateTime.Now; WorldMgr.Database.AddObject(Log); return true; } static public bool TeleportAppear(Player Plr, ref List<string> Values) { string PlayerName = GetString(ref Values); Player Target = Player.GetPlayer(PlayerName); if (Target == null) { Plr.SendMessage(0, "Server", "Player not found :" + PlayerName, SystemData.ChatLogFilters.CHATLOGFILTERS_SHOUT); return false; } if (Target.Zone == null) return false; Plr.Teleport(Target.Zone, (uint)Target.WorldPosition.X, (uint)Target.WorldPosition.Y, (UInt16)Target.WorldPosition.Z, 0); GMCommandLog Log = new GMCommandLog(); Log.PlayerName = Plr.Name; Log.AccountId = (uint)Plr.Client._Account.AccountId; Log.Command = "APPEAR PLAYER " + Target.Name + " TO " + Target.Zone.ZoneId + " " + Target._Value.WorldX + " " + Target._Value.WorldY; Log.Date = DateTime.Now; WorldMgr.Database.AddObject(Log); return true; } static public bool TeleportSummon(Player Plr, ref List<string> Values) { string PlayerName = GetString(ref Values); Player Target = Player.GetPlayer(PlayerName); if (Target == null) { Plr.SendMessage(0, "Server", "Player not found :" + PlayerName, SystemData.ChatLogFilters.CHATLOGFILTERS_SHOUT); return false; } Target.Teleport(Plr.Zone, (uint)Plr.WorldPosition.X, (uint)Plr.WorldPosition.Y, (UInt16)Plr.WorldPosition.Z, 0); GMCommandLog Log = new GMCommandLog(); Log.PlayerName = Plr.Name; Log.AccountId = (uint)Plr.Client._Account.AccountId; Log.Command = "SUMMON PLAYER " + Target.Name + " TO " + Plr.Zone.ZoneId + " " + Plr._Value.WorldX + " " + Plr._Value.WorldY; Log.Date = DateTime.Now; WorldMgr.Database.AddObject(Log); return true;
48e5e670baafbf026ab57fa1e9d76040.png
console teleport output
48e5e670baafbf026ab57fa1e9d76040.png (12.54 KiB) Viewed 3434 times
f516270a337991590c6a8779f807f3b6.png
zone 0
f516270a337991590c6a8779f807f3b6.png (52.3 KiB) Viewed 3434 times
Attachments
558f3e09288798132e9e8ecf7fef528b.png
gone to correct zone
558f3e09288798132e9e8ecf7fef528b.png (676.43 KiB) Viewed 3434 times
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: teleport anoying problem

Postby Graveen » Thu Jul 02, 2015 10:48 pm

i guess Target.teleport().
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: teleport anoying problem

Postby lion228 » Fri Jul 03, 2015 11:17 am

i added it 2 times but its just teleporting once


static public bool TeleportSummon(Player Plr, ref List<string> Values)
{
string PlayerName = GetString(ref Values);

Player Target = Player.GetPlayer(PlayerName);

if (Target == null)
{
Plr.SendMessage(0, "Server", "Player not found :" + PlayerName, SystemData.ChatLogFilters.CHATLOGFILTERS_SHOUT);
return false;
}

Target.Teleport(Plr.Zone, (uint)Plr.WorldPosition.X, (uint)Plr.WorldPosition.Y, (UInt16)Plr.WorldPosition.Z, 0);



Target.Teleport(Plr.Zone, (uint)Plr.WorldPosition.X, (uint)Plr.WorldPosition.Y, (UInt16)Plr.WorldPosition.Z, 0);

GMCommandLog Log = new GMCommandLog();
Log.PlayerName = Plr.Name;
Log.AccountId = (uint)Plr.Client._Account.AccountId;
Log.Command = "SUMMON PLAYER " + Target.Name + " TO " + Plr.Zone.ZoneId + " " + Plr._Value.WorldX + " " + Plr._Value.WorldY;
Log.Date = DateTime.Now;
WorldMgr.Database.AddObject(Log);

return true;
}
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: teleport anoying problem

Postby Argo » Sat Jul 04, 2015 12:16 pm

this doesn't look like daoc. what is it?
Möge Gott sein zwischen Dir und dem Leid, an allen dunklen und verlassenen Orten, die Du erreichen wirst.
Argo
Server Team
 
Posts: 1760
Joined: Thu Sep 18, 2008 6:21 pm
Location: Berlin, Germany

Re: teleport anoying problem

Postby lion228 » Sat Jul 04, 2015 3:15 pm

i know thats why i was told to put it in here what code i put to make it teleport 2 times ?
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: teleport anoying problem

Postby Graveen » Sun Jul 05, 2015 8:58 am

You can't teleport to the same location : it 'll have no effect. You msut change the parameters of target.Teleport()

Basically 2 consecutives teleports are useless: you can only notice them if you have a loading screen between zones.
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: teleport anoying problem

Postby lion228 » Sun Jul 05, 2015 3:24 pm

do you have a example ? not sure what you meain with You msut change the parameters of target.Teleport()
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: teleport anoying problem

Postby Graveen » Sun Jul 05, 2015 7:25 pm

Plr.Zone, (uint)Plr.WorldPosition.X, (uint)Plr.WorldPosition.Y, (UInt16)Plr.WorldPosition.Z

Plr.Zone = zone id
Plr.WorldPosition.X = X coord in this zone
also for Y and Z

So to port to a defined position, ie Zone 2, X 1000 Y 2000 Z 500:
Target.Teleport(2, 1000, 2000, 500, 0);
Image
* pm me to contribute in Dawn of Light: code, database *
User avatar
Graveen
Project Leader
 
Posts: 12660
Joined: Fri Oct 19, 2007 9:22 pm
Location: France

Re: teleport anoying problem

Postby lion228 » Tue Jul 07, 2015 5:53 am

thanks for helping but wont that need to be changed and then build each time i want to teleport to diffrent area ? it dose use a table for zone taxis .the problem is i click on a flight master npc and it opens a map then i click on a zone in the map i want to go to then it suppost to fly me there on first go it dont and gose to zone0 then i have to use a gm teleport command in the chat box to teleport to the place i selected this is the error im trying to understand and fix
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am

Re: teleport anoying problem

Postby lion228 » Tue Jul 28, 2015 3:12 pm

bump
lion228
DOL Acolyte
 
Posts: 103
Joined: Sat Oct 03, 2009 12:01 am


Return to “%s” Other Discussion

Who is online

Users browsing this forum: No registered users and 1 guest