Thread: emoticons event
View Single Post
  #3  
Old 06-02-2009, 05:19 PM
zokemon zokemon is offline
That one guy...
zokemon's Avatar
Join Date: Mar 2001
Location: Sonoma County, California
Posts: 2,925
zokemon is a jewel in the roughzokemon is a jewel in the rough
Send a message via ICQ to zokemon Send a message via AIM to zokemon Send a message via MSN to zokemon Send a message via Yahoo to zokemon
Did you do this all serverside or clientside?

emoticonchar I don't think is serverside and if the check was made clientside, there's no need to check anyone else's emoticonchar other then the main player's (player variable) since everyone player will have their own instance of the clientside script running on their own computer (very nature of clientside scripting).

You could just do a simple 0.05 timeout that checks player.emoticonchar against the npcs and it triggeraction's the result to the serverside if emoticonchar isn't either a null value (or whatever the value is when the player has no emoicon) or this.lastemoticon. Make sure to set this.lastemoticon = player.emoticonchar if the check is successful too to avoid spamming the npcserver with emoticons.

The actual selecting of the emoticon should be done serverside (so everyone gets the same emoticon as well as picking who gets kept and who gets kicked (which is convenient since you can only warp players serverside).

Hope this makes sense and helps you.
__________________
Do it with a DON!
Reply With Quote