SphereCommunity
spirit speak npcs - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: spirit speak npcs (/Thread-spirit-speak-npcs)



spirit speak npcs - Nachtmusique - 07-18-2012 09:30 PM

I'm wondering if there is a way to make certain ghost type npcs invisible except when spirit speaking. Remember zelda 2 where you needed the cross in order to see the ghosts that were attacking you? Id like to do something like that.


RE: spirit speak npcs - Shaklaban - 07-18-2012 10:48 PM

we got no triggers about drawing of objects or outgoing packet filter so answer is no. you can use object remove packet with @click trigger but it is not a real solution:

[FUNCTION SingleRemoveFromView]
SENDPACKET 01d D<ARGS>

[events e_ghost]
on=@click
if (<src.spiritspeak> <= 80.0)
src.SingleRemoveFromView <uid>
return 1
endif


im using that for couple of scripts but i cannot say its working good, it is possible to see npcs like flicking, also packets received by client.


RE: spirit speak npcs - Shidhun - 07-19-2012 01:54 AM

I once saw an "invisible" npc on a long gone server. They patched a very small animation (in this case it was a dagger) as if it was a character.

The NPC attacked you, but the only thing you could see was the moving dagger.

Perhaps something like this could be a possible solution?
Every time you cast spirit speak, a function changes the body of the npc to a real ghost, insted of the (in my example) moving dagger.

I know that this is not a very good solution, but at least it should work.


RE: spirit speak npcs - Khaos - 07-20-2012 06:53 AM

You don't need to patch anything for a floating dagger Smile. It is an animation file that links to another animation file. It is independent. You can just script the anim ID as a character and you have a floating dagger npc Smile.

Even if they are removed from sight; I think a player can pull their name gump up from the SHOW ALL NAMES. Not sure.

Just do a removefromview on @seenewplayer. use if conditions to make sure it is not in combat with a player who can see it (obviously others would rush to aid hitting the air where that player is as his blood is pouring out) and an if condition for the needed item to see them Big Grin
Well in this case a check for spiritspeak Big Grin