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
|
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
|
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
|
Izzy
Joined: 26th Mar 2011
Posts: 17
Re: insoms rev
Have you made a sqlite rev?
14 years, 5 weeks ago
|
Re: insoms rev
how to compile it? xD
Sorry but im new i want to learn ;)
14 years, 5 weeks ago
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
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
|
Re: insoms rev
There's something wrong with your post andrew. and was that to me? :O
14 years, 5 weeks ago
| | | | | | | | | | | | | | | |