mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
heres what are my plans

i have myself
and my bot

when someone PM's my bot, bot notices ME with info
of who is NICK and text, this info goes into MY @window, and bot act as "bridge" for communication.

so all PM's that bot gets, comes to me in NOTICE (that goes in @window), then i reply with normal typing that goes as NOTICE back, which bot gets back, and sends in PM to user who PM-ed him.

but im kinda stuck.

BOT CODE:
Code:
alias author { return razor }

on *:open:?:*:{
  .set %dumbass $nick
  .notice $author PMSG %dumbass
}

on *:text:*:?:{
  .notice $author $1-
}
  


ME:
Code:
 
on ^*:notice:*:*:{
  if (botname iswm $nick) {
    .set %botnick $nick
    .window -ek %botnick
    .aline %botnick $+($timestamp,$chr(32),%botnick,:) $1-
    haltdef
  }
  else { .echo -a $timestamps $theme(notice,$nick,$1-) | halt }
}
 


but i get error for this line:
.window -ek %botnick

dunno why.. any ideas ?

Last edited by raZOR; 27/04/06 12:50 AM.

IceCapped
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Simple error the nickname is not a valid window.

Try:

Code:
.set %botnick $+(@,$nick)


-Andy

Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
now i get error for this

* /aline: invalid window
.aline %botnick $+($timestamp,$chr(32),%botnick,:) $1-


IceCapped
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Code:
$+($timestamp,$chr(32),$remove(%botnick,@),:) $1-


-Andy

Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
still the same error


IceCapped
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I've tested the code and seems to works fine for me. Tell me, do you still use 6.03? I remember we had this discussion a while back. $+() wont work with 6.03 you're going to have to use $+.

Code:
$timestamp $+ $chr(32) $+ $remove(%botnick,@) $+ : $1-


-Andy

Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
not anymore grin
i threw away 6.03 for good
now only on 6.17 grin

btw was this code for .03 ?

~edit~
got same error :P

Last edited by raZOR; 27/04/06 01:50 AM.

IceCapped
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
The last code was. But that shouldn't matter what works for mIRC 6.03 will work for any version above as long as those features are still there. I'm clueless as to why it wont work for you, it works for me with no errors.

-Andy

Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
aff lol sorry
seems that late hours took over me laugh
it works ok, thanks

Last edited by raZOR; 27/04/06 01:55 AM.

IceCapped
Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
Want to paste the code?

-Andy

Joined: Apr 2005
Posts: 1,009
raZOR Offline OP
Hoopy frood
OP Offline
Hoopy frood
Joined: Apr 2005
Posts: 1,009
edited grin
sorry


IceCapped
Joined: Sep 2005
Posts: 2,881
H
Hoopy frood
Offline
Hoopy frood
H
Joined: Sep 2005
Posts: 2,881
$+() worked fine on 6.03.

Joined: Dec 2002
Posts: 3,547
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 3,547
I had the idea it was added after that version. My mistake.

-Andy


Link Copied to Clipboard