|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Fri Nov 25, 2011 9:05 pm
not sure if a bug, or if i just missed something in my code |
in the below picture i tried to change the font of the corner part of my border i used a function groupborder to try to get just the first item all group border has is <font webdings>%1</font>, below the picture is the code im using, i think i have everything correct, just want to make sure i did not miss anything though =/
Code: |
<trigger type="GMCP" id="281">
<pattern>group*</pattern>
<value><![CDATA[#local $local
$local=%gmcp.group.members
$grpnme=%gmcp.group.groupname
$grpcnt=%gmcp.group.count
$grpsta=%gmcp.group.status
$grpkil=%gmcp.group.kills
$grpexp=%gmcp.group.exp
#clr groupinfo
#execwin groupinfo {#print "<color white>"@groupborder("!")%repeat( "-", 69)"<font webdings>!</font></color>"}
$format = %concat( "<color white>|</color><color cyan>Group name: </color>", "<color red>&s</color>", %repeat( " ", (26-%len( %stripansi( $grpnme)))), "<color cyan>Group count: </color>", "<color red>&s</color>", %repeat( " ", (18-%len( $grpcnt))), "<color white>|</color>")
#execwin groupinfo {#print %format( $format, $grpnme, $grpcnt)}
$format = %concat( "<color white>|</color><color teal>Group Status: </color>", "<color red>&s</color>", %repeat( " ", (8-%len( $grpsta))), "<color teal>Kills: </color>", "<color red>&s</color>", %repeat( " ", (6-%len( $grpkil))), "<color teal>Exp: </color>", "<color red>&s</color>", %repeat( " ", (29-%len( $grpexp))), "<color white>|</color>")
#execwin groupinfo {#print %format( $format, $grpsta, $grpkil, $grpexp)}
#execwin groupinfo {
$format=%concat( "<color white>|</color>"%repeat(".", 69)"<color white>|</color>")
#print %trim( $format)
}
#forall $local {
#call %match( %i, "name=(%w)|info=*hp=(%d)|mhp=(%d)|mn=(%d)|mmn=(%d)|mv=(%d)|mmv=(%d)|align=(%n)|tnl=(%d)|qt=(%d)|qs=(%d)|lvl=(%d)", $name, $hp, $mhp, $mn, $mmn, $mv, $mmv, $align, $tnl, $qt, $qs, $lvl)
$format = %concat( "<color white>|</color><color teal>&s", %repeat( " ", (12-%len( name))), " HP:</color><color red>", %repeat( " ", (5-%len( $hp))), "&s</color>", "<color cyan>/</color><color blue>", %repeat( " ", (5-%len( $mhp))), "&s</color>", "<color cyan> MN:</color><color red>", %repeat( " ", (5-%len( $mn))), "&s</color>", "<color cyan>/</color><color blue>", %repeat( " ", (5-%len( $mmn))), "&s</color>", "<color cyan> MV:</color><color red>", %repeat( " ", (5-%len( $mv))), "&s</color>", "<color cyan>/</color><color blue>", %repeat( " ", (5-%len( $mmv))), "&s</color>", "<color teal> Align:</color><color red>", %repeat( " ", (4-%len( $align))), "&s</color><color white>|</color>")
#execwin groupinfo {#print %format( $format, $name, $hp, $mhp, $mn, $mmn, $mv, $mmv, $align)}
}
#execwin groupinfo {
$format = %concat( "<color white>+", %repeat( "-", 69)"+</color>")
#print %trim( $format)
}]]></value>
</trigger>
|
[/img] |
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Fri Nov 25, 2011 9:38 pm |
Well, first off you don't need to do #execwin/#print since you're very unlikely to be triggering on these lines OR triggering on something similar in style. Anything with the word "exec" in it is going to be fairly slow.
As for the font tag, each font seems to have a default value of its own, and CMud's respecting this. You will need to play with the size property, but no guarantees that you will be able to get everything looking right. |
|
_________________ EDIT: I didn't like my old signature |
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Fri Nov 25, 2011 9:42 pm |
i dont want the whole top row as symbols though i wanted it to do the first one stop, respect the %repeat then do the last one, which it is not doing, meaning i dono if something is wrong and its not reading the </font> or if i messed something up some other way
|
|
|
|
Daern Sorcerer
Joined: 15 Apr 2011 Posts: 809
|
Posted: Sat Nov 26, 2011 1:39 am |
It looks like the font is being changed in the groupborder function, and you didn't post the code for that... are you sure you have a </font> tag in it?
|
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Sat Nov 26, 2011 2:05 am |
ya i did, basic html :P
Code: |
<func name="groupborder" id="285">
<value><font "wingdings">%-1</font></value>
</func>
|
|
|
|
|
MattLofton GURU
Joined: 23 Dec 2000 Posts: 4834 Location: USA
|
Posted: Sat Nov 26, 2011 5:29 am |
What happens if you use %concat() instead of implicit concatenation?
|
|
_________________ EDIT: I didn't like my old signature |
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Sat Nov 26, 2011 6:13 am |
some things happened if you look at the bottoms of my code i was testing concat for another reason, and just decided to throw fonts in there also, it went all the way across not endinf till the end of the line
|
|
|
|
DraxDrax Apprentice
Joined: 22 Mar 2009 Posts: 149
|
Posted: Sat Nov 26, 2011 6:49 am |
The @groupborder() function needs to be defined in the groupinfo window, not the window/package the rest of your code resides in, since it's being called from within an #EXECWIN line. Alternatively, don't use #EXECWIN.
|
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Sat Nov 26, 2011 6:52 am |
its actually stored in a different package all together, i have a package i put my functions/vars i use elsewhere, or will use elsewhere
|
|
|
|
hadar Apprentice
Joined: 30 Aug 2009 Posts: 198 Location: my apt, in california
|
Posted: Sat Nov 26, 2011 7:03 am |
Actually just confirmed it as a bug methinks: goto untiltled session make a newalias testme put in:
Code: |
#echo <font "wingdings">i</font>
#echo test
#echo <font "wingdings">i</font>test
#echo <font "wingdings">i</font> test
#say <font "wingdings">i</font>test
#print <font "wingdings">i</font>test
#show <font "wingdings">i</font>test
|
the only ones that work as intended is the 2nd line, and the show |
|
|
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|