mIRC Home    About    Download    Register    News    Help

Print Thread
Ghalerion Essay Script help #241070 18/03/13 05:18 AM
Joined: Mar 2013
Posts: 19
K
KeiroD Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Mar 2013
Posts: 19
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:

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 }
}

Re: Ghalerion Essay Script help [Re: KeiroD] #241090 18/03/13 09:49 PM
Joined: Oct 2012
Posts: 164
D
Deega Offline
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
That script is quite overly complexicated. laugh

Are you aware that mIRC v7+ can split long messages automatically?

Anyway, you can try this if you like. Replace the dialog:essay:sclick code with...
Code:
on *:DIALOG:essay:sclick:*:{
  if ($did == 5) { essay.custom }
  elseif ($did == 3) {
    if ($window($active).type !isin query channel) { echo -aec info * Essay: cannot use $+("/,%m.send,") in this window. | return }
    var %len = 424 - $len($me)
    var %msg, %i = 1, %t = 0
    while ($did(essay,2,%i)) {
      var %ln = $v1,%mlen = $len(%msg) + $len($v1)
      if (%mlen > %len) {
        .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) ...
        var %msg, %t = %t + 1
      }
      %msg = %msg %ln
      inc %i
    }
    .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) $iif(%t > 1,<end>)
  }
}


Re: Ghalerion Essay Script help [Re: Deega] #241096 19/03/13 03:45 AM
Joined: Mar 2013
Posts: 19
K
KeiroD Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Mar 2013
Posts: 19
Originally Posted By: Deega
That script is quite overly complexicated. laugh

Are you aware that mIRC v7+ can split long messages automatically?

Anyway, you can try this if you like. Replace the dialog:essay:sclick code with...
Code:
on *:DIALOG:essay:sclick:*:{
  if ($did == 5) { essay.custom }
  elseif ($did == 3) {
    if ($window($active).type !isin query channel) { echo -aec info * Essay: cannot use $+("/,%m.send,") in this window. | return }
    var %len = 424 - $len($me)
    var %msg, %i = 1, %t = 0
    while ($did(essay,2,%i)) {
      var %ln = $v1,%mlen = $len(%msg) + $len($v1)
      if (%mlen > %len) {
        .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) ...
        var %msg, %t = %t + 1
      }
      %msg = %msg %ln
      inc %i
    }
    .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) $iif(%t > 1,<end>)
  }
}



I'm aware. smile

Yeah, I wasn't the one that originally designed this script. This was back when v6.21 was the latest version.

I don't use the cut script in mIRC v7.x seeing as it already includes a method to split messages automatically. But... you know, legacy users. >_>

Edit: Wait a minute, do you mean from line 29 to line 56? Or...?

Edit2: The customize button seems to be still borked... though this is how I've got it done, now:

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 }
  elseif ($did == 3) {
    if ($window($active).type !isin query channel) { echo -aec info * Essay: cannot use $+("/,%m.send,") in this window. | return }
    var %len = 424 - $len($me)
    var %msg, %i = 1, %t = 0
    while ($did(essay,2,%i)) {
      var %ln = $v1,%mlen = $len(%msg) + $len($v1)
      if (%mlen > %len) {
        .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) ...
        var %msg, %t = %t + 1
      }
      %msg = %msg %ln
      inc %i
    }
    .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) $iif(%t > 1,<end>)
  }
  }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 }
  }


Edit3: Some errors, specifically:

}ALIAS Unknown command
-
}ALIAS Unknown command
-
}ALIAS Unknown command
-

Bah. I'll check into it in the morning and try again.

Last edited by KeiroD; 19/03/13 04:52 AM.
Re: Ghalerion Essay Script help [Re: KeiroD] #241097 19/03/13 04:07 AM
Joined: Oct 2012
Posts: 164
D
Deega Offline
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Originally Posted By: KeiroD
I'm frustrated with my fruitless attempt in getting Ghalerion 4.0's cutscript to work in mIRC 7.xx.
Quote:
I don't use the cut script in mIRC v7.x seeing as it already includes a method to split messages automatically. But... you know, legacy users. >_>
Hmm...?

