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


The Guide for Endless-Online Players
 
HomeCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Ruthless Aggression
Tue Oct 05, 2010 9:21 am by Microchip

» Copycat command
Tue Oct 05, 2010 9:16 am by Microchip

» #title command
Fri Sep 03, 2010 5:49 pm by michael032777

» Rev 187 character creation error
Fri Sep 03, 2010 5:38 pm by michael032777

» Modernwarfare2pwns.no-ip.org
Tue Aug 24, 2010 4:29 pm by artsyfartsy

» Want Hacks for Endless Online? Join EO-Hackers!
Fri Aug 06, 2010 7:48 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
Wed Aug 04, 2010 11:21 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
Wed Aug 04, 2010 11:21 am by Slymask3

» Want Hacks for Endless Online? Join EO-Hackers!
Wed Aug 04, 2010 11:21 am by Slymask3

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search
Forum
Affiliates
free forum
 

Share | 
 

 #dismiss command for pet

Go down 
AuthorMessage
oxyda
Admin
avatar

Posts : 38
Join date : 2010-03-26

PostSubject: #dismiss command for pet   Sun 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
View user profile
 
#dismiss command for pet
Back to top 
Page 1 of 1
 Similar topics
-
» Old Skewl PCG Texas, the first Phoenix Command Group creation
» AOE_Fan's RMS Command Tutorial
» UCI-Protocol
» Seraphim Class Frigate
» command line chess

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