| Author | Message | |||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
| Re: heres my pet stuff/attack/spells/stats
insomniac posted: (4th Dec 2010 11:21 pm)
Nevermind, i recoded some things and it works now :D --- Create your own destiny, don't let someone else do it for you.
|
| Re: heres my pet stuff/attack/spells/stats
sorry i got snappy in the last post and that my guide is sloppy,the original pet system was jimmies i still use the pet transfer feature but i think thats it! If you do have jimmies pets you will want to redo the NPC::Act it will conflict with this pet system if you dont have jimmies pet system then also add this in map.cpp in bool Map::Walk(Character *from, Direction direction, bool admin) find from->Warp(warp->map, warp->x, warp->y); and add this on top and bottom from->PetTransfer();
|
| Re: heres my pet stuff/attack/spells/stats
how to change the distance of pet to attack?
|
| Re: heres my pet stuff/attack/spells/stats
Not like ranged as in attacking more than 1 space away right? Cause i think this is what your talking about all the distances are in npc.cpp under NPC::Act the different variables can be seen here look for this part and adjust it to what you want else if (npc->Data()->type == ENF::Aggressive && distance > 1 && distance < 5 && !attacker && npc->alive) //? so if there is an aggressive npc between 2 and 4 distance the pet will do this int xdiff = this->x - npc->x; then if the distance is 1 it will do this if (( npc->Data()->type == ENF::Passive || npc->Data()->type == ENF::Aggressive) && distance < 2 && npc->alive)
|
| Re: heres my pet stuff/attack/spells/stats
I have one error,
|
| Re: heres my pet stuff/attack/spells/stats
Hmmm, i downloaded your compiled rev, and the pet seems to be attacking me after it attacks a monster.?
|
| Re: heres my pet stuff/attack/spells/stats
Very epic dude no error and pet do attack passive and aggressive monster keep it up :] Pet do attack if you have compiled it properly. in npc.hpp replace this NPC(Map *map, short id, unsigned char x, unsigned char y, unsigned char spawn_type, short spawn_time, unsigned char index, bool temporary = false, bool pet = false, Character *owner = 0); with NPC(Map *map, short id, unsigned char x, unsigned char y, unsigned char spawn_type, short spawn_time, unsigned char index, bool temporary = false, bool pet = false, Character *owner = 0); void LoadShopDrop();
|
| Re: heres my pet stuff/attack/spells/stats
all u need now is fishing and harvesting
|
| Re: heres my pet stuff/attack/spells/stats
I now want to rage you but I wont, fishing and harvesting are extremely easy to add.... Thats not what he is missing XD
I fixed my old error, but I "was" getting an error with this int itemid, effectid; said (Effect) wasn't declared and also said effects_config wasnt declared (I fixed that.)
|
| Re: heres my pet stuff/attack/spells/stats
perfect posted: (5th Dec 2010 04:52 pm)hmm it didnt attack me when i tested it but i looked around a little bit anyway and found this if(attacker != this->owner) // don't attack character if it's pet owner looks like i left it out check this out and add in the npc.cpp NPC::ACt so find this and add in if(attacker != this->owner) // don't attack character if it's pet owner xfearlessix you can remove those completely or add ananas wepon effect system doesnt matter either way agent tubs ill post my harvs mining and wood cutting for you ok!
|
| Re: heres my pet stuff/attack/spells/stats
Yeah, I figured it was, I didn't want it to have anything to do with Pet spells, And can pets cast spells? If so, Is there anyway for you to set their spells? I'm just curious XD
I just got an error (Fixed it) I had declared PetOwner in npc.cpp twice, but I also got an error with this void NPC::Pet(NPC *npc) I removed it and I now have 0 errors.
|
| Re: heres my pet stuff/attack/spells/stats
I have the item spells that only can be used when a char has a pet or this i havnt tested this in a while but i think it works fine xifearlessxx did you declare the pet in npc.hpp void Pet(NPC *npc);
|
| Re: heres my pet stuff/attack/spells/stats
I was curious, when you click a Pet does a thing pop saying (Fearless's pet -Bob pet)
|
| Re: heres my pet stuff/attack/spells/stats
xIFearlessIxx posted: (5th Dec 2010 08:42 pm) no box pops up!! I have some more talk commands ill post! I posted some talk commands on the last page near the bottom of the tutorial! edit/just the pet inventory command was posted
| |
