You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

279 lines
7.5 KiB

; mIRC Scribble 1.5, for mIRC v5.3 and up
; by Brennen Bearnes (with thanks to Gurney, who's been a great help when
; I'm stuck. Which happens more than it really ought to...)
; To be honest, this script isn't very good. As an alternative, I'd suggest MarkP's
; Shared Whiteboard script, which can be found at:
; http://www3.nbnet.nb.ca/pacman/scripts.html
; Anyway, if you still want to use this, here's how it works. If DCC mode is off,
; it only allows 2 users, since any more would quickly flood you off the server.
; Just do "/scribble <nick>" (if you don't put in a nick, it asks you for one), and
; your scribbles will be sent via MSG to the other user.
; If it's in DCC mode, all open DCC chats at the time you run /scribble will be
; sent to. Just open a DCC chat to the other user(s), and run /scribble.
; A custom window named @Scribble will pop up, just select the tool you want
; to use from the listbox, and start scribbling. Right-clicking brings up a popup
; with colors, line & dot size, etc.
alias scribble {
if %mSActive != 1 {
if %mSDCC == on {
if $chat(0) == 0 {
echo $colour(info text) -se No DCC chats currently open. You need at least one DCC chat window open to use Scribble in DCC mode. Either turn DCC mode off, or open a DCC chat to the person you're sending to.
halt
}
elseif $chat(0) >= 1 {
%mSNum = $chat(0)
}
}
else {
if $len($1) > 0 {
%mSNick = $1
}
else {
%mSNick = $?="Send scribbles to:"
}
}
%mSActive = 1
%mSLine = 1
%mSBox = 1
%mSDotSize = 2
%mSLineSize = 1
%mSColor = 1
window -l9p @Scribble @Scribble
.enable #ScribbleAliases
.enable #ScribbleMenus
.enable #ScribbleEvents
aline -l @scribble Dot
aline -l @scribble Line
aline -l @scribble Box
aline -l @scribble FilledBox
aline -l @scribble Ellipse
aline -l @scribble Text
aline -l @scribble Eraser
if %mSDCC == on { titlebar @Scribble to $chat(0) DCC Windows }
else { titlebar @Scribble to %mSNick }
}
else {
echo $colour(info text) -se A Scribble session is already open.
}
}
#ScribbleAliases off
alias mSMSG {
if %mSDCC == on {
%mSLoop = %mSNum
:StartMSG
msg = $+ $chat(%mSLoop) $$1-
dec %mSLoop 1
if %mSLoop > 0 { goto StartMSG }
unset %mSLoop
}
else {
msg %mSNick $$1-
}
}
alias mSDraw {
if $$1 == (@DOT {
drawdot @scribble $$2 $$3 $$4 $$5
}
elseif $$1 == (@LINE {
drawline @scribble $$2 $$3 $$4 $$5 $$6 $$7
}
elseif $$1 == (@BOX {
drawrect @scribble $$2 $$3 $$4 $$5 $$6 $$7
}
elseif $$1 == (@FULLBOX {
drawrect -f @scribble $$2 $$3 $$4 $$5 $$6 $$7
}
elseif $$1 == (@ELLIPSE {
drawrect -e @scribble $$2 $$3 $$4 $$5 $$6 $$7
}
elseif $$1 == (@TEXT {
drawtext @scribble $$2-
}
elseif $$1 == (@ERASE {
drawrect -f @scribble 0 $$3 $$4 $$5 $$6 $$7
}
elseif $$1 == (@CLEAR {
clear @scribble
}
}
#ScribbleAliases end
menu menubar {
-
Scribble Options
.DCC Mode ( $+ %mSDCC $+ ):{
if %mSActive != 1 {
if %mSDCC == on {
%mSDCC = off
echo $colour(info text) -se Scribbles will be sent through private messages (careful, you could flood yourself off this way)
}
else {
%mSDCC = on
echo $colour(info text) -se Scribbles will be sent through DCC
}
}
else {
echo $colour(info text) -se Sorry, you can't switch modes while a scribble session is active.
}
}
}
menu query {
Scribble:/scribble
}
#ScribbleMenus off
menu @scribble {
sclick:{
%mSTool = $sline(@scribble,1)
if %mSTool == Dot {
drawdot @scribble %mSColor %mSDotSize $mouse.x $mouse.y
mSMSG (@DOT %mSColor %mSDotSize $mouse.x $mouse.y
}
elseif %mSTool == Line {
if %mSLine == 1 {
drawdot @scribble %mSColor 1 $mouse.x $mouse.y
%mSx = $mouse.x
%mSy = $mouse.y
%mSLine = 2
}
elseif %mSLine == 2 {
drawline @scribble %mSColor %mSLineSize %mSx %mSy $mouse.x $mouse.y
mSMSG (@LINE %mSColor %mSLineSize %mSx %mSy $mouse.x $mouse.y
%mSLine = 1
}
}
elseif (%mSTool == Text) {
%mSText = $$?="Text:"
%mSTextSize = $$?="Text size:"
drawtext @Scribble %mSColor %mSFont %mSTextSize $mouse.x $mouse.y %mSText
mSMSG (@TEXT %mSColor %mSFont %mSTextSize $mouse.x $mouse.y %mSText
unset %mSText
unset %mSTextSize
}
elseif (%mSTool == Box) || (%mSTool == FilledBox) || (%mSTool == Ellipse) || (%mSTool == Eraser) {
if %mSBox == 1 {
drawdot @scribble %mSColor 1 $mouse.x $mouse.y
%mSx = $mouse.x
%mSy = $mouse.y
%mSBox = 2
}
elseif %mSBox == 2 {
%mSBx = $mouse.x
%mSBy = $mouse.y
if (%mSBx < %mSx) { %mSTemp = %mSBx | %mSBx = %mSx | %mSx = %mSTemp | unset %mSTemp }
if (%mSBy < %mSy) { %mSTemp = %mSBy | %mSBy = %mSy | %mSy = %mSTemp | unset %mSTemp }
%mSBx = %mSBx - %mSx
%mSBy = %mSBy - %mSy
if (%mSTool == Box) {
drawrect @scribble %mSColor %mSLineSize %mSx %mSy %mSBx %mSBy
mSMSG (@BOX %mSColor %mSLineSize %mSx %mSy %mSBx %mSBy
}
elseif (%mSTool == FilledBox) {
drawrect -f @scribble %mSColor %mSLineSize %mSx %mSy %mSBx %mSBy
mSMSG (@FULLBOX %mSColor %mSLineSize %mSx %mSy %mSBx %mSBy
}
elseif (%mSTool == Eraser) {
drawrect -f @scribble 0 %mSLineSize %mSx %mSy %mSBx %mSBy
mSMSG (@ERASE 0 %mSLineSize %mSx %mSy %mSBx %mSBy
}
elseif (%mSTool == Ellipse) {
drawrect -e @scribble %mSColor %mSLineSize %mSx %mSy %mSBx %mSBy
mSMSG (@ELLIPSE %mSColor %mSLineSize %mSx %mSy %mSBx %mSBy
}
%mSBox = 1
unset %mSBx
unset %mSBy
}
}
unset %mSTool
}
Clear:{
clear @scribble
mSMSG (@CLEAR
}
Color
.0:%mSColor = 0
.1:%mSColor = 1
.2:%mSColor = 2
.3:%mSColor = 3
.4:%mSColor = 4
.5:%mSColor = 5
.6:%mSColor = 6
.7:%mSColor = 7
.8:%mSColor = 8
.9:%mSColor = 9
.10:%mSColor = 10
.11:%mSColor = 11
.12:%mSColor = 12
.13:%mSColor = 13
.14:%mSColor = 14
.15:%mSColor = 15
Line Size
.1:%mSLineSize = 1
.2:%mSLineSize = 2
.3:%mSLineSize = 3
.4:%mSLineSize = 4
.5:%mSLineSize = 5
.10:%mSLineSize = 10
.20:%mSLineSize = 20
.Other:%mSLineSize = $$?="Line size:"
Dot Size
.1:%mSDotSize = 1
.2:%mSDotSize = 2
.3:%mSDotSize = 3
.4:%mSDotSize = 4
.5:%mSDotSize = 5
.10:%mSDotSize = 10
.20:%mSDotSize = 20
.Other:%mSDotSize = $$?="Dot size:"
Font:%mSFont = " $+ $$?="Font:" $+ "
}
#ScribbleMenus end
on 1:LOAD:{
%mSDCC = off
%mSFont = "Arial"
}
#ScribbleEvents off
on 1:TEXT:(@*:?:{
mSDraw $1-
}
on 1:CHAT:(@*:{
mSDraw $1-
}
on 1:CLOSE:=:{
%mSNum = %mSNum - 1
toolbar @Scribble to $chat(0) DCC windows
}
on 1:CLOSE:@scribble:{
if %mSDCC == off { echo $colour(info text) -se Ending scribble session with %mSNick }
else { echo $colour(info text) -se Ending DCC scribble session }
.disable #ScribbleAliases
.disable #ScribbleMenus
.disable #ScribbleEvents
unset %mSNick
unset %mSNum
unset %mSActive
unset %mSBox
unset %mSLine
unset %mSBox
unset %mSDotSize
unset %mSLineSize
unset %mSColor
unset %mSx
unset %mSy
}
#ScribbleEvents end