The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Choosing hue in game
Author Message
tleilax
Journeyman
*

Posts: 56
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jun 2012
Reputation: 0



Post: #1
Choosing hue in game
Is there any variable in which is stored Speech color from client Options-Display settings?

If not, is there anything how to popup this same dialog for speech hue choosing and return the hue color?

I need to implement some basic language system (human/elvish), but I want to have different speech colors for each player. The language system is based on this:
http://wiki.sphere.torfo.org/index.php/L...s_Tutorial

Thanks for any ideas.
12-28-2013 10:23 AM
Find all posts by this user Like Post Quote this message in a reply
Soulless
Super Moderator
****

Posts: 335
Likes Given: 29
Likes Received: 49 in 27 posts
Joined: Jun 2012
Reputation: 12

Ye Olde Sphere

Post: #2
RE: Choosing hue in game
this is pretty interesting, though i dont know the answer of how to detect the players current chosen text color. i would be interested in knowing how
i did find this packet while looking quickly
http://docs.polserver.com/packets/index.php?Packet=0x69
12-30-2013 08:10 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Wap
Journeyman
*

Posts: 138
Likes Given: 6
Likes Received: 7 in 6 posts
Joined: Mar 2012
Reputation: 3

UORPG.net

Post: #3
RE: Choosing hue in game
(12-30-2013 08:10 AM)Soulless Wrote:  this is pretty interesting, though i dont know the answer of how to detect the players current chosen text color. i would be interested in knowing how
i did find this packet while looking quickly
http://docs.polserver.com/packets/index.php?Packet=0x69
General speech packet contains color:
http://docs.polserver.com/packets/index.php?Packet=0xAD

No packets are sent, when color is changed in the game options.
(This post was last modified: 12-30-2013 08:23 AM by Wap.)
12-30-2013 08:16 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
sco
Apprentice
*

Posts: 38
Likes Given: 0
Likes Received: 3 in 1 posts
Joined: Mar 2012
Reputation: 7

Elantharil

Post: #4
RE: Choosing hue in game
You can get the speechcolor in spk_player with:

local.speechcolor = <argn2>

If your player speaks. Try if you can set argn2, perhaps that works as well.
(This post was last modified: 12-30-2013 11:29 AM by sco.)
12-30-2013 11:24 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #5
RE: Choosing hue in game
Set
PHP Code:
PACKET149=f_hue_picker 
in sphere.ini,
And the functions below are necessary for this process.
PHP Code:
[FUNCTION f_hue_picker
// You can practically use this function and adjust it in several ways. 
//This is just how we are taking picked hue from hue picker. For instance, i'm using this analogy for the public chat and 
//I'm able to choose my chat color from hue picker.
VAR.HUE_COLOR=<LOCAL.7><STRSUB 1 0 <LOCAL.8>>
//To see if you want, 
serv.log Color Hue Picked is <var.hue_color>
// If you want to tag the character for insance, just use REF1 = <local.char> and assign a tag to ref1 like ref1.tag.color_picked = <LOCAL.7><STRSUB 1 0 <LOCAL.8>>, something like that. Depends on your choice.
REF1= <local.char>
REF1.tag.color_picked <LOCAL.7><STRSUB 1 0 <LOCAL.8>>
// This seems more proper for the purpose. Anyway , i suppose you will get it.
return 



[FUNCTION HuePicker]
SRC.SENDPACKET 095 D<ARGSW0000 W0FAB 

After setting requirements, if you want to learn hue , use this function. Once you used it, hue picker menu appear and you can select color from menu.
PHP Code:
HuePicker <FINDLAYER.LAYER_HAIR

Why I'm referring layer of hair is nothing but you cannot use sendpacket without referring an object. So that is to say, we are just send a fake packet and by filtering we just get the chosen hue as if we are chosing it for layer of hair.

As a matter of fact, you can learn which hue you've chosen from hue picker by looking at the VAR.HUE_COLOR. This is maybe not you are looking for but with hue dialog you chose a hue for your chat like that.

However, "dialog for speech hue choosing and return the hue color" for this statement, the things that i mentioned about is totally answer to it.
(This post was last modified: 12-30-2013 07:17 PM by Avatar.)
12-30-2013 07:08 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)