Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Sphere.msgs and Umlaut in general?
Author Message
Hustensaft
Apprentice
*

Posts: 24
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2013
Reputation: 0



Post: #1
Sphere.msgs and Umlaut in general?
Hi,

i edited some of the Messages in Sphere.msgs, but i'm not really happy with them. I'd like to edit the "food_full" Messages to moething like "Your satiation is now at <Src.Food>", to make the Messages a little more precise, because i implemented Food, that stuffes quite fast, and Food you can eat all day without getting really stuffed. But I haven't found the right format, to implement Strings or Tags in this Messages, when i try "Your satiation is now at <Src.Food>", the Message will be shown right in that way, not the current Value of <Src.Food>.
Is there a way to read out Strings in these Messages?

Ah, and i'd love to use Umlaute ( Ä, Ö, Ü ), Players can use them, but the Server doesn't. So i have to work with ae, oe und ue, wich looks a little odd in some words.
06-05-2013 01:31 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #2
RE: Sphere.msgs and Umlaut in general?
It's not possible to add tags,etc in the messages of sphere_msgs :\

Anyway, you can use the food/drink typedef for showing the character's food value

PHP Code:
[TYPEDEF t_food]
ON=@Dclick
  src
.sysmessage Your satiation is now at <Src.Food
06-05-2013 01:54 AM
Find all posts by this user Like Post Quote this message in a reply
Shidhun
Journeyman
*

Posts: 59
Likes Given: 5
Likes Received: 3 in 3 posts
Joined: Jul 2012
Reputation: 1



Post: #3
RE: Sphere.msgs and Umlaut in general?
@Hustensaft

Um Umlaute darstellen zu können musst Du eine UTF-8-Formatierung benutzen (Code-Tabellen findest Du dafür per google)

der Syntax wäre dann z.b.

sayua <farbcode>,0,0,deu <text>
sysmessageua <farbcode>,0,0,deu <text>

Quote:Bsp: sayua <tag.name.hue>,0,0,deu Du kannst nichts von einem Händler deines anderen Charakters kaufen

In Dialogen müsstest Du HTMLGUMPS verwenden. Nach der Art hier :

Quote:dhtmlgump 205 245 370 30 0 0 <def.center><def.BFONT>color="#444444"><def.big>Der Händler hat nichts zu verkaufen<def.BFONTE><def.centere>
06-05-2013 03:20 AM
Find all posts by this user Like Post Quote this message in a reply
Hustensaft
Apprentice
*

Posts: 24
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2013
Reputation: 0



Post: #4
RE: Sphere.msgs and Umlaut in general?
Great, works Smile But the SysMessage always shows the old Value of Food, e.g. if a player has 60 Food and eats a Soup (gives +20 Food), the messages ist, that he ist at 60, not at 80. Strange...

@Shidhun
Danke, das würde zumindest Systemmeldungen etwas weniger schwurbelig machen, aber bei Itemnamen oder im Partychat funzt das nicht, da lasse ich lieber überall die Umschreibungen drin, sonst hat man es mal so, mal so, ist ja auch doof
06-05-2013 04:48 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #5
RE: Sphere.msgs and Umlaut in general?
(06-05-2013 04:48 AM)Hustensaft Wrote:  Great, works Smile But the SysMessage always shows the old Value of Food, e.g. if a player has 60 Food and eats a Soup (gives +20 Food), the messages ist, that he ist at 60, not at 80. Strange...

Normally the food increment is stored in the MOREM value of the food item, so you can you do

PHP Code:
[TYPEDEF t_food]
ON=@Dclick
 src
.sysmessage Your satiation is now at <eval <Src.Food> + <morem>> 

If you store it in a tag, just put the tag instead of morem Big Grin.

If you use a plain number, then bad news Tongue
06-05-2013 05:20 AM
Find all posts by this user Like Post Quote this message in a reply
Hustensaft
Apprentice
*

Posts: 24
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2013
Reputation: 0



Post: #6
RE: Sphere.msgs and Umlaut in general?
(06-05-2013 05:20 AM)darksun84 Wrote:  If you use a plain number, then bad news Tongue

Whoops Lol
06-05-2013 05:40 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: Sphere.msgs and Umlaut in general?
ahhh try this !

http://wiki.sphere.torfo.org/index.php/@Hunger

will look like
PHP Code:
[events yourevent//@hunger is a character trigger

ON=@Hunger
sysmessage Your satiation is now at 
<Food
(This post was last modified: 06-05-2013 05:46 AM by darksun84.)
06-05-2013 05:44 AM
Find all posts by this user Like Post Quote this message in a reply
Hustensaft
Apprentice
*

Posts: 24
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2013
Reputation: 0



Post: #8
RE: Sphere.msgs and Umlaut in general?
Ah, but then the Players will get the message every couple of minutes, when the value decreases, won't they?
06-05-2013 06:46 AM
Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 246
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #9
RE: Sphere.msgs and Umlaut in general?
Yep i think Big Grin

But, i looked at it better and :
<food> is the old value of food
<argn1> is the new value of food

So you can do a check like this

PHP Code:
ON=@Hunger
 
if <argn1> > <food>
    
sysmessage Your satiation is now at <Food
endif 

In this way, the message should appears only if the player eat something, because if argn1 is less than <food> that means the player food level is decreasing .
06-05-2013 06:59 AM
Find all posts by this user Like Post Quote this message in a reply
Hustensaft
Apprentice
*

Posts: 24
Likes Given: 0
Likes Received: 0 in 0 posts
Joined: Apr 2013
Reputation: 0



Post: #10
RE: Sphere.msgs and Umlaut in general?
Ah, that's a good idea. I altered my food to use MoreM and

[TYPEDEF t_food]
ON=@Dclick
src.sysmessage Your satiation is now at <eval <Src.Food> + <morem>>

wich works just as i wanted Smile

Edit: but since there are also t_fruit Items that can be eaten, it might be easier, to use darksuns last idea. Should also work with drinks and maybe potions. Again, thanks darksun, you are really a great help for new and/or untalented scripters like me Smile
(This post was last modified: 06-08-2013 11:21 AM by Hustensaft.)
06-06-2013 05:32 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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