This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

calcip mirc thing

Old posts that have not been replied to for several years.
Locked
L
LexXx
Voice
Posts: 13
Joined: Mon Jun 14, 2004 11:32 am
Location: Bereldange/Luxembourg
Contact:

calcip mirc thing

Post by LexXx »

I have no idea of tcl but i need to run a script i have in my remote on my eggdrop:

Code: Select all

 on 1:TEXT:!Calcip &:#dclone.eu:{
  set %cip.s4 . $+ $1
  set %cip.temp %cip.s4 $+ /
  set %act.topic $chan( #dc.eu ).topic
  if (%cip.temp isin %act.topic) {
    set %cip.lwe.pos $calc($pos(%act.topic,%cip.s4,1)+$len(%cip.s4)+1)
    set %cip.temp $mid(%act.topic,%cip.lwe.pos,20)
    set %cip.act.pos $calc($pos(%cip.temp,/,1)+1)
    set %cip.temp $mid(%cip.temp,%cip.act.pos,20)
    set %cip.act $gettok(%cip.temp,1,32)
    set %cip.lwe $mid(%act.topic,%cip.lwe.pos,$calc(%cip.act.pos - 2))
    { if ($calc(75 - %cip.act + %cip.lwe) > 0) { echo 5[Server  $+ %cip.s4 $+ ] Minimum sojcount for WE is  $+ $calc(%cip.lwe + 75) $+  while maximum is  $+ $calc(%cip.lwe + 125) $+ .  $+ $calc(%cip.act - %cip.lwe) $+  sojs have been sold and   $+ $calc(75 - %cip.act + %cip.lwe) $+  more sojs need to be sold to reach min. } }
    { if ($calc(75 - %cip.act + %cip.lwe) == 0) { echo 5[Server  $+ %cip.s4 $+ ] Minimum sojcount for WE is  $+ $calc(%cip.lwe + 75) $+  while maximum is  $+ $calc(%cip.lwe + 125) $+ .  $+ $calc(%cip.act - %cip.lwe) $+  sojs have been sold - minimum is reached. } }
    { if ($calc(75 - %cip.act + %cip.lwe) < 0) { echo 5[Server  $+ %cip.s4 $+ ] Minimum sojcount for WE is  $+ $calc(%cip.lwe + 75) $+  while maximum is  $+ $calc(%cip.lwe + 125) $+ .  $+ $calc(%cip.act - %cip.lwe) $+  sojs have been sold, min is reached and   $+ $calc((%cip.lwe + 125) - %cip.act) $+  more sojs need to be sold to max. } }
  }
  unset %cip.*
} 
would be nice if you could help me or tell which commands are different for tcl cos i have no idea :(

mfg
Image
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

So what does this script do?
I used to do irc scripting like 4 years ago with v5.61, but now I see there
are hell lot of new functions in mIRC... with newer and newer releases such as now they have 6.14.

I don't understand these new functions however, the help files might describe the usages of these.

This is basically a trigger for !calcip? what output does !calcip give?
what would be the input for it and the output for it?!
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
L
LexXx
Voice
Posts: 13
Joined: Mon Jun 14, 2004 11:32 am
Location: Bereldange/Luxembourg
Contact:

Post by LexXx »

well you do !calcip and it gets some numbers from the topic and adds 75 to them and calcs a whole thing and gives an output! :/
Image
O
Ofloo
Owner
Posts: 953
Joined: Tue May 13, 2003 1:37 am
Location: Belguim
Contact:

Post by Ofloo »

what do you use this script for?
XplaiN but think of me as stupid
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

Maybe you can give us a demonstration...
or an example of the script working.

What numbers do you mean..
Numbers from a channel topic??

Suppose if a this is a topic:
"Please welcome to #channel and enjoy your stay in here."

There are no numbers in this one.

Probobaly a topic like:
"W3lc0m3 2 our chann3l, pl34s3 w3lc0m3 ur st4y in h3r3."

If a topic is like this, with numbers then. what will
happen hmm.

So your saying is that.. it collects all numbers in a channels
topics, adds 75 to the toal.. sums them up and gives total sum
as the result?
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
L
LexXx
Voice
Posts: 13
Joined: Mon Jun 14, 2004 11:32 am
Location: Bereldange/Luxembourg
Contact:

Post by LexXx »

if you could join #dclone.eu on quakenet [qry gc|day[eCH] ]i can show you what the script is for! its difficult to explain if you dont understand what is the use of the script :)
Image
L
LexXx
Voice
Posts: 13
Joined: Mon Jun 14, 2004 11:32 am
Location: Bereldange/Luxembourg
Contact:

Post by LexXx »

Code: Select all

bind pub - "!calcip" procname
set $cip.s4 . $+ $1
 set $cip.temp $cip.s4 $+ /
 set $act.topic $chan( #dclone.eu ).topic
 if ($cip.temp isin $act.topic) {
 set $cip.lwe.pos $calc($pos($act.topic,$cip.s4,1)+$len($cip.s4)+1)
 set $cip.temp $mid(sact.topic,$cip.lwe.pos,20)
 set $cip.act.pos $calc($pos($cip.temp,/,1)+1)
 set $cip.temp $mid($cip.temp,$cip.act.pos,20)
 set $cip.act $gettok($cip.temp,1,32)
 set $cip.lwe $mid($act.topic,$cip.lwe.pos,$calc($cip.act.pos - 2))
 { if ($calc(75 - $cip.act + $cip.lwe) > 0) { echo 5[Server  $+ $cip.s4 $+ ] Minimum sojcount for WE is  $+ $calc($cip.lwe + 75) $+  while maximum is  $+ $calc($cip.lwe + 125) $+ .  $+ $calc($cip.act - $cip.lwe) $+  sojs have been sold and  $+ $calc(75 - $cip.act + $cip.lwe) $+  more sojs need to be sold to reach min. } }
 { if ($calc(75 - $cip.act + $cip.lwe) == 0) { echo 5[Server  $+ $cip.s4 $+ ] Minimum sojcount for WE is  $+ $calc($cip.lwe + 75) $+  while maximum is  $+ $calc($cip.lwe + 125) $+ .  $+ $calc($cip.act - $cip.lwe) $+  sojs have been sold - minimum is reached. } }
 { if ($calc(75 - $cip.act + $cip.lwe) < 0) { echo 5[Server  $+ $cip.s4 $+ ] Minimum sojcount for WE is  $+ $calc($cip.lwe + 75) $+  while maximum is  $+ $calc($cip.lwe + 125) $+ .  $+ $calc($cip.act - $cip.lwe) $+  sojs have been sold, min is reached and  $+ $calc(($cip.lwe + 125) - $cip.act) $+  more sojs need to be sold to max. } }
 }
 unset $cip.*
}

putlog "caclip test 14:35"
I tried to rewrite it a bit, thats the result:

Code: Select all

2(121702:120002:125202) 02([dclone-eu-bot]02) [16:59] Tcl error in file 'eggdrop.conf':
02(121702:120002:125202) 02([dclone-eu-bot]02) [16:59] can't read "cip": no such variable
02(121702:120002:125202) 02([dclone-eu-bot]02) while executing
02(121702:120002:125202) 02([dclone-eu-bot]02) "set $cip.s4 . $+ $1"
02(121702:120002:125202) 02([dclone-eu-bot]02) (file "scripts/4.tcl" line 2)
02(121702:120002:125202) 02([dclone-eu-bot]02) invoked from within
02(121702:120002:125202) 02([dclone-eu-bot]02) "source scripts/4.tcl"
02(121702:120002:125202) 02([dclone-eu-bot]02) (file "eggdrop.conf" line 108)
02(121702:120002:125202) 02([dclone-eu-bot]02) [16:59] * CONFIG FILE NOT LOADED (NOT FOUND, OR ERROR)
DCC session closed[c
Image
g
greenbear
Owner
Posts: 733
Joined: Mon Sep 24, 2001 8:00 pm
Location: Norway

Post by greenbear »

nice mircscript
L
LexXx
Voice
Posts: 13
Joined: Mon Jun 14, 2004 11:32 am
Location: Bereldange/Luxembourg
Contact:

Post by LexXx »

awyeah helped me to do the calc things, we need to check how to split the topic into variables now
Image
Locked