Imitatescript

By rattmuffen on Jan 19, 2006

  1. Put the script in your Remote(ALT+R)
  2. Check in the menubar for "Imitate" and click on it
  3. Fill the fields
  4. Push on Start Imitate

; Done, Visit #rattmuffen @ quakenet

menu menubar,channel {
  Imitate:/imitate
}

alias imitate { /dialog -m imitate imitate  }

dialog imitate {
  title "Imitatescript (/imitate)"
  size -1 -1 97 42
  option dbu
  edit "", 1, 24 2 69 12
  text "nick:", 2, 10 4 14 8
  check "Imitate on/off", 3, 19 29 41 10
  button "Imitate!", 4, 63 29 30 10, ok
  edit "", 5, 24 15 69 12
  text "#Channel:", 6, 4 18 20 8
}

on *:DIALOG:imitate:sclick:*:{
  if ($did == 4) { set %hnick $did($dname,1) | set %hkanal $did($dname,5) }
  if ($did == 7) { unset %haerma | unset %hkanal | unset %hnick }
  if ($did == 3) && (%haerma == on) { set %haerma off }
  elseif ($did == 3) && (%haerma == off) { set %haerma on }
}

on *:DIALOG:imitate:init:*:{
  did -a $dname 1 %hnick
  did -a $dname 5 %hkanal
  if (%haerma == on) { did -c $dname 3 }
  if (%haerma == off) { did -u $dname 3 }
  if ($did(1).text == $null) && ($did(5).text == $null) { did -b $dname 4 }
}

on *:DIALOG:imitate:edit:*:{
  if ($did(1).text == $null) || ($did(5).text == $null) { did -b $dname 4 }
  elseif ($did(1).text) || ($did(5).text) { did -e $dname 4 }
}

on *:TEXT:*:%hkanal:{ if ($nick == %hnick) && (%haerma == on) { msg %hkanal $1- } }
} 

on *:LOAD:{
  set %haerma off
  echo -a Script succesfully loaded, visit #rattmuffen
}

Comments

Sign in to comment.
Cross   -  Jan 23, 2006

This doesn\'t work for meh. o.O;;

 Respond  
Gex   -  Jan 22, 2006

u dnt need to use $did($dname,1) while ur in the dialog sub...just $did(1),in the variable set... here
elseif ($did == 3) && (%haerma == off) { set %haerma on }
will be better and shorter in code if its like :
elseif ($did == 3) && (!%haerma) { set %haerma 1}
u dnt need to set on and off...just any value and check if the variable isnt null .... like what u did here :
if (%haerma == on) { did -c $dname 3 }
if (%haerma == off) { did -u $dname 3 }
u should have done it like :
if (%haerma) { did -c $dname 3 }
else { did -u $dname 3 }
otherthan this its workin properly..btw u wrote a variable in a wrong way in that line :
if ($did == 7) { unset %herma | unset %hkanal | unset %hnick }
replace %herma...goodluck

 Respond  
chicknh8r   -  Jan 22, 2006
on *:TEXT:*:%hkanal:{ if ($nick == %hnick) && (%haerma == on) { msg %hkanal $1- } }
}

Has 1 too many \"}\"

 Respond  
RoninWarrior   -  Jan 19, 2006

this is pretty cool !

 Respond  
tribe   -  Jan 19, 2006

aah, now I like it :P

 Respond  
rattmuffen   -  Jan 19, 2006

So, it is fixed now i forgotten to change some parts into english. :)

 Respond  
tribe   -  Jan 19, 2006

alias imitate { /dialog -m imitate imitate }

dialog haerma {
...
}

sorry?

 Respond  
rattmuffen   -  Jan 19, 2006

Good luck buddies!

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.