Jimmyee

Joined: 13th Mar 2009
Posts: 205
Re: RELEASE: Pet system [tutorial]
Oops, i forgot about one function :D
void NPC::SetOwner(Character *character)
{
this->owner = character;
}
Make declaration for it, etc..
15 years, 11 weeks ago
|
Re: RELEASE: Pet system [tutorial]
Do you have to compile or something after adding all the things? If so how to do that?
15 years, 11 weeks ago
|
Kenyoku
Joined: 17th Oct 2009
Posts: 8
Re: RELEASE: Pet system [tutorial]
Hmm i tried to declare that thing, but i dont get it working.
I tried bool SetOwner() or void SetOwner() (both without "()" too)
I got errors for both. You might tell me where or what i have to declare?
EDIT I FIXED IT MYSELF :D
Fix:
in the npc.hdd
at class NPC public
add:
void SetOwner(Character *character);
Well ty for your help.
15 years, 11 weeks ago
|
Jimmyee

Joined: 13th Mar 2009
Posts: 205
Re: RELEASE: Pet system [tutorial]
All what you need to know is C++ basics ^^
15 years, 11 weeks ago
|
Re: RELEASE: Pet system [tutorial]
Do these pets stand still if the character is idle, or randomly walk around?
15 years, 11 weeks ago
|
Klutz

Joined: 14th Jul 2009
Posts: 1737
Re: RELEASE: Pet system [tutorial]
Thehispanic posted: (22nd Feb 2010 12:41 am)
Do these pets stand still if the character is idle, or randomly walk around?
They have the same persona of normal npc's.
The only thing I don't get is, #attack and #follow don't affect the npc at all. When other npc's attack me, my pet ignores it. Ah well I'll figure it out soon enough.
---
Web developer, currently looking for graphic artists / designers.
15 years, 11 weeks ago
|
Re: RELEASE: Pet system [tutorial]
Nevermind, something was wrong with my compiler. Fixed, and it works great.
15 years, 11 weeks ago
|
batmaso
Joined: 30th Jan 2010
Posts: 21
Re: RELEASE: Pet system [tutorial]
I don't really get how this works.. only admins can have pets? All I do is $sp <id> and it will spawn that npc for me? Sorry if these are stupid questions but I think i'm having trouble with compiling.. I build and it says
-------------- Build: SQLITE in eoserv ---------------
Target is up to date.
Nothing to be done.
No matter what lol. I tried going on my server after this and typing $sp 5 and nothing happend. Is my compiler being stupid or am I just not understanding what to do?
15 years, 11 weeks ago
|
epicnoob

Joined: 19th Feb 2010
Posts: 166
Re: RELEASE: Pet system [tutorial]
Yea i keep getting batmaso´s thing idk if i did it wrong but it would also be nice if some 1 uploaded it compiled ---
Fate-Gaming/Forgotten Memories Owner.
15 years, 10 weeks ago
|
Jimmyee

Joined: 13th Mar 2009
Posts: 205
Re: RELEASE: Pet system [tutorial]
Klutz posted: (22nd Feb 2010 12:49 am)
Thehispanic posted: (22nd Feb 2010 12:41 am)
Do these pets stand still if the character is idle, or randomly walk around?
They have the same persona of normal npc's.
The only thing I don't get is, #attack and #follow don't affect the npc at all. When other npc's attack me, my pet ignores it. Ah well I'll figure it out soon enough.
Because they will attack only players.
15 years, 10 weeks ago
|
Deathx

Joined: 27th Nov 2008
Posts: 521
Re: RELEASE: Pet system [tutorial]
Not bad a little rough though. When i made my pet system the most challenging part i had was getting them to attack other npcs. ^_^ good luck with all the questions you will receive.
---
¨°º¤ø„º°¨ Exile Studios ¨°º„ø¤º°¨
15 years, 10 weeks ago
|
|
Re: RELEASE: Pet system [tutorial]
this compiled on the server my buddy is running, but it seems to only spawn the npc, it won't listen to commands or stay by the player. It also changes maps with you, but it's a little buggy. what's goin' on here. I thought maybe the code was in the wrong spot.. but then how would it have
complied?
ps.. for anyone who hasn't figured it out yet
spawn pet:
$sp (character)(npc#)
example - $sp faded 210
delete pet:
$dp(character)
example - $dp faded
15 years, 10 weeks ago
|
Casoni

Joined: 14th Jul 2009
Posts: 563
Re: RELEASE: Pet system [tutorial]
batmaso posted: (22nd Feb 2010 02:33 am)
I don't really get how this works.. only admins can have pets? All I do is $sp <id> and it will spawn that npc for me? Sorry if these are stupid questions but I think i'm having trouble with compiling.. I build and it says
-------------- Build: SQLITE in eoserv ---------------
Target is up to date.
Nothing to be done.
No matter what lol. I tried going on my server after this and typing $sp 5 and nothing happend. Is my compiler being stupid or am I just not understanding what to do?
your compiler setting are not right then, take a look on the Code::Blocks Forums, this is where I found the fix
15 years, 10 weeks ago
|
batmaso
Joined: 30th Jan 2010
Posts: 21
Re: RELEASE: Pet system [tutorial]
Casoni posted: (24th Feb 2010 12:06 am)
batmaso posted: (22nd Feb 2010 02:33 am)
I don't really get how this works.. only admins can have pets? All I do is $sp <id> and it will spawn that npc for me? Sorry if these are stupid questions but I think i'm having trouble with compiling.. I build and it says
-------------- Build: SQLITE in eoserv ---------------
Target is up to date.
Nothing to be done.
No matter what lol. I tried going on my server after this and typing $sp 5 and nothing happend. Is my compiler being stupid or am I just not understanding what to do?
your compiler setting are not right then, take a look on the Code::Blocks Forums, this is where I found the fix
Hmm.. It was working fine for me before when I was running rev 185 but then I downloaded hispanics 187 build.. you're probably right though so i'll go take a look, thank you.
15 years, 10 weeks ago
|
epicnoob

Joined: 19th Feb 2010
Posts: 166
Re: RELEASE: Pet system [tutorial]
I did everything right and compiled and only got 2 warnings but when i tried to make a char it crashed and got this error
[ERR] EOSERV is dying! Segmentation fault
---
Fate-Gaming/Forgotten Memories Owner.
15 years, 10 weeks ago
| | | | | | | | | | | | | | |