mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Dec 2002
Posts: 397
A
ATMA Offline OP
Fjord artisan
OP Offline
Fjord artisan
A
Joined: Dec 2002
Posts: 397
i am having some major errors with this script please help me
it wont change the nick or .ame or .amsg the channels >_<

here is the code -
Code:
dialog awaysys {
  title "Future Away Script"
  size -1 -1 180 180
  option dbu
  tab "Main Options:", 1, 1 0 178 178
  box "Away Nick Managment:", 4, 5 15 70 70, tab 1
  check "Change Nick", 5, 10 22 50 10, tab 1
  text "Away Nick:", 6, 10 35 50 10, tab 1
  edit %away.nick, 7, 10 44 50 11, tab 1 autohs
  text "Back Nick:", 8, 10 57 50 11, tab 1
  edit %away.back, 9, 10 64 50 11, tab 1 autohs
  box "Options:", 10, 79 15 90 70, tab 1
  text "Logs:", 11, 81 25 25 11, tab 1
  radio "On", 12, 100 24 15 10, tab 1 group
  radio "Off", 13, 120 24 15 10, tab 1
  text "Pager", 14, 81 35 25 11, tab 1
  radio "On", 15, 100 35 15 10, tab 1 group
  radio "Off", 16, 120 35 15 10, tab 1
  box "Reason:", 17, 4 85 165 75
  edit %away.reason, 18, 10 93 153 62, tab 1 autohs
  tab "Logging:", 2
  tab "Pages:", 3
  button "Cancel", 55, 25 165 50 13, cancel
  button "ok", 56, 75 165 50 13, ok
}
alias /away { .dialog -m away awaysys }
on *:DIALOG:away:sclick:56: {
  if ($did(away,7) == $null) { .set %err1 You made an error in the Away Nick Edit Box. | .dialog -m awayerr error1 | halt }
  if ($did(away,9) == $null) { .set %err1 You made an error in the Return Nick Edit Box. | .dialog -m awayerr error1 | halt }
  if ($did(away,18) == $null) { .set %err1 You made an error in the Reason Edit Box. | .dialog -m awayerr error1 | halt }
  if ($did(away,7) != $null) { .set %away.nick $did(away,7) }
  if ($did(away,9) != $null) { .set %away.back $did(away,9) }
  if ($did(away,18) != $null) { .set %away.reason $did(away,18) }
  .run
}
alias /run {
  .nick %away.nick
  .ame is away beacuse, %away.reason : : : Pager: [ $+ %away.pager $+ ] Logging: [ $+ %away.logging $+ ]
  .amsg 4(( 15Future Script 4)) 14To contact me type /ctcp $me PAGER &lt;message&gt;
}
on *:DIALOG:away:init:*: {
  if ( %away.logging == 0 ) {
    did -c $dname 12
  }
  if ( %away.logging == 1 ) {
    did -c $dname 13
  }
  if ( %away.pager == 0 ) {
    did -c $dname 15
  }
  if ( %away.pager == 1 ) {
    did -c $dname 16
  }
}


Need amazing web design for low price: http://www.matrixn3t.net
Joined: Dec 2002
Posts: 1,527
_
Hoopy frood
Offline
Hoopy frood
_
Joined: Dec 2002
Posts: 1,527
ok by looking quickly at it im seeing two things that catch my eye ...... one thing that may not enable it to work that i can think of is using the alias /run ....... /run does so many other thigs in mirc wouldnt that best be changed to another alias name like /awaystart or /awayrun or anything for that matter not in use already by defualt in mirc ......... secondly a small lil thing on ur page message ??? change it to /ctcp Page %away.nick that way ur telling to to actually ctcp page u instead of a nick that ur no longer on since the change


anyhow thats just a few small things i can suggest


D3m0nnet.com
Joined: Dec 2002
Posts: 21
L
Ameglian cow
Offline
Ameglian cow
L
Joined: Dec 2002
Posts: 21
I noticed the main reason that you cant get the dialog to do anything. You initially called the dialog "awaysys", but then you call it "away" every place else.

I have a tendency not to use the same names as commands used by mIRC. This helps save my getting more confused than normal. But, that's just me.

You'll find a few other errors here and there as you continue your testing. Example: dialog ID 17 (Reason) will show on all tab definitions unless you put a tab 1 at the end of that line.
Also, if you use .amsg to announce your 'away' status then you wont see it going out to everyone else. I normally use /amsg in the remote section so that I can see it as well.

But it's a good start so keep plugging away. Hope that this helps.

Listner




Morals: When the p0rn shop gives you too much change, and you don't keep it.

Link Copied to Clipboard