EOSERV Forum > EOSERV > insoms rev
Topic is locked.
Page: << 1 2 ... 6 7 8 9 10 ... 14 15 >>
insoms rev
Author Message
Post #71336 Re: insoms rev
Whitewolf posted: (31st Mar 2011 03:41 am)

People are able to spawn several pets. The item doesn't despawn the pet. It just creates another. :(

Im not sure why it works fine in respects server but that was also lewisrev 189 so items were kinda funny to begin with so just hard code the ids and remove the config like this
          
 if(id == 701)
{

this->player->character->Save();
this->player->character->AddItem(id, 1);
this->player->character->Save();


if(!this->player->character->has_pet)
{

unsigned char index = this->player->character->map->GenerateNPCIndex();
if (index > 250)

{

break;

}

  this->player->character->pet = new NPC(this->player->character->map, 359, this->player->character->x,this->player->character->y, 1, 1, index, true, true);
this->player->character->pet->Spawn();
this->player->character->pet->SetOwner(this->player->character);
this->player->character->has_pet = true;
//this->player->character->AddItem(682, 1);
this->player->character->map->npcs.push_back(this->player->character->pet);
                 this->player->character->CalculateStats();

                this->player->character->StatSkill();
this->player->character->Save();

}

else if(this->player->character->has_pet == true)
{
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->CalculateStats();
                this->player->character->StatSkill();
}
}


14 years, 5 weeks ago
Post #71339 Re: insoms rev

Ok what does the id represent and the 701?

if(id == 701)

And also here.

this->player->character->AddItem(id, 1);

what does the id represent and the 1?

If It's easier can you show me a code of a working rat as a pet? Thanks bud.

14 years, 5 weeks ago
Post #71341 Re: insoms rev
Whitewolf posted: (31st Mar 2011 04:49 am)

Ok what does the id represent and the 701?

if(id == 701)

And also here.

this->player->character->AddItem(id, 1);

what does the id represent and the 1?

If It's easier can you show me a code of a working rat as a pet? Thanks bud.


701 is the item id in the pub
this->player->character->AddItem(id, 1); adds item back after use

This here item 701 will spawn npc 3
 if(id == 701)
{

this->player->character->Save();
this->player->character->AddItem(id, 1);
this->player->character->Save();


if(!this->player->character->has_pet)
{

unsigned char index = this->player->character->map->GenerateNPCIndex();
if (index > 250)

{

break;

}

  this->player->character->pet = new NPC(this->player->character->map, 3, this->player->character->x,this->player->character->y, 1, 1, index, true, true);
this->player->character->pet->Spawn();
this->player->character->pet->SetOwner(this->player->character);
this->player->character->has_pet = true;
this->player->character->map->npcs.push_back(this->player->character->pet);
                 this->player->character->CalculateStats();

                this->player->character->StatSkill();
this->player->character->Save();

}

else if(this->player->character->has_pet == true)
{
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->CalculateStats();
                this->player->character->StatSkill();
}
}



14 years, 5 weeks ago
Post #71342 Re: insoms rev


Have you made a sqlite rev?

14 years, 5 weeks ago
Post #71348 Re: insoms rev

how to compile it? xD

Sorry but im new i want to learn ;)

14 years, 5 weeks ago
Post #71349 Re: insoms rev

Got it working bro thanks alot. Hey one last request for the pet thing. Could you make it to where it reads from the npc.ini what it's supposed to say like Hey character I found item for you! when it picks up stuff and other things like when it attacks? Let me know. Thanks a ton either way. :D

14 years, 5 weeks ago
Post #71352 Re: insoms rev

I'm getting this error. --- 03/31/11 01:55:07 ---

[ERR] Database_OpenFailed: Access denied for user 'root'@'localhost' (using password: NO)


I had a seperate EOserv with a working database before I got this EOserv.

14 years, 5 weeks ago
Post #71354 Re: insoms rev
Soulbanisher posted: (31st Mar 2011 05:57 am)

I'm getting this error. --- 03/31/11 01:55:07 ---

[ERR] Database_OpenFailed: Access denied for user 'root'@'localhost' (using password: NO)


I had a seperate EOserv with a working database before I got this EOserv.


Make sure both settings are the same on config and config.local
14 years, 5 weeks ago
Post #71360 Re: insoms rev
Whitewolf posted: (31st Mar 2011 05:17 am)

Got it working bro thanks alot. Hey one last request for the pet thing. Could you make it to where it reads from the npc.ini what it's supposed to say like Hey character I found item for you! when it picks up stuff and other things like when it attacks? Let me know. Thanks a ton either way.:D

Yes when i finish housing system ill set that up all though I think austinb might have already released something similar. "Let me know Im not 100%"

14 years, 5 weeks ago
Post #71382 Re: insoms rev

Ok, I got the last error fixed (thanks whitewolf :D). Now I'm just having a problem creating a character. The server will crash.


This is in the error log.


[WRN] Configuration file not found: ./data/fish.ini

[ERR] Could not load file: ./data/quests/00008.eqf
[ERR] Could not load file: ./data/quests/00010.eqf
[ERR] Could not load file: ./data/quests/00011.eqf
[ERR] Could not load file: ./data/quests/00012.eqf
[ERR] Could not load file: ./data/quests/00014.eqf
[ERR] Could not load file: ./data/quests/00015.eqf
[ERR] Could not load file: ./data/quests/00016.eqf
[ERR] Could not load file: ./data/quests/00017.eqf
[ERR] Could not load file: ./data/quests/00018.eqf
[ERR] Could not load file: ./data/quests/00019.eqf
[ERR] Could not load file: ./data/quests/00020.eqf
[ERR] Could not load file: ./data/quests/00021.eqf
[ERR] Could not load file: ./data/quests/00024.eqf
[ERR] Could not load file: ./data/quests/00025.eqf
[ERR] EOSERV is dying! Segmentation fault

