IRC Help

Davis

Tree Surgeon
Joined
Dec 14, 2007
Messages
516
Location
usa
Alright so I have a script that *should* copy color from BRs into pastes into irc. key word... Should.

and when it does work it really does come in handy, it makes it much easier for others to read including myself :p and have seen others using them without any difficulties and was wondering if any of you could send one that works for you to me heres what i'm currently using and i'll show an example of what goes wrong


The Script:
Code:
on 1:INPUT:#:{
if (( [*] * allied * hostile staff. iswm $1- ) || ( [*] * allied * stole * land* iswm $1- )) { msg $active 3 $+ $1- | halt }
if (( [*] * hostile * allied staff. iswm $1- ) || ( [*] * hostile * stole * land* iswm $1- )) { msg $active 4 $+ $1- | halt }
if ( You gained isin $1-) { if ( effectiveness. isin $1- ) || (fame. isin $1-) || (lawfulness. isin $1-) { msg $active 3 $+ $1- | halt } }
if ( You lost isin $1-) { if ( effectiveness. isin $1- ) || (fame. isin $1-) || (lawfulness. isin $1-) { msg $active 4 $+ $1- | halt } }
if ( You stole * land. [*] tree.* iswm $1- ) { msg $active 3 $+ $1- | halt }
if ( ( *:*[*]*enemies* iswm $1- ) || ( *:*[*]*friendlies* iswm $1- )) {
var %match $1-
if ( ( *:*[*]*enemies* iswm $1- ) && ( *:*[*]*friendlies* iswm $1- )) { var %match $replace( %match , : , : $+ 04 ) | var %match $replace( %match , . , . $+ 03 ) }
if ( ( *:*[*]*enemies* iswm $1- ) && ( *:*[*]*friendlies* !iswm $1- )) { var %match $replace( %match , : , : $+ 03 ) }
if ( ( *:*[*]*enemies* !iswm $1- ) && ( *:*[*]*friendlies* iswm $1- )) { var %match $replace( %match , : , : $+ 04 ) }
msg $chan %match
halt
}
}

alias ps {
if (($1 = $null) || ($2 = $null) || ($3 = $null) ) { echo -a 4/PS <score> <land> <armod> }
else {
var %1 $remove( $1 ,$chr(44) )
var %1 $calc( $replace( %1 ,m,*1000000,b,*1000000000,k,*1000) )
var %2 $remove( $2 ,$chr(44) )
var %2 $calc( $replace( %2 ,m,*1000000,b,*1000000000,k,*1000) )

var %3 $remove( $3 ,$chr(44) )
echo -a 3For... Score: $bytes(%1,b) Land: $bytes( %2 ,b) AR Mod: $bytes(%3,b)
echo -a 7Land Score Dif: $bytes( $calc( ((%2 * %2 *20) - ( %2 * %2 *8 ))) ,b)
echo -a 12Effective Score: $bytes( $calc( %1 - ((%2 * %2 *20) - ( %2 * %2 *8 ))) ,b)
echo -a 6Score Required To AR on You: $bytes( $ceil( $calc( (%1 - ((%2 * %2 *20) - ( %2 * %2 *8 ))) *1.45* (1-( %3 /100)) )) ,b)
;//echo -a $comma( [ $calc( ( %1 - (%2 * %2 *20) - ( %2 * %2 *8 )) * 1.45 * (1-( %3 /100)) ) ])
}
}


The Error:
Code:
[ 18:52:46 ] (+Davis) [close] 2,500,000 hostile Attack Dog attacked, killing 6,121,087 allied staff.
[ 18:52:46 ] (+Davis) [close] 1,300,000 hostile Heavy Thug attacked, killing 129,267 allied staff.
[ 18:52:46 ] (+Davis) Died: 6,250,354 [£20,800,924,000] friendlies dead.
[ 18:52:46 ] (+Davis) You gained 3,328 effectiveness.
[ 18:52:46 ] (+Davis) Battle Report - Attacking xxx [xxx]
[ 18:52:46 ] (+Davis) [close] 2,500,000 hostile Attack Dog attacked, killing 6,121,087 allied staff.
[ 18:52:46 ] (+Davis) [close] 1,300,000 hostile Heavy Thug attacked, killing 129,267 allied staff.
[ 18:52:46 ] (+Davis) Died: 6,250,354 [£20,800,924,000] friendlies dead.
[ 18:52:46 ] (+Davis) You gained 3,328 effectiveness.
[ 18:52:46 ] (+Davis) You will soon be receiving £1,043,448,000 insurance.


This is what I actually Copy and Pasted:
Code:
Battle Report - Attacking xxx [xxx]
[close] 2,500,000 hostile Attack Dog attacked, killing 6,121,087 allied staff.
[close] 1,300,000 hostile Heavy Thug attacked, killing 129,267 allied staff.

Died: 6,250,354 [£20,800,924,000] friendlies dead.

You gained 3,328 effectiveness.
You will soon be receiving £1,043,448,000 insurance.
 

Intense

Pruner
Joined
Mar 9, 2008
Messages
71
Location
Belgium
Hm, weird. I looked at it for a while, came up with a solution only to find out I killed all /commands.. lol

Maybe it has something to do with the already running script you use? (Like NNScript, or whatever custom mIRC) Which will most likely use an on INPUT as well, to capture incoming commands, and smegs everything up??
 

Davis

Tree Surgeon
Joined
Dec 14, 2007
Messages
516
Location
usa
yeah thats what i've come up with also and i am using NNS so more than likely is the case but there has to be other ways
 

Polo

Garden Designer
Super Moderator
Joined
Dec 14, 2007
Messages
1,005
I also use nnscript and because of the way it buffers pasting, you can't use colour coding scripts with it.
 

Davis

