Ghalerion Essay Script help - 18/03/13 05:18 AM
Hi, people.
I'm frustrated with my fruitless attempt in getting Ghalerion 4.0's cutscript to work in mIRC 7.xx.
The issue is that I'd like for the code to also work in mIRC 6.xx and 7.xx, but my success in this endeavour has been hopeless. Maybe I'm missing something, but I've asked a few others and have been unable to get an answer in what is wrong and why it does not work in mIRC 7.xx.
I'd be quite grateful if you guys could help fix this. I would also like to thank you for your time in looking this over.
I'll include the following code for your review:
I'm frustrated with my fruitless attempt in getting Ghalerion 4.0's cutscript to work in mIRC 7.xx.
The issue is that I'd like for the code to also work in mIRC 6.xx and 7.xx, but my success in this endeavour has been hopeless. Maybe I'm missing something, but I've asked a few others and have been unable to get an answer in what is wrong and why it does not work in mIRC 7.xx.
I'd be quite grateful if you guys could help fix this. I would also like to thank you for your time in looking this over.
I'll include the following code for your review:
Code:
;x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x ; Ghalerion Script ; By Kouketsu ;_________________________________________________________ ;Currently Viewing: Advanced Cut Script ;Description: Includes the dialog for essay RP'ers to avoid those cuts and repastes and notepad and whatnot. ;Aliases Defined: essay, printnocut ;Dialogs Included: essay ;x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x=x dialog essay { size -1 -1 440 405 title "Advanced Cut-Script" edit "Just for you essayists and long-winded roleplayers out there. All you've got to do is type in your big ol' post and then hit 'Send to Active'. Enjoy ^^", 1, 10 5 420 40, read, return, multi edit "/me", 2, 10 50 420 320, vsbar, multi, return button "&Send to Active", 3, 40 372 100 23 button "Exit", 4, 290 372 100 23, cancel button "Customize", 5, 165 372 100 23 } alias essay { if ($dialog(essay) != $null) { dialog -v essay | halt } else { dialog -md essay essay } } alias essay.custom { if ($dialog(essay.custom) != $null) { dialog -v essay.custom | halt } else { dialog -md essay.custom essay.custom } } on *:dialog:essay:init:*:{ } on *:DIALOG:essay:sclick:*:{ if ($did == 5) { essay.custom } if ($did == 3) { set %linesessay.test $did(essay,2).lines var %e = 1 set %essaylen.test 0 while (%e <= %linesessay.test) { set %essaylen.test $calc(%essaylen.test + $len($did(essay,2,%e).text))) inc %e } %len = 424 - $len($me) if (%essaylen.test > %len) { set %cuts $calc($int($calc(%essaylen.test / 424)) + 1) goto next } else { var %e = 1 set %nocut $remove($did(essay,2,1).text,/me) inc %e while (%e <= %linesessay.test) { set %nocut [ %nocut ] $did(essay,2,%e) inc %e } printnocut goto end } :next var %c = 1 var %l = 1 unset %cut.* set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $& $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4)) / $+ %m.send $active $+ %essay.act $QuoteEncode($remove(%cut. [ $+ [ %c ] ],/me)) ... inc %c inc %l 5 while (%c <= $calc(%cuts - 1)) { set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $& $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4)) / $+ %m.send $active $+ %essay.act $QuoteEncode(-- %cut. [ $+ [ %c ] ] ...) inc %c 1 inc %l 5 } set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $& $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4)) / $+ %m.send $active $+ %essay.act $QuoteEncode(-- %cut. [ $+ [ %c ] ] ...) inc %l 5 inc %c 1 set %cut. [ $+ [ %c ] ] $did(essay,2,%l) $did(essay,2,$calc(%l + 1)) $+ $& $did(essay,2,$calc(%l + 2)) $did(essay,2,$calc(%l + 3)) $did(essay,2,$calc(%l + 4)) / $+ %m.send $active $+ %essay.act $QuoteEncode(-- %cut. [ $+ [ %c ] ]) <end> } :end halt } alias QuoteEncode { %CSQtext = $1- %whisperTone = 13[ ;normal speech color set %normalTone = $+ %essay.speech $+ " ;OOC color setting %loudTone = $+ %essay.ooc $+ (( ;sets colors off at end *DO NOT CHANGE* %endTone = " $+ %essay.act %endTone3 = ] $+ %essay.act %endTone4 = )) $+ %essay.act %whisperQuote = [ %normalQuote = " %loudQuote = (( %endquote = " %endquote3 = ] %endquote4 = )) %CSQtext = $replace(%CSQtext,$chr(32) $+ %whisperQuote,$chr(32) $+ %whisperTone) %CSQtext = $replace(%CSQtext,$chr(32) $+ %normalQuote,$chr(32) $+ %normalTone) %CSQtext = $replace(%CSQtext,$chr(32) $+ %loudQuote,$chr(32) $+ %loudTone) %CSQtext = $replace(%CSQtext,%endQuote $+ $chr(32),%endTone $+ $chr(32)) %CSQtext = $replace(%CSQtext,%endQuote3 $+ $chr(32),%endTone3 $+ $chr(32)) %CSQtext = $replace(%CSQtext,%endQuote4 $+ $chr(32),%endTone4 $+ $chr(32)) /return %CSQtext } alias printnocut { /describe $active $+ %essay.act $QuoteEncode(%nocut) } dialog essay.custom { title "Customization" size -1 -1 134 83 option dbu text "Action Color:", 1, 7 7 33 9 combo 2, 44 6 78 50, size vsbar drop text "Speech Color:", 3, 6 23 38 8 combo 4, 44 22 78 50, size vsbar drop text "OOC Color:", 5, 6 39 34 8 combo 6, 44 38 79 50, size vsbar drop button "OK", 7, 19 66 37 12 button "Cancel", 8, 64 66 37 12 text "Send As:", 9, 6 53 25 8 radio "Message", 10, 43 52 33 10, group radio "Action", 11, 79 53 31 10, group } on *:dialog:essay.custom:init:*: { if (%m.send == describe) { did -c essay.custom 11 } if (%m.send == msg) { did -c essay.custom 10 } did -a essay.custom 2 White did -a essay.custom 2 Black did -a essay.custom 2 Dark Blue did -a essay.custom 2 Dark Green did -a essay.custom 2 Red did -a essay.custom 2 Maroon did -a essay.custom 2 Purple did -a essay.custom 2 Orange did -a essay.custom 2 Yellow did -a essay.custom 2 Light Green did -a essay.custom 2 Teal did -a essay.custom 2 Light Blue did -a essay.custom 2 Blue did -a essay.custom 2 Pink did -a essay.custom 2 Dark Gray did -a essay.custom 2 Light Gray did -a essay.custom 4 White did -a essay.custom 4 Black did -a essay.custom 4 Dark Blue did -a essay.custom 4 Dark Green did -a essay.custom 4 Red did -a essay.custom 4 Maroon did -a essay.custom 4 Purple did -a essay.custom 4 Orange did -a essay.custom 4 Yellow did -a essay.custom 4 Light Green did -a essay.custom 4 Teal did -a essay.custom 4 Light Blue did -a essay.custom 4 Blue did -a essay.custom 4 Pink did -a essay.custom 4 Dark Gray did -a essay.custom 4 Light Gray did -a essay.custom 6 White did -a essay.custom 6 Black did -a essay.custom 6 Dark Blue did -a essay.custom 6 Dark Green did -a essay.custom 6 Red did -a essay.custom 6 Maroon did -a essay.custom 6 Purple did -a essay.custom 6 Orange did -a essay.custom 6 Yellow did -a essay.custom 6 Light Green did -a essay.custom 6 Teal did -a essay.custom 6 Light Blue did -a essay.custom 6 Blue did -a essay.custom 6 Pink did -a essay.custom 6 Dark Gray did -a essay.custom 6 Light Gray did -c essay.custom 2 $calc(%essay.act + 1) did -c essay.custom 4 $calc(%essay.speech + 1) did -c essay.custom 6 $calc(%essay.ooc + 1) } on *:DIALOG:essay.custom:sclick:*:{ if ($did == 2) { set %act.temp $did(essay.custom,2) } if ($did == 4) { set %speech.temp $did(essay.custom,4) } if ($did == 6) { set %ooc.temp $did(essay.custom,6) } if ($did == 7) { actset speechset oocset dialog -x essay.custom } if ($did == 8) { dialog -x essay.custom } if ($did == 10) { set %m.send msg did -u essay.custom 11 } if ($did == 11) { set %m.send describe did -u essay.custom 10 } } alias actset { if (%act.temp == White) { set %essay.act 00 } elseif (%act.temp == Black) { set %essay.act 01 } elseif (%act.temp == Dark Blue) { set %essay.act 02 } elseif (%act.temp == Dark Green) { set %essay.act 03 } elseif (%act.temp == Red) { set %essay.act 04 } elseif (%act.temp == Maroon) { set %essay.act 05 } elseif (%act.temp == Purple) { set %essay.act 06 } elseif (%act.temp == Orange) { set %essay.act 07 } elseif (%act.temp == Yellow) { set %essay.act 08 } elseif (%act.temp == Light Green) { set %essay.act 09 } elseif (%act.temp == Teal) { set %essay.act 10 } elseif (%act.temp == Light Blue) { set %essay.act 11 } elseif (%act.temp == Blue) { set %essay.act 12 } elseif (%act.temp == Pink) { set %essay.act 13 } elseif (%act.temp == Dark Gray) { set %essay.act 14 } elseif (%act.temp == Light Gray) { set %essay.act 15 } } alias speechset { if (%speech.temp == White) { set %essay.speech 00 } elseif (%speech.temp == Black) { set %essay.speech 01 } elseif (%speech.temp == Dark Blue) { set %essay.speech 02 } elseif (%speech.temp == Dark Green) { set %essay.speech 03 } elseif (%speech.temp == Red) { set %essay.speech 04 } elseif (%speech.temp == Maroon) { set %essay.speech 05 } elseif (%speech.temp == Purple) { set %essay.speech 06 } elseif (%speech.temp == Orange) { set %essay.speech 07 } elseif (%speech.temp == Yellow) { set %essay.speech 08 } elseif (%speech.temp == Light Green) { set %essay.speech 09 } elseif (%speech.temp == Teal) { set %essay.speech 10 } elseif (%speech.temp == Light Blue) { set %essay.speech 11 } elseif (%speech.temp == Blue) { set %essay.speech 12 } elseif (%speech.temp == Pink) { set %essay.speech 13 } elseif (%speech.temp == Dark Gray) { set %essay.speech 14 } elseif (%speech.temp == Light Gray) { set %essay.speech 15 } } alias oocset { if (%ooc.temp == White) { set %essay.ooc 00 } elseif (%ooc.temp == Black) { set %essay.ooc 01 } elseif (%ooc.temp == Dark Blue) { set %essay.ooc 02 } elseif (%ooc.temp == Dark Green) { set %essay.ooc 03 } elseif (%ooc.temp == Red) { set %essay.ooc 04 } elseif (%ooc.temp == Maroon) { set %essay.ooc 05 } elseif (%ooc.temp == Purple) { set %essay.ooc 06 } elseif (%ooc.temp == Orange) { set %essay.ooc 07 } elseif (%ooc.temp == Yellow) { set %essay.ooc 08 } elseif (%ooc.temp == Light Green) { set %essay.ooc 09 } elseif (%ooc.temp == Teal) { set %essay.ooc 10 } elseif (%ooc.temp == Light Blue) { set %essay.ooc 11 } elseif (%ooc.temp == Blue) { set %essay.ooc 12 } elseif (%ooc.temp == Pink) { set %essay.ooc 13 } elseif (%ooc.temp == Dark Gray) { set %essay.ooc 14 } elseif (%ooc.temp == Light Gray) { set %essay.ooc 15 } }