14 years, 5 weeks ago
Post #71418 Re: insoms rev

Hey. Most of the commands dont work for me when i do these

#setlevel Andrew 100

#warptome Unknown

#warpmeto Unknown

#pstr Andrew 500

theres alot more.

NOTE: Andrew and Unknown are character names.

---
stay tuned.
14 years, 5 weeks ago
Post #71452 Re: insoms rev
Soulbanisher posted: (31st Mar 2011 01:59 pm)

Ok, I got the last error fixed (thanks whitewolf :D). Now I'm just having a problem creating a character. The server will crash.


This is in the error log.


[WRN] Configuration file not found: ./data/fish.ini

[ERR] Could not load file: ./data/quests/00008.eqf
[ERR] Could not load file: ./data/quests/00010.eqf
[ERR] Could not load file: ./data/quests/00011.eqf
[ERR] Could not load file: ./data/quests/00012.eqf
[ERR] Could not load file: ./data/quests/00014.eqf
[ERR] Could not load file: ./data/quests/00015.eqf
[ERR] Could not load file: ./data/quests/00016.eqf
[ERR] Could not load file: ./data/quests/00017.eqf
[ERR] Could not load file: ./data/quests/00018.eqf
[ERR] Could not load file: ./data/quests/00019.eqf
[ERR] Could not load file: ./data/quests/00020.eqf
[ERR] Could not load file: ./data/quests/00021.eqf
[ERR] Could not load file: ./data/quests/00024.eqf
[ERR] Could not load file: ./data/quests/00025.eqf
[ERR] EOSERV is dying! Segmentation fault

Did you install the database using heidiSQL or Sqlyog? A page or so back I wrote a decent guide on how to set up the database. Try that and let me know.

14 years, 5 weeks ago
Post #71461 Re: insoms rev
Whitewolf posted: (31st Mar 2011 05:53 pm)

Soulbanisher posted: (31st Mar 2011 01:59 pm)

Ok, I got the last error fixed (thanks whitewolf :D). Now I'm just having a problem creating a character. The server will crash.


This is in the error log.


[WRN] Configuration file not found: ./data/fish.ini

[ERR] Could not load file: ./data/quests/00008.eqf
[ERR] Could not load file: ./data/quests/00010.eqf
[ERR] Could not load file: ./data/quests/00011.eqf
[ERR] Could not load file: ./data/quests/00012.eqf
[ERR] Could not load file: ./data/quests/00014.eqf
[ERR] Could not load file: ./data/quests/00015.eqf
[ERR] Could not load file: ./data/quests/00016.eqf
[ERR] Could not load file: ./data/quests/00017.eqf
[ERR] Could not load file: ./data/quests/00018.eqf
[ERR] Could not load file: ./data/quests/00019.eqf
[ERR] Could not load file: ./data/quests/00020.eqf
[ERR] Could not load file: ./data/quests/00021.eqf
[ERR] Could not load file: ./data/quests/00024.eqf
[ERR] Could not load file: ./data/quests/00025.eqf
[ERR] EOSERV is dying! Segmentation fault

Did you install the database using heidiSQL or Sqlyog? A page or so back I wrote a decent guide on how to set up the database. Try that and let me know.


I followed the steps, and it's working perfect now :D Ty again.

I just wish he removed all the endless-nights advertisements. But I guess that's just a small price to pay for using his build xD

How do I remove the random server message that says to get endless-nights latest client?
And how do I get a pet? :o
14 years, 5 weeks ago
Post #71471 Re: insoms rev

Ok first go into your Project-->Mingw.cbp open Mingw.cbp.

then go look for the lines
if(id == 701)
{

this->player->character->Save(); //this may be unnessasary
this->player->character->AddItem(id, 1);//adds back the item after it's use
this->player->character->Save();


if(!this->player->character->has_pet)
{

unsigned char index = this->player->character->map->GenerateNPCIndex();
if (index > 250)

{

break;

}

  this->player->character->pet = new NPC(this->player->character->map, 359, this->player->character->x,this->player->character->y, 1,1,index,true, true);
this->player->character->pet->Spawn();
this->player->character->pet->SetOwner(this->player->character);
this->player->character->has_pet = true;
//this->player->character->AddItem(682, 1);
this->player->character->map->npcs.push_back(this->player->character->pet);
this->player->character->str += 5000;
this->player->character->con += 5000;
                 this->player->character->CalculateStats();

                this->player->character->StatSkill();
this->player->character->Save();

}

else if(this->player->character->has_pet == true)
{
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->con -= 5000;
this->player->character->str -= 5000;
                this->player->character->CalculateStats();
                this->player->character->StatSkill();
}
edit the bolded parts:

359 <-- is the npc id you change that for the pet you want to spawn
 701 <-- this is the item id you want ti to spawn from.
for the item type it must be potion. for the npc type it must bhe 3 pet
---
stay tuned.
14 years, 5 weeks ago
Post #71472 Re: insoms rev

There's something wrong with your post andrew. and was that to me? :O

14 years, 5 weeks ago
Page: << 1 2 ... 6 7 8 9 10 ... 14 15 >>
Topic is locked.
EOSERV Forum > EOSERV > insoms rev