| Blockland Forums > Help |
| Temporary fix for Mac Font Bug. |
| (1/2) > >> |
| Axolotl:
Made 99% by Greek2me. --- Code: ---$AxolotlMods::TextLimit = 20; //keep on 20 function parseML(%flag) { for(%i=0; %i < strLen(%flag); %i++) { %char = getSubStr(%flag,%i,1); if(%char $= "<") %start = %i; if(%char $= ">" && %start !$= "") { %end = %i; %full = getSubStr(%flag,%start,%end-%start+1); %contents = getSubStr(%full,1,strLen(%full) - 2); %search = %contents; %pos = -1; %numValues = 0; while(strPos(%search,":") >= 0) { %search = getSubStr(%search,%pos+1,strLen(%search)); %pos = strPos(%search,":"); if(%pos >= 0) { %value[%numValues] = getSubStr(%search,0,%pos); } else { %value[%numValues] = %search; } %numValues ++; } if(%numValues <= 0) { if(%contents !$= "") { %value[0] = %contents; %numValues = 1; } } %replace = parseMLReplace(%value0,%value1,%value2,%value3,%value4,%value5,%value6,%value7,%value8,%value9,%value10,%value11,%value12,%value13,%value14,%value15); if(%replace !$= "") { %flag = strReplace(%flag,%full,%replace); %i = %start-1; } %start = ""; %end = ""; %full = ""; %contents = ""; %search = ""; %replace = ""; for(%e=0; %e < %numValues; %e++) %value[%e] = ""; %numValues = ""; } } return %flag; } function parseMLReplace(%value0,%value1,%value2,%value3,%value4,%value5,%value6,%value7,%value8,%value9,%value10,%value11,%value12,%value13,%value14,%value15) { switch$(%value[0]) { case "font": if(%value[2] > $AxolotlMods::TextLimit) { %replace = "<font:" @ %value[1] @ ":" @ $AxolotlMods::TextLimit @ ">"; } } return %replace; } package AxolotlClient { function clientCmdCenterPrint(%text,%duration){parent::clientCmdCenterPrint(parseML(%text),%duration);} function clientCmdBottomPrint(%text,%duration){parent::clientCmdBottomPrint(parseML(%text),%duration);} function newChatHud_AddLine(%text){parent::newChatHud_AddLine(parseML(%text));} }; deactivatepackage(AxolotlClient); activatepackage(AxolotlClient); --- End code --- |
| Danny Boy:
And the 1%? |
| Greek2me:
--- Quote from: Danny Boy on July 15, 2012, 05:23:24 PM ---And the 1%? --- End quote --- He just packaged it. This is the original source: http://forum.blockland.us/index.php?topic=197067.msg5375965#msg5375965 |
| Tyler799:
Are we supposed to copy that whole thing into the console? Or what? Instructions want. |
| Racerboy:
--- Quote from: Tyler799 on July 16, 2012, 04:40:50 PM ---Are we supposed to copy that whole thing into the console? Or what? Instructions want. --- End quote --- No, lol. You have to package that into a client sided mod (?) |
| Navigation |
| Message Index |
| Next page |