Tree Surgeon
Joined
Dec 14, 2007
Messages
516
Location
usa
then would you happen to know where i could take the anti idle time script from NNS and use it in basic irc then just put the color code script in :p thats honestly all i use nns for :p
 

Polo

Garden Designer
Super Moderator
Joined
Dec 14, 2007
Messages
1,005
then would you happen to know where i could take the anti idle time script from NNS and use it in basic irc then just put the color code script in :p thats honestly all i use nns for :p

No idea. Try asking on the nnscript forums.
 

DarkSider

Tree Surgeon
Joined
Dec 14, 2007
Messages
796
Try to change to on &1:input

and if colors don't work tho i think they should try to replace the color sign with $chr(3)
 

Davis

Tree Surgeon
Joined
Dec 14, 2007
Messages
516
Location
usa
the
&1:input didn't change anything and the colors do work

Code:
[ 01:11:54 ] (+Testing) [close] 1,000,000 hostile Hippy attacked, distracting 891,354 allied staff.
[ 01:11:54 ] (+Testing) [close] 1,000,000 hostile Yob attacked, disabling 1,526,699 allied staff.
[ 01:11:54 ] (+Testing) [close] 3,000,000 hostile Small Droid made some funny beeps and disabled 2,640,127 allied staff.
[ 01:11:54 ] (+Testing) [close] 16,199 allied Geo-Phys Thief stole 179 land. [70] tree. [109] bush. [0] flower. [0] grass. [0] uncultivated.
[ 01:11:54 ] (+Testing) Distracted: 891,354 [£2,069,238,200] friendlies distracted.
[ 01:11:54 ] (+Testing) Disabled: 4,166,826 [£12,421,561,800] friendlies disabled.
[ 01:11:54 ] (+Testing) You stole 179 land. [70] tree. [109] bush. [0] flower. [0] grass. [0] uncultivated.
[ 01:11:54 ] (+Testing) You lost 435 effectiveness.
[ 01:11:54 ]      ~~~ Delaying paste of [ 9 ] lines/[ 633 ] bytes for [ 0.5 ] second(s) per line! Type /sp to stop!
[ 01:11:54 ] (+Testing) [close] 1,000,000 hostile Hippy attacked, distracting 891,354 allied staff.
[ 01:11:55 ] (+Testing) [close] 1,000,000 hostile Yob attacked, disabling 1,526,699 allied staff.
[ 01:11:55 ] (+Testing) [close] 3,000,000 hostile Small Droid made some funny beeps and disabled 2,640,127 allied staff.
[ 01:11:56 ] (+Testing) [close] 16,199 allied Geo-Phys Thief stole 179 land. [70] tree. [109] bush. [0] flower. [0] grass. [0] uncultivated.
[ 01:11:56 ] (+Testing) Distracted: 891,354 [£2,069,238,200] friendlies distracted.
[ 01:11:57 ] (+Testing) Disabled: 4,166,826 [£12,421,561,800] friendlies disabled.
[ 01:11:57 ] (+Testing) You stole 179 land. [70] tree. [109] bush. [0] flower. [0] grass. [0] uncultivated.
[ 01:11:58 ] (+Testing) You lost 435 effectiveness.
[ 01:11:58 ] (+Testing) You earned £77,403 bounty.


i think it has something to do with
[ 01:11:54 ] ~~~ Delaying paste of [ 9 ] lines/[ 633 ] bytes for [ 0.5 ] second(s) per line! Type /sp to stop!

everything above that is colored correctly and everything bellow it isn't colored at all



EDIT:
I turned off the script that delays posts and it did the exact same thing it posts it twice, the first time its colored the second time it isn't
 

DarkSider

Tree Surgeon
Joined
Dec 14, 2007
Messages
796
Try updating your mirc version ? I tested the script and worked for me. The problem is | halt ain't really working and i remember i needed to try a prefix to make it work tho i'm a bit rusty now :p Maybe on ^*:input ? Ask in a scripting channel if you need a prefix for the script to run and you can halt it right after.
 

Alcibiades

Plant Geneticist
Joined
Dec 13, 2007
Messages
4,267
Location
Canada
i copied the script to my mIRC and it works just fine (latest version of IRC) so perhaps DS is right and it's simply your version?
 

Davis

Tree Surgeon
Joined
Dec 14, 2007
Messages
516
Location
usa
as i've already said above i use NNS
http://nnscript.esnation.com/
it has a lot of already pre loaded scripts in it, download it and check out the initial prompt of options to see what i mean.

thus i'd have to assume that its something in NNS that is causing the error
 

Benneh

Tree Surgeon
Super Moderator
Joined
Dec 14, 2007
Messages
764
Location
Cheltenham, Gloucestershire, UK.
as i've already said above i use NNS
http://nnscript.esnation.com/
it has a lot of already pre loaded scripts in it, download it and check out the initial prompt of options to see what i mean.

thus i'd have to assume that its something in NNS that is causing the error

So then use normal mIRC, but copy/re-create all the scripts you want to use? :)

Anti-idle, could you not use something like a timer to reset your idle time using /resetidle, which I believe is a mIRC command. Although, having to set a timer each time you connect manually would get a tad annoying, so use:

Code:
on *:connect:{
timer 0 10 /resetidle
}
 

DarkSider

Tree Surgeon
Joined
Dec 14, 2007
Messages
796
/resetidle will only change the value of $idle which shows last time since you performed an action in mirc (pretty much any action i'd guess) and it's not used to display the idle time in a /whois. Normal idle time won't change when you run an alias or use notice for example.

If you need a simple antiidle script try an alias like

/aidle {
set %aidle $rand(10,120)
.timer.idle 1 [ %aidle ] .msg Azzer I love you <3
.timer.nextidle 1 [ $calc(%aidle + 1) ] aidle
}
 
Top