Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Conquer Online 2 > CO2 Private Server
You last visited: Today at 00:40

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Questiob] Team Teleport

Discussion on [Questiob] Team Teleport within the CO2 Private Server forum part of the Conquer Online 2 category.

Reply
 
Old   #1
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
[Questiob] Team Teleport

Hey guys been at this a lil while (Couple of days) I think its just me being stupid and not seeing the complete obvious. Well my question is in the thread title. How do I teleport a team from an NPC?

I have set it up so it checks that the character clicking through the NPC is the team leader and if they are not then it wont teleport just cant get the whole team to teleport to the same place.

btw this is 5165 and MY adaptation of Tanels source using a different packet structure. Layout of NPCs is pretty much the same.

Thanks to anyone who helps with this.
.Beatz is offline  
Old 08/27/2010, 05:35   #2
 
elite*gold: 21
Join Date: Jul 2005
Posts: 9,193
Received Thanks: 5,380
use a foreach loop through the team... rather simple really.


something like

foreach(Character C in GC.MyChar.Team.Members)
{
C.Teleport(x, y, map);
}

or something similar. Don't use lotf so I prob have it wrong. also don't usually use hashtables (eeweee) so I'm used to using keyvaluepair for my for each loops lol
pro4never is offline  
Thanks
2 Users
Old 08/27/2010, 11:09   #3
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Cool

Quote:
Originally Posted by pro4never View Post
use a foreach loop through the team... rather simple really.


something like

foreach(Character C in GC.MyChar.Team.Members)
{
C.Teleport(x, y, map);
}

or something similar. Don't use lotf so I prob have it wrong. also don't usually use hashtables (eeweee) so I'm used to using keyvaluepair for my for each loops lol
Yeah hashtables are by far not the best. I am working on changing the whole way LOTF is layed out and making it MySql based.

Changed some of the packets (thanks to hybrid) just got a few to go and got to try and get the clan packets from somewhere
.Beatz is offline  
Old 08/28/2010, 00:32   #4
 
Arcо's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 8,783
Received Thanks: 5,304
aybe something like...
in Features/Teams.cs
Code:
        public bool Contains(uint uid)
        {
            foreach (Game.Character P in Members)
                if (P.EntityID == uid)
                    return true;
            return false;
        }
Then for the NPC do a foreach check

foreach (Character C in World.H_Char.Values)
{
if (GC.MyChar.MyTeam.Contains(C.EntityID))
{
C.Teleport(coords);
}
}

Not 100% sure it will work, but work a shot.

#####EDIT#####
Forget mine, Chris's will work and its less time consuming than my crappy one.
Arcо is offline  
Thanks
1 User
Old 08/28/2010, 02:05   #5
 
.Beatz's Avatar
 
elite*gold: 0
Join Date: May 2006
Posts: 1,190
Received Thanks: 516
Quote:
Originally Posted by .Arco View Post
aybe something like...
in Features/Teams.cs
Code:
        public bool Contains(uint uid)
        {
            foreach (Game.Character P in Members)
                if (P.EntityID == uid)
                    return true;
            return false;
        }
Then for the NPC do a foreach check

foreach (Character C in World.H_Char.Values)
{
if (GC.MyChar.MyTeam.Contains(C.EntityID))
{
C.Teleport(coords);
}
}

Not 100% sure it will work, but work a shot.

#####EDIT#####
Forget mine, Chris's will work and its less time consuming than my crappy one.
Was gonna say bit late Arco haha lol cheers anyway modified his to work with my source so its all good xD
.Beatz is offline  
Old 08/28/2010, 03:34   #6
 
felipeboladao's Avatar
 
elite*gold: 0
Join Date: Jul 2007
Posts: 255
Received Thanks: 273
foreach (Character C in World.H_Char.Values)
{
if (GC.MyChar.MyTeam.Contains(C.EntityID))
{
if (MyMath.PointDistance(24, 248)) << Dont know
{
C.Teleport(Guild.GuildLeader.X, Guild.GuildLeader.Y, Guild.GuildLeader.Map);
Guild.AutoFollow = True;
}
}

If menbros the team is away, he teleports the menbros the team closer to the guild leader and automatically follow.
felipeboladao is offline  
Reply


Similar Threads Similar Threads
[ENGLISH][GERMAN]NEW AION PRIVAT SERVER-SEARCH TEAM!-SUCHE TEAM!
03/11/2011 - Aion Private Server - 7 Replies
DEUTSCH: Hallo :) .ich habe ein aion privat server .. und suche ne gute developer, also für bewerbung . added mich in msn: [email protected].. aber bitte. ich suche nicht irgend welche leute die nur zum zocken da sind als GM. ich brauche leute, die sich mit designen., php , web designen, html. launcher designe, und mysql php, gut auskennt.... ENGLISH:Hello i have a aion privat server.. and search good developer for my server. for appi. please add me in msn : [email protected] ... i...



All times are GMT +1. The time now is 00:40.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.