Sphere.msgs and Umlaut in general? - Printable Version +- SphereCommunity (https://forum.spherecommunity.net) +-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d) +--- Forum: General Help (/Forum-General-Help) +--- Thread: Sphere.msgs and Umlaut in general? (/Thread-Sphere-msgs-and-Umlaut-in-general) |
Sphere.msgs and Umlaut in general? - Hustensaft - 06-05-2013 01:31 AM 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. RE: Sphere.msgs and Umlaut in general? - darksun84 - 06-05-2013 01:54 AM 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] RE: Sphere.msgs and Umlaut in general? - Shidhun - 06-05-2013 03:20 AM @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> RE: Sphere.msgs and Umlaut in general? - Hustensaft - 06-05-2013 04:48 AM Great, works 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 RE: Sphere.msgs and Umlaut in general? - darksun84 - 06-05-2013 05:20 AM (06-05-2013 04:48 AM)Hustensaft Wrote: Great, works 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] If you store it in a tag, just put the tag instead of morem . If you use a plain number, then bad news RE: Sphere.msgs and Umlaut in general? - Hustensaft - 06-05-2013 05:40 AM (06-05-2013 05:20 AM)darksun84 Wrote: If you use a plain number, then bad news Whoops RE: Sphere.msgs and Umlaut in general? - darksun84 - 06-05-2013 05:44 AM ahhh try this ! http://wiki.sphere.torfo.org/index.php/@Hunger will look like PHP Code: [events yourevent] //@hunger is a character trigger RE: Sphere.msgs and Umlaut in general? - Hustensaft - 06-05-2013 06:46 AM Ah, but then the Players will get the message every couple of minutes, when the value decreases, won't they? RE: Sphere.msgs and Umlaut in general? - darksun84 - 06-05-2013 06:59 AM Yep i think 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 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 . RE: Sphere.msgs and Umlaut in general? - Hustensaft - 06-06-2013 05:32 AM 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 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 |