Originally Posted By: KeiroD
Edit: Wait a minute, do you mean from line 29 to line 56? Or...?
Nope, lines 29 - 84. The whole 'sclick' event.


Re: Ghalerion Essay Script help [Re: Deega] #241098 19/03/13 04:17 AM
Joined: Oct 2012
Posts: 164
D
Deega Offline
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
You pasted wrong smile The 'QuoteEncode' alias should start on a new line.
Code:
  }alias QuoteEncode {

Should be
Code:
}
alias QuoteEncode {


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 }
  elseif ($did == 3) {
    if ($window($active).type !isin query channel) { echo -aec info * Essay: cannot use $+("/,%m.send,") in this window. | return }
    var %len = 424 - $len($me)
    var %msg, %i = 1, %t = 0
    while ($did(essay,2,%i)) {
      var %ln = $v1,%mlen = $len(%msg) + $len($v1)
      if (%mlen > %len) {
        .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) ...
        var %msg, %t = %t + 1
      }
      %msg = %msg %ln
      inc %i
    }
    .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) $iif(%t > 1,<end>)
  }
}
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 }
}

Re: Ghalerion Essay Script help [Re: Deega] #241099 19/03/13 04:53 AM
Joined: Mar 2013
Posts: 19
K
KeiroD Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Mar 2013
Posts: 19
Originally Posted By: Deega
You pasted wrong smile The 'QuoteEncode' alias should start on a new line.
Code:
  }alias QuoteEncode {

Should be
Code:
}
alias QuoteEncode {


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 }
  elseif ($did == 3) {
    if ($window($active).type !isin query channel) { echo -aec info * Essay: cannot use $+("/,%m.send,") in this window. | return }
    var %len = 424 - $len($me)
    var %msg, %i = 1, %t = 0
    while ($did(essay,2,%i)) {
      var %ln = $v1,%mlen = $len(%msg) + $len($v1)
      if (%mlen > %len) {
        .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) ...
        var %msg, %t = %t + 1
      }
      %msg = %msg %ln
      inc %i
    }
    .timer 1 %t %m.send $active $iif(%t,--) $regsubex($QuoteEncode(%msg),/([$]+)/g,\t!) $iif(%t > 1,<end>)
  }
}
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 }
}


Whoops! I'll fix shortly and post back the results!

And it works beautifully. Thanks! I'll check back again tomorrow and compare the differences and get a better understanding of what worked and what didn't.

Thank you so much for finally helping to resolve one of the long-standing bugs in this script. smile

Last edited by KeiroD; 19/03/13 04:59 AM.
Re: Ghalerion Essay Script help [Re: KeiroD] #241100 19/03/13 05:32 AM
Joined: Oct 2012
Posts: 164
D
Deega Offline
Vogon poet
Offline
Vogon poet
D
Joined: Oct 2012
Posts: 164
Sure. If there's code you don't understand, just ask smile

BTW: Here's a better essay.custom alias. This 'attaches' it to the main dialog, plus the -l switch means it can only be called from the script itself.
Code:
alias -l essay.custom { noop $dialog(essay.custom,essay.custom,-4) }



The main "essay" alias can also be re-written (this only shortens the code, no real improvement here) as...
Code:
alias essay { dialog $iif($dialog(essay),-v,-md) essay essay }


I would remove the "/me" from dialog table, it serves no real purpose and in fact my code doesn't even remove it. :p
Code:
  edit "", 2, 10 50 420 320, vsbar, multi, return


Seeing as you don't do anything on the essay dialog init you don't need that event code either.

Re: Ghalerion Essay Script help [Re: Deega] #241114 19/03/13 06:42 PM
Joined: Mar 2013
Posts: 19
K
KeiroD Offline OP
Pikka bird
OP Offline
Pikka bird
K
Joined: Mar 2013
Posts: 19
Works beautifully.

Thanks again. Now that I'm more wide awake, I can now definitely see the differences and I'm facepalming for not recognizing the differences and fixing it myself.

I'm blaming it on being way too familiar with the code and not having a second eye look at it and go, "Hey... dude? Try this and see if it works?"