if( nTok == NUMBER )
{
return FALSE;
}
else if( nTok != NUMBER )
{
//Checking if the player is in Friends List
if( !pUser->m_RTMessenger.GetFriend( idPlayer ) )
{
//Output string to the Tper
pUser->AddDefinedText( TID_TELEPORT_TO_FRIEND );
return FALSE;
}
//Check to see if the Target Player is an Staff Member.
else if( pUserTarget->IsAuthHigher(AUTH_HELPER) )
{
pUser->AddDefinedText( TID_TELEPORT_TO_FRIEND_NOGM );
return FALSE;
}
else
{
if( IsValidObj( pUserTarget ) && IsValidObj( pUser ) )
{
CWorld* pTargetWorld = pUserTarget->GetWorld(); //Target Player
CWorld* pUserWorld = pUser->GetWorld(); //Player that uses the command.
//Check to see if pUserTarget is in Arena // GuildWar
switch( pTargetWorld->GetID() )
{
case WI_WORLD_ARENA:
case WI_WORLD_ARENA_1:
case WI_WORLD_GUILDWAR:
pUser->AddDefinedText( TID_TELEPORT_TO_FRIEND_NOWORLD );
return FALSE;
break;
}
//Check to see if pUser is in Arena//Guildwar
switch( pUserWorld->GetID() )
{
case WI_WORLD_ARENA:
case WI_WORLD_ARENA_1:
case WI_WORLD_GUILDWAR:
pUser->AddDefinedText( TID_TELEPORT_TO_FRIEND_NOWORLD1 );
return FALSE;
break;
}
//Check to see if pUserTarget is in SecretRoom
if( CSecretRoomMng::GetInstance()->IsInTheSecretRoom( pUserTarget ) )
{
pUser->AddDefinedText( TID_TELEPORT_TO_FRIEND_NOWORLD );
return FALSE;
}
//Check to see if pUser is in SecretRoom
else if( CSecretRoomMng::GetInstance()->IsInTheSecretRoom( pUser ) )
{
pUser->AddDefinedText( TID_TELEPORT_TO_FRIEND_NOWORLD1 );
return FALSE;
}
else
{
if( pTargetWorld )
{
if( CInstanceDungeonHelper::GetInstance()->IsInstanceDungeon( pTargetWorld->GetID() ) )
if( pTargetWorld != pUser->GetWorld() || pUser->GetLayer() != pUserTarget->GetLayer() )
return TRUE;
I think its pretty clear what it does.
For those who dont know what it does
Its an simple code that allow players to Teleport to their friends with an Teleport command.
/TeleportToFriend (Name of Friend) or /tptf (Name of Friend)
Have fun.
17-06-15
Tweek
Re: [Small Release] Teleport to Friend
It's work small release but nice idea
17-06-15
xlmansox
Re: [Small Release] Teleport to Friend
for my easy trick change @ Messenger list and change AUTH_ADMINISTRATOR to AUTH_GENERAL for teleport.
18-06-15
raventh1984
Re: [Small Release] Teleport to Friend
With your trick then players have the abbilty to Tp anywhere. Cause that Teleport is for Admins.
I am working now on an improved version with more checks. Example. Your cant TP to an friend if he is in Arena/GuildWar/SecretRoom etc.
- - - Updated - - -
Updated Original Thread.
19-06-15
Fur Zi
Re: [Small Release] Teleport to Friend
Hello Raventh, I have tried other character in other map like dungeon or something then the world crashes.
19-06-15
raventh1984
Re: [Small Release] Teleport to Friend
Thnx i will test it
20-06-15
Ratpack
Re: [Small Release] Teleport to Friend
nice work - thanks for sharing...
i dont test this but what happend when:
when a player is in a dungeon like the The Wilds, Aminus or Colosseum etc and the Friend will teleport to him?
did that work or did you need a check because of the waiting time for the dungeons....
20-06-15
Fur Zi
Re: [Small Release] Teleport to Friend
Quote:
Originally Posted by Ratpack
nice work - thanks for sharing...
i dont test this but what happend when:
when a player is in a dungeon like the The Wilds, Aminus or Colosseum etc and the Friend will teleport to him?
did that work or did you need a check because of the waiting time for the dungeons....
"I have tried other character in other map like dungeon or something then the world crashes."
20-06-15
raventh1984
Re: [Small Release] Teleport to Friend
When i am done cleaning my house i will give it multiple tests
stay tuned
- - - Updated - - -
Tested Severall Dungeons no problems with Teleporting to it.
And about the dungeons that have an time limit on it.