יוצר: לא ידוע.
תיאור: תיקון עברית במירק, מסדר את סדר הכתיבה --> הסבר בתמונה למטה!
הפעלה: יש לשים את הקוד בדף חדש של המירק
דרישות: עד 6.35
תמונה:
הקוד:
קוד: בחר הכל
alias hebfix return $wallahebrew($len($1),$wallareversed2($1))
alias rightecho wallaecho2 $1 $2 $wallaReversed2($3-)
alias wallaecho2 {
%_Width = $int($calc(($window($2).dw - 3) / 8))
if ($window($2)) {
var %filter = $remove($3-,$chr(1),$chr(2),$chr(3),$chr(4),$chr(5),$chr(6),$chr(7),$chr(8),$chr(9),$chr(10),$chr(11),$chr(12),$chr(13),$chr(14),$chr(15),$chr(16),$chr(17),$chr(18),$chr(19),$chr(20))
if ($1 isnum) {
if ($len(%filter) > %_width) {
var %one1 = 0
var %curline = %filter
var %nosp = $len($3) + 2
unset %twos
:linloop
if ($calc($len(%curline) + %one1) > %_width) {
if (%one1 == 0) %swit = %_width
else %swit = $calc(%_width - 2)
:spacloop
if ($mid(%curline,%swit,1) == $chr(32)) {
%chanalinetext = $str( ,$calc(%_Width - %swit - %one1)) $+ $wallaHebrew(%_Width,$mid(%curline,1,%swit)) $+ %twos
%chanLOGlinesNICK = $replace($right($remove(%chanalinetext,$chr(15)),5),$chr(32),$chr(43))
echo $1 -m $2 %chanalinetext
%curline = $mid(%curline,$calc(%swit + 1),$len(%curline))
%one1 = 2
%twos =
goto linloop
}
else {
if (%swit > %nosp) { dec %swit | goto spacloop }
else {
%chanalinetext = $wallaHebrew(%_Width,$mid(%curline,1,%_width)) $+ %twos
echo $1 -m $2 %chanalinetext
%curline = $mid(%curline,$calc(%_width + 1),$len(%curline))
%one1 = 2
%twos =
goto linloop
}
}
}
else {
%chanalinetext = $str( ,$calc(%_Width - $calc($len(%curline) + 2))) $+ $wallaHebrew(%_Width,%curline) $+ %twos
echo $1 -m $2 %chanalinetext
}
}
else {
%chanalinetext = $str($chr(15) $chr(15),$calc(%_Width - $len($3-))) $+ $wallahebrew(%_width,$3-)
echo $1 -m $2 %chanalinetext
}
}
}
}
alias wallaHebrew {
var %_HebPos = $1, %_Hebrew
:HebLoop
if ($mid($2-,%_HebPos,1) isletter) %_Hebrew = %_Hebrew $+ $chr(15) $+ $mid($2-,%_HebPos,1)
else {
var %a = $chr(15) $+ $replace($mid($2-,%_HebPos,1),$chr(32),$chr(15) $chr(15))
%_Hebrew = %_Hebrew $+ %a
}
dec %_HebPos
if (%_HebPos > 0) goto HebLoop
return %_Hebrew
}
alias wallareversed2 {
%_Eng = $replace($1-,[,$chr(163),],$chr(164),$chr(163),],$chr(164),[,<,$chr(161),>,$chr(162),$chr(161),>,$chr(162),<,$chr(123),$chr(158),$chr(125),$chr(159),$chr(158),$chr(125),$chr(159),$chr(123),$chr(40),$chr(156),$chr(41),$chr(157),$chr(156),$chr(41),$chr(157),$chr(40),$chr(32),$chr(205))
%_Engpos = 1
unset %addons %e-add %trans %tosend
:Eloop
%cChar = $ASC($MID(%_Eng,%_Engpos,1))
if ((%cChar isnum 65-90) || (%cChar isnum 48-57) || (%cChar isnum 97-122)) {
if ((%trans) && (%addons)) { set %trans %trans $+ %addons $+ $chr(%cChar) | unset %addons }
else set %trans %trans $+ $chr(%cChar)
if (%addons) {
set %e-add %addons
unset %addons
}
}
else if (%cChar isnum 224-250) {
if (%trans != $null) {
if (%e-add) set %trans %trans $+ %e-add
unset %e-add
set %tosend %tosend $+ $wallareversed(%trans) $+ %addons $+ $chr(%cChar)
unset %addons
unset %trans
}
else {
set %tosend %tosend $+ %addons $+ $chr(%cChar)
unset %addons
}
}
else set %addons %addons $+ $chr(%cChar)
if (%_EngPos <= $len(%_Eng)) {
inc %_EngPos
goto Eloop
}
if (%trans != $null) {
if (%tosend) {
if (%e-add) set %tosend %tosend $+ %e-add
if (%addons) set %trans %addons $+ %trans
unset %e-add %addons
}
else {
if (%e-add) set %trans %e-add $+ %trans
unset %e-add
if (%addons) set %trans %trans $+ %addons
unset %addons
}
if (([ isin %trans) || (] isin %trans) || (< isin %trans) || (> isin %trans) || ($chr(123) isin %trans) || ($chr(125) isin %trans) || ($chr(40) isin %trans) || ($chr(41) isin %trans)) {
%trans = $replace(%trans,],$chr(164),[,$chr(163),$chr(163),],$chr(164),[,>,$chr(162),<,$chr(161),$chr(161),>,$chr(162),<,$chr(125),$chr(159),$chr(123),$chr(158),$chr(158),$chr(125),$chr(159),$chr(123),$chr(41),$chr(157),$chr(40),$chr(156),$chr(156),$chr(41),$chr(157),$chr(40))
}
set %trans $wallareversed(%trans)
}
%tosend = %tosend $+ %addons $+ %trans
unset %addons %cChar %trans
return $replace(%toSend,$chr(205),$chr(32))
}
alias wallaReversed { var %1, %i = 0, %len = $len($1-) | while (%len > 0) { if ($mid($1-,%len,1) != $chr(32)) { %1 = %1 $+ $str($chr(32),%i) $+ $ifmatch | %i = 0 } | else inc %i | dec %len } | return %1 }
on *:input:*: if ($left($1,1) != /) { say $hebfix($1-) | haltdef }