SphereCommunity
SPEECH for animals and action for NPC - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: SPEECH for animals and action for NPC (/Thread-SPEECH-for-animals-and-action-for-NPC)



SPEECH for animals and action for NPC - Walrim - 01-23-2016 09:44 PM

At first, sorry for my English.

I started to make some nice scripts for animals, like a cat following Players when hungry and the Player having Food in his Backpack.
The new one will be for Dogs, to make them doing something like, bringing back a Stick or going to their doghouse and stay there.

The short Question at first, is it possible to give animals an additional speech, other then spk_pet ( Speech block associated to pets in sphere.ini), without making them say “Thank you” after feeding?

And the the second one. I try to figure out how action for an NPC works.
The first ones are clear, this are the Skills, but I have problems to understand the higher numbers.
Like action 101, making it stay but move again when someone is running against it and action 116 make it stay and keep staying when someone is running against it.
Is there some kind of list with the meaning of these actionnumbers?
And is it possible in these way to get the associated arguments.
Like action 100 themes to by “follow” but I can't figure out which uid is associated with it or where it is saved to hand it over.
Same thing with the location for action 102.
I new for some of these function are other ways to do it in script, but making an animal stay without someone saying “stay” or “stop” is like throwing nails though it's feet.


RE: SPEECH for animals and action for NPC - karma - 01-23-2016 11:24 PM

1) Perhaps in sphere_msgs.scp, you can set npc_pet_food_no and npc_pet_food_ty to "".
2) I didn't know that ACTION meant other than the skill the char is currently using. Anyways, you can try to do them HEAR stay or HEAR stop.


RE: SPEECH for animals and action for NPC - Walrim - 01-24-2016 03:35 AM

Thank you, I will try this way.

As I figured out so far, beside the skills, action has additional functions between 100 and 116.
But some functions I could not identify by trying, and don't know if it is possible to use it with arguments or set the arguments manually.


RE: SPEECH for animals and action for NPC - karma - 02-04-2016 04:04 AM

I found that in the source, give it a look:
Code:
    NPCACT_FOLLOW_TARG = 100,    // 100 = following a char.
    NPCACT_STAY,                // 101
    NPCACT_GOTO,                // 102 = Go to a location x,y. Pet command
    NPCACT_WANDER,                // 103 = Wander aimlessly.
    NPCACT_LOOKING,                // 104 = just look around intently.
    NPCACT_FLEE,                // 105 = Run away from target. m_Act_Targ
    NPCACT_TALK,                // 106 = Talking to my target. m_Act_Targ
    NPCACT_TALK_FOLLOW,            // 107 = m_Act_Targ / m_Fight_Targ.
    NPCACT_GUARD_TARG,            // 108 = Guard a targetted object. m_Act_Targ
    NPCACT_GO_HOME,                // 109 =
    NPCACT_BREATH,                // 110 = Using breath weapon. on m_Fight_Targ.
    NPCACT_RIDDEN,                // 111 = Being ridden or shrunk as figurine.
    NPCACT_THROWING,            // 112 = Throwing a stone at m_Fight_Targ.
    NPCACT_TRAINING,            // 113 = using a training dummy etc.
    NPCACT_Napping,                // 114 = just snoozong a little bit, but not sleeping.
    NPCACT_FOOD,                // 115 = Searching for food
    NPCACT_RUNTO,                // 116 = Run to a location x,y.