Endless-Guide v.2
This forum as just been made please give us time while our staff members work on it we are still lookin for moderators(staffs) please email ''endless-guide@hotmail.com'' for application
Endless-Guide v.2
This forum as just been made please give us time while our staff members work on it we are still lookin for moderators(staffs) please email ''endless-guide@hotmail.com'' for application
Endless-Guide v.2
Would you like to react to this message? Create an account in a few clicks or log in to continue.


The Guide for Endless-Online Players
 
HomeGalleryLatest imagesSearchRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Ruthless Aggression
#dismiss command for pet Icon_minitimeTue Oct 05, 2010 9:21 am by Microchip

» Copycat command
#dismiss command for pet Icon_minitimeTue Oct 05, 2010 9:16 am by Microchip

» #title command
#dismiss command for pet Icon_minitimeFri Sep 03, 2010 5:49 pm by michael032777

» Rev 187 character creation error
#dismiss command for pet Icon_minitimeFri Sep 03, 2010 5:38 pm by michael032777

» Modernwarfare2pwns.no-ip.org
#dismiss command for pet Icon_minitimeTue Aug 24, 2010 4:29 pm by artsyfartsy

» Want Hacks for Endless Online? Join EO-Hackers!
#dismiss command for pet Icon_minitimeFri Aug 06, 2010 7:48 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
#dismiss command for pet Icon_minitimeWed Aug 04, 2010 11:21 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
#dismiss command for pet Icon_minitimeWed Aug 04, 2010 11:21 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
#dismiss command for pet Icon_minitimeWed Aug 04, 2010 11:21 am by Slymask3

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Forum
Affiliates
free forum
 

 

 #dismiss command for pet

Go down 
AuthorMessage
oxyda
Admin
oxyda


Posts : 38
Join date : 2010-03-26

#dismiss command for pet Empty
PostSubject: #dismiss command for pet   #dismiss command for pet Icon_minitimeSun Mar 28, 2010 11:55 am

so then i would make it This->player->character ???
And then it would look like this?

if (message[0] == '#')
{
std::string usercmd;
std::vector<std::string> userar = util::explode(' ', message);
usercmd = userar.front().substr(1);
userar.erase(userar.begin());
std::string command;
std::vector<std::string> arguments = util::explode(' ', message);
command = arguments.front().substr(1);
arguments.erase(arguments.begin());


if (command.length() >= 6 &&command.compare(0,6,"follow") == 0 && this->player->character->has_pet)

{

this->player->character->pet->attack_command =false;

}

else if (command.length() >= 6 &&command.compare(0,6,"attack") == 0 && this->player->character->has_pet)

{

this->player->character->pet->attack_command =true;

}

}

else if (command.length() >= 7 &&command.compare(0,7,"dismiss") == 0 && this->player->character->has_pet)

{

UTIL_PTR_LIST_FOREACH(this->player->character->map->characters, Character, character)

{

if (this->player->character->InRange(*character))

{

this->player->character->pet->RemoveFromView(*character);

}

}

erase_first(this->player->character->map->npcs, this->player->character->pet);

this->player->character->pet->Release();

this->player->character->has_pet = false;

this->player->character->ServerMsg("NPC left!");

}



--Edit-- Ok i fixed that part but i still get this

Compiling: ..\src\handlers\Talk.cpp

C:\Users\Austin\Desktop\Flash drive\trunk\src\handlers\Talk.cpp: In member function 'bool EOClient::Handle_Talk(PacketFamily, PacketAction, PacketReader&, int)':

C:\Users\Austin\Desktop\Flash drive\trunk\src\handlers\Talk.cpp:140: error: 'command' was not declared in this scope

Process terminated with status 1 (0 minutes, 1 seconds)

1 errors, 0 warnings

I get this on the line that #dismiss starts with
Back to top Go down
 
#dismiss command for pet
Back to top 
Page 1 of 1
 Similar topics
-
» #command
» Copycat command
» #heal COMMAND
» #title command
» $promote command

Permissions in this forum:You cannot reply to topics in this forum
Endless-Guide v.2 :: Softwares :: EOSERV-
Jump to: