mIRC Home    About    Download    Register    News    Help

Print Thread
addin - before %var #76131 22/03/04 03:21 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
Is there any way to add " - " before a "%variable"

Im trying to make it so when someone types in a number in my dialog it makes number and then -number. (aka 8 -8)


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76132 22/03/04 04:33 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
/help $+


New username: hixxy
Re: addin - before %var #76133 22/03/04 07:47 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
mmmm that only shows how to add after I dont see how i can add it before.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76134 22/03/04 08:30 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
- $+ %var


New username: hixxy
Re: addin - before %var #76135 22/03/04 08:34 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
hmmm this is what i did

Code:
  if $did == 5 { set %nick1 $did(5) | set - $+ %test1223 $did(5) }  


its not working it tells me

* /set: invalid parameters (line 137, favenickschan.mrc)

as you can see i tested it on a diffrent script.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76136 22/03/04 08:45 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
oh, you can't do that, you could only set %-var, not -%var


New username: hixxy
Re: addin - before %var #76137 22/03/04 08:51 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
so it would be

if $did == 5 { set %nick1 $did(5) | set %-test1223 $did(5) }

if i do that I dont think i will get the var with the - in front of it

ex. -8


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76138 22/03/04 09:52 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
I take it you dont know how to do it?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76139 22/03/04 09:54 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
//set %-test hello! | //echo -a %-test


New username: hixxy
Re: addin - before %var #76140 22/03/04 09:57 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
bla its making a varibla called %-test hello I need the hello part to be "-hello" with the - sighn infront of it.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76141 22/03/04 10:18 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
ok I see what your trying to show. you making a var that is hello i need it like this.

if $did == 5 { set %bincrypt $did(5) | set %bincrypt1 $did(5) }

so the out variable will be the number i put in the exit box 5 so say i use the number 8 i will get a variable %bincrypt 8 and
%bincrypt -8

I need a - infront of the second number but the only way to do that is to have it in the set %bincrypt1 variable somehow. do you see what im saying?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76142 22/03/04 10:21 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
set %byncript - $+ $did(5)


New username: hixxy
Re: addin - before %var #76143 22/03/04 10:25 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
you rock Tidy your the one man I know I can turn to when I need help. laugh laugh laugh


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76144 22/03/04 11:58 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
took me a while to understand what you wanted, and yw smile


New username: hixxy
Re: addin - before %var #76145 23/03/04 01:03 AM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
ROFL damn it after all that it dosent work here is my script that i made to take keys and use them to encript and decript binary and its not working.

Code:
;#############################
;# Binary God V3.0           #
;# Made by DeathfireD 1/3/04 #
;############################
menu menubar,channel {
  .Binary keys:/bincript4
  -
}
 [color:red] dialog bincript4 {
  title "Binary God Encryption"
  size -1 -1 98 55
  option dbu
  box "Binary God Setup - mIRC Integrated", 2, 0 0 98 55
  text "Encrypt", 3, 5 10 24 8
  edit , 4, 31 10 62 10, autohs
  edit , 5, 31 20 62 10, autohs
  text "Decrypt", 6, 5 20 24 8
  button "Cancel", 31, 35 40 28 10, flat cancel
  button "OK", 30, 5 40 28 10, default flat ok
  check "Encrypt text by the defaults.", 7, 5 30 87 10, left
}
alias bincript4 { dialog -md bincript4 bincript4 }

on *:dialog:bincript4:sclick:7:{
  ;echo -a Did: $did
  if ($did == 7) { set %bincrypt 8
    set %bindecrypt 10
    set %bincrypt2 -8
    ;echo -a Encryption Defaults: Yes
  }
  else {
    set %bincrypt 8
    set %bincrypt2 -8
    set %bindecrypt 10
    ;echo -a Encryption Defaults: No
  }
}
on *:dialog:bincript4:edit:*:{
  if $did == 4 { set %bincrypt $did(4) | set %bincrypt2 - $+ $did(4) }
  if $did == 5 { set %bindecrypt $did(5) }
}
on *:dialog:bincript4:init:0:{ did -a bincript4 4 %bincrypt | did -a bincript4 5 %bindecrypt }[/color]
dialog amigos {
  title "t h a n k z .::"
  size -1 -1 143 69
  option dbu
  list 1, 1 0 44 67, size
  text "name", 2, 46 3 22 7
  text "help", 3, 46 15 27 7
  edit "", 4, 76 1 66 10, multi read autohs
  edit "", 5, 76 13 66 31, multi autovs read
  button "[ok]", 11, 123 57 18 10, ok
}

