Jump to content

Question


Guest Johnson

Recommended Posts

Guest Johnson

:oops: wonder if anyone has an answer to this question ... ok i will try to explain what is happening ? iv got a drinks code that works ok with a vincula connection in my script but as soon as i put a basic connection (Warrior124) into my script the drinks code will not work. This is for sparkpea.net

 

Basic Connection which Warrior124 gave me.

 

on *:START: server three.irc.sparkpea.net 6667 
on *:CONNECT: { 
if ($network == Sparkpea.Net) { 
if (!%SPCNemail) set %SPCNemail $?="Please input your email address for this account" 
if (!%SPCNpasswd) set %SPCNpasswd $?*"Please input your password for this account" 
nickserv identify %SPCNemail %SPCNpasswd 
list 
   } 
}

 

Drinks Code

 

on *:TEXT:*!drink*:*: { 
  set %posi $findtok($1-,$matchtok($1-,!drink,1,32),1,32) 
  var %svalue = $ [ $+ [ %posi ] ] 
  if (%svalue == !drink) { msg # $nick Drink For You, $read(Drinks/drink.txt) }
  elseif (!drink isin %svalue) && (%svalue != !drink) && ($right(%svalue,-6) isnum) { msg # $nick Drink For You, $read(Drinks/drink.txt,$right(%svalue,-6)) } 
  unset %posi 
  unset %svalue 
}

 

I would like to also add that the drinks code works fine in my script ... in /server irc.koach.com

 

 

Link to comment
Share on other sites

try this for the on text code

 

on *:TEXT:*!drink*:*: {
  tokenize 32 $strip($1-)
  set %posi $findtok($1-,$matchtok($1-,!drink,1,32),1,32)
  var %svalue = $ [ $+ [ %posi ] ]
  if (%svalue == !drink) { msg # $nick Drink For You, $read(Drinks/drink.txt) }
  elseif (!drink isin %svalue) && (%svalue != !drink) && ($right(%svalue,-6) isnum) { msg # $nick Drink For You, $read(Drinks/drink.txt,$right(%svalue,-6)) }
  unset %posi
  unset %svalue
}

Link to comment
Share on other sites

Guest Johnson
Have you put each code in a seperate file?

 

:lmaojump: yes X ... i remembered everything you told me last time mate :lolwave:

 

Folder - Named Drinks and text document - Named drink

 

 

:lmaojump:err0r your code did the job ... thanks very much mate.

Link to comment
Share on other sites

Guest Johnson
so you left koach Johnson? i noticed it a lil quieter around there lately

 

 

:lmaojump: no chance lololol your not getting rid of me that quick KD :D my pc i use for koach will be up and running in the next 1/2hour :P

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...