Author Topic: Switching from mIRC to IceChat  (Read 4339 times)

Andulien

  • Guest
Switching from mIRC to IceChat
« on: October 24, 2012, 11:24:25 AM »
Hey there, I'm trying to switch over my bot to IceChat 7. As I'm not to knowledgeable in the IC Scripting, I would like some help if possible :)

My first script, is a script that notifies for an event at certain times. For this I got the Remote/Script, Alias and Variables that are filled.

Remote/Script:
Code: [Select]
on *:text:!time:#s2bookworld:{
  msg $chan $pstwinter
}

ON *:TEXT:*:#s2bookworld:{
  if $pstwinter == 06 && %Snowager != $pstwinter {
    msg $chan The Snowager is now Asleep!!!!!!
    msg $chan http://www.neopets.com/winter/snowager.phtml
  }
  if $pstwinter == 14 && %Snowager != $pstwinter {
    msg $chan The Snowager is now Asleep!!!!!!
    msg $chan http://www.neopets.com/winter/snowager.phtml
  }
  if $pstwinter == 22 && %Snowager != $pstwinter {
    msg $chan The Snowager is now Asleep!!!!!!
    msg $chan http://www.neopets.com/winter/snowager.phtml
  }
  set %Snowager $pstwinter
}

ON *:JOIN:#s2bookworld:{
  if $pstwinter == 06 || $pstwinter == 14 || $pstwinter == 22 {
    msg $chan The Snowager is now Asleep!!!!!!
    msg $chan http://www.neopets.com/winter/snowager.phtml
  }
}

Alias:
Code: [Select]
pstwinter { return $asctime($calc($gmt - (28800) + $daylight),HH) }
pstsummer { return $asctime($calc($gmt - (25200) + $daylight),HH) }

Variables
Code: [Select]
%Snowager 14

The second code I'd like to take over is a timer AND a Random Talk Script. Meaning that each time someone says/does something a counter goes up, and at a specific number, some random text out of a text file gets selected and the counter reset.

Remote:
Code: [Select]
on *:text:!attic:#s2bookworld:{
  msg $chan To start the Attic Timer type !attic and the time until 30secs before the next attic stock. Exp: !attic 50
  msg $chan The Attic Timer will then automatically countdown to the Attic Stock and continue from there on in 7min intervals
  msg $chan To stop the Attic timer type: !atticoff
}

on *:text:!atticon:#s2bookworld:{
  msg $chan Attic Timer started.
  .timer1 0 420 msg $chan Attic!!!! http://www.neopets.com/halloween/garage.phtml
}


on *:text:!attic &:#s2bookworld:{
  if ($2 isnum 0-500) {
    msg $chan Attic Timer started.
    if (!$timer(attic)) {
      .timerattic 1 $2 msg $chan Attic!!!! http://www.neopets.com/halloween/garage.phtml
      .timer1 $asctime($calc($ctime + $2),HH:nn:ss) 0 420 msg $chan Attic!!!! http://www.neopets.com/halloween/garage.phtml
    }
  }
  else { msg $chan Not a number between 0-500 }
}

on *:text:!atticoff:#s2test:{
  msg $chan Attic Timer stopped.
  /timerattic off
  /timer1 off
  /timer2 off
}

on *:text:!atticoff:#s2bookworld:{
  msg $chan Attic Timer stopped.
  /timerattic off
  /timer1 off
  /timer2 off
}

[color=red]////End of Attic Script and Beginning of Random Talk Script.[/color]

on *:TEXT:!nick*:#s2bookworld: {
  if (%access_ [ $+ [ $nick ] ] == 255) { 
    nick $2
  }
  else {
    /notice $nick you dont have access to use this command.
  }
}
on *:TEXT:!viewrand*:#s2bookworld: {
  if (%access_ [ $+ [ $nick ] ] == 255) {
    msg $chan %randtalk_ [ $+ [ $chan ] ]
  }
  else {
    /notice $nick you dont have access to use this command.
  }
}
on *:TEXT:!setvar*:#s2bookworld: {
  if (%access_ [ $+ [ $nick ] ] == 255) { 
    set $2 $3
    /notice $nick The variable $2 has been set to $3
  }
  else {
    /notice $nick you dont have access to use this command.
  }
}

on *:TEXT:*:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,10)
  }
  if (%talkreq <= %randtalk_ [ $+ [ $chan ] ]) {
    /set -n %line $read("C:\Users\M\Documents\mIRCbot\scripts\RandomMuppet.txt")
    if ($left(%line,1) == / ) {
      describe $chan $right(%line,-1)
    }
    else {
      msg $chan %line
    } 
    set %randtalk_ [ $+ [ $chan ] ] 0
    /unset %line
  }
}

on *:JOIN:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,20)
  }
}

on *:PART:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,5)
  }
}

on *:PING:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,5)
  }
}

on *:QUIT:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,5)
  }
}

on *:VOICE:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,5)
  }
}

on *:OP:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,5)
  }
}

on *:KICK:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,5)
  }
}

on *:ME:#s2bookworld: {
  while ($rand(1,5) != 2) {
    inc %randtalk_ [ $+ [ $chan ] ] $rand(1,5)
  }
}

Variables:
Code: [Select]
%access_Andulien 255
%talkreq 800
%randtalk_#s2bookworld 435
%var 18:01:12
%ct 18:01:07

Txt File Currently opened under Users which doesn't exist IC:
Code: [Select]
I want to be part of that Conversation...
I want a kiss...
What are you looking at?
Give me some Chocolate!
Give me a hug.
Pet me :)
Lets Party!
/is busy thinking of chocolate.
.
.
.

I know it's a bunch but I really would be happy to get some help with it. Switched my main User already over, and would like to switch my Bot Account as well. Especially as I sure like the Multiuser Login feature :)

Snerf

  • Administrator
  • Hero Member
  • *****
  • Posts: 1968
    • IceChat IRC Client
Re: Switching from mIRC to IceChat
« Reply #1 on: October 24, 2012, 09:55:30 PM »
Sorry, but icechat's "mirc" engine is not fully compatible with mirc.

That code, as you can see, will not work. The engine is very very basic, and does not contain all the commands (like asctime,calc). Also, all commands need to have a / in front of it, unlike mirc. Timer commands need a proper id, not /timer1, but /timer 1.

You would have much more luck rewriting it in VB Script.
The IceChat God