dialog autor {
  title "a u t h o r s .::"
  size -1 -1 305 220
  text "nick",3,82 12 40 14
  combo 1,125 8 100 100, drop
  text "name",4,5 45 45 14, center
  text "",7,70 45 200 14
  text "Servers",5,5 75 45 14, center
  text "",10,70 75 200 14
  text "chans",6,5 105 45 14, center
  text "",13,70 105 230 14
  text "Aim",127,5 135 45 14, center
  text "",16,70 135 200 14
  text "email",8,5 165 45 14, center
  text "",19,70 165 200 14
  button "[close]",121, 140 190 40 25, ok center
  box "", 123, 0 30 55 155
  box "", 111, 0 30 305 35
  box "", 112, 0 60 305 35
  box "", 113, 0 90 305 35
  box "", 114, 0 120 305 35
  box "", 115, 0 150 305 35
}
on *:dialog:amigos:init:0:{
  did -a amigos 1 Koga
  did -a amigos 1 mIRC
  did -a amigos 1 Kitty-Kat
  did -a amigos 1 Blowfish
  did -a amigos 1 Tidy-Trax
  did -a amigos 1 you
  did -a amigos 1 you
  did -a amigos 1 you
  did -a amigos 1 you
  did -a amigos 1 you
  did -z amigos 1
}

on *:dialog:amigos:sclick:1: {
  if ($did(1).sel == 1) { namedid | did -a amigos 4 Koga | did -a amigos 5 Tester }
  if ($did(1).sel == 2) { namedid | did -a amigos 4 mIRC MessageBoard | did -a amigos 5 Thanks for helping with scripting }
  if ($did(1).sel == 3) { namedid | did -a amigos 4 Kitty-Kat | did -a amigos 5 Tester }
  if ($did(1).sel == 4) { namedid | did -a amigos 4 Blowfish | did -a amigos 5 Thanks for dialog for keys }
  if ($did(1).sel == 5) { namedid | did -a amigos 4 Tidy-Trax | did -a amigos 5 Thanks for the help with "-" before "%val" }
  if ($did(1).sel == 6) { namedid | did -a amigos 4 you | did -a amigos 5 you can help }
  if ($did(1).sel == 7) { namedid | did -a amigos 4 you | did -a amigos 5 you can help }
  if ($did(1).sel == 8) { namedid | did -a amigos 4 you | did -a amigos 5 you can help }
  if ($did(1).sel == 9) { namedid | did -a amigos 4 you | did -a amigos 5 you can help }
  if ($did(1).sel == 10) { namedid | did -a amigos 4 you | did -a amigos 5 you can help }
}

alias namedid { did -r amigos 4 | did -r amigos 5 }
alias thankz { dialog -md amigos amigos }
alias namedidz { did -r autor 7 | did -r autor 10 | did -r autor 13 | did -r autor 16 | did -r autor 19 }
alias autor { dialog -md autor autor }
on *:dialog:autor:init:0: {
  did -a autor 1 DeathfireD
}

on *:dialog:autor:sclick:1: {
  if ($did(1).sel == 1) { namedidz | did -a autor 7 Dan Ordway | did -a autor 10 Otaku-chat.com | did -a autor 13 @#dIRCxp @#Scripting @#Chaotic_Century @#amor @#plus | did -a autor 16 DeathfireD2 | did -a autor 19 DJOrdway@adelphia.net }
}
dialog Bingotinfo {
  title "Binary God V3.0"
  size -1 -1 146 124
  option dbu
  box "Info", 1, 1 3 145 105
  edit "Binary God was made for people that wish to talk in there chat or pm without anyone knowing what there saying. This Update, I fixed some bugs and made it so you can talk in pm with it now. I also made better dialogs and made the look a little cleaner                                          ==Next update==                                          Im planing on making some kinda of auto update that will search for an update on my site then download it. Please feel free to send me feedback or help me out. Im alwase looking for more help. Thanks", 2, 3 10 141 95, read multi
  button "Exit", 3, 4 110 63 9, flat, ok
  button "E-mail Feedback", 4, 73 110 66 9, flat
}
alias Bingotinfo { dialog -md Bingotinfo Bingotinfo }

on *:dialog:Bingotinfo:sclick:*:{
  if $did == 4 { run mailto:DJOrdway@adelphia.net?subject=Binary God v1.0 input }
}
;[binclock]
alias bc.start {
  .timerbc -m 0 100  bc.drawtime
  window -pk0od +ft @BinaryClock -1 -1 260 104
}

alias bc.drawtime {
  if ($window(@BinaryClock) == $null) {
    .timerbc off
    halt
  }
  drawrect -nf @BinaryClock 0 1 1 1 180 200

  set %bc.tfmt 243434444
  set %bc.i 1

  while (%bc.i <= $len(%bc.tfmt)) {
    set %bc.z $mid(%bc.tfmt, %bc.i, 1)
    while (%bc.z) {
      bc.bit $bc.getbit(%bc.i, %bc.z) %bc.i %bc.z
      dec %bc.z
    }
    inc %bc.i
  }

  bc.drawblobs 
  ; Update the display
  drawdot @BinaryClock

  ;drawtext @BinaryClock 4 Arial 10 10 65 $time - $gettok($calc($ticks / 1000),2,$asc(.))
  unset %bc.*
}

alias bc.bit {
  set %bc.active 2
  if ($1 == 1) set %bc.active 4
  set %bc.dist 0

  if ($2 > 2) inc %bc.dist 20
  if ($2 > 4) inc %bc.dist 20
  if ($2 > 6) inc %bc.dist 20

  inc %bc.dist $calc(($2 * 20) - 10)
  set %bc.top $calc(70 - ($3 * 15))
  drawrect -nf @BinaryClock %bc.active 1 %bc.dist %bc.top 10 10
}

alias bc.drawblobs {
  drawrect -nf @BinaryClock 2 1 52 20 5 5
  drawrect -nf @BinaryClock 2 1 52 45 5 5
  drawrect -nf @BinaryClock 2 1 112 20 5 5
  drawrect -nf @BinaryClock 2 1 112 45 5 5
  drawrect -nf @BinaryClock 2 1 172 20 5 5
  drawrect -nf @BinaryClock 2 1 172 45 5 5
}

alias bc.getbit {
  if ($1 <= 6) {
    set %bc.time $left($time,2) $+ $mid($time,4,2) $+ $right($time,2)
    set %bc.val $mid($revstr($base($mid(%bc.time,$1,1),10,2)), $2, 1)
  }
  else {
    set %bc.time $gettok($calc($ticks / 1000),2,$asc(.))
    set %bc.val $mid($revstr($base($mid(%bc.time,$calc($1 - 6),1),10,2)), $2, 1)
  }    
  if (%bc.val == $null) set %bc.val 0
  return %bc.val
}

;reverse a string. used to reverse the bits into an easier order to 'use' them
alias revstr {
  set %bc.str $len($1)
  set %bc.ret
  while (%bc.str) {
    set %bc.ret %bc.ret $+ $mid($1, %bc.str,1)
    dec %bc.str
  }
  return %bc.ret
}

menu channel,status {
  Binary  
  .Binary Clock: bc.start
}
alias bin.decode {
  var %temp = $1-

  var %output
  while (%temp) {
    var %char = $chr($base($left(%temp, [color:red]%bincrypt [/color] ),2, [color:red] %bindecrypt[/color]))

    %output = %output $+ $iif(%char == $chr(32),$chr(1),%char)
    %temp = $right(%temp, [color:red] %bincrypt2[/color])
  }

  return $replace(%output,$chr(1),$chr(32))
}

alias bin.encode {
  var %output
  var %temp = $1-

  while (%temp) {
    %output = %output $+ $base($asc($left(%temp,1)), [color:red]%bindecrypt [/color],2, [color:red]%bincrypt [/color])

    %temp = $right(%temp,-1)
  }

  return %output
}
menu channel,Query {
  -
  binary
  .Say Something in Binary:.msg # $bin.encode($$input(Enter your text.,e)) | echo -a < $+ $me $+ @binon> $!
  ..&info
  ...&thankz: thankz
  ...&author: autor
  ...&info: Bingotinfo
  ..-
  ..&unload: unload -rs bingod.mrc
}
menu Status {
  -
  Binary
  .Binary God keys:/bincript4
  ..&info
  ...&thankz: thankz
  ...&author: autor
  ...&info: Bingotinfo
  ..-
  ..&unload: unload -rs bingod.mrc

}
on *:INPUT:#:{
  if $left($1,1) isin 01 {
    .msg # $1-
    echo -a $+(<,$me,@binon>) $bin.decode($1-)
  halt  }
}
on $1^:text:/^[01 ]+$/:#:{
  echo -mbflirt # $+(<,$nick,@binon>) $bin.decode($1-)
  haltdef
}
on $*^:text:/^[01 ]+$/:?:{
  echo -mbflirt $nick $+(<,$nick,@binon>) $bin.decode($1-)
  haltdef
}
on 1:LOAD:/echo 12Binary God V2.0 Script By DeathfireD Loaded!
on 1:UNLOAD:/echo 4Binary God V2.0 Script By DeathfireD Unloaded!
}
  


for some reason when I set one client to say keys 12 and 5 and then i set the other to the same thing it dosent work. but when i set it to the default it works fine is there a way to fix this?


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }
Re: addin - before %var #76146 23/03/04 03:57 PM
Joined: Nov 2003
Posts: 2,327
T
tidy_trax Offline
Hoopy frood
Offline
Hoopy frood
T
Joined: Nov 2003
Posts: 2,327
don't really understand your problem..


New username: hixxy
Re: addin - before %var #76147 23/03/04 04:02 PM
Joined: Oct 2003
Posts: 143
D
DeathfireD Offline OP
Vogon poet
OP Offline
Vogon poet
D
Joined: Oct 2003
Posts: 143
hmmm ok this is what happens. NOTE please load my add-on to see problem. ok open the binary key dialog then type in 14 for the first number and 20 for the second then load this in a diffrent cliet and do the same thing now go in a chat and right mouse click and hit talk in binary then talk. the other client dosent see it as the right keys for some reason. It still shows up all messde up.


if (Windows isin %txt.1) { /kick # $nick Windows is a badword tisk tisk tisk. }