Guest Johnson Posted September 3, 2008 Report Share Posted September 3, 2008 (edited) you sed it was ok to ask for a "flood protection" to this code ......... and thankyou for the help on *:TEXT:*!drink*:*: { set %posi $findtok($1-,$matchtok($1-,!drink,1,32),1,32) var %svalue = $ [ $+ [ %posi ] ] if (%svalue == !drink) { msg # 0 $nick Drink For You, $read(Drinks/drink.txt) } elseif (!drink isin %svalue) && (%svalue != !drink) && ($right(%svalue,-6) isnum) { msg # 0 $nick Drink For You, $read(Drinks/drink.txt,$right(%svalue,-6)) } unset %posi unset %svalue } Edited September 3, 2008 by Johnson Link to comment Share on other sites More sharing options...
Ozzy10 Posted September 3, 2008 Report Share Posted September 3, 2008 try this on *:TEXT:*!drink*:*: { if (%drinky == off) halt var %posi $findtok($1-,$matchtok($1-,!drink,1,32),1,32) var %svalue = $ [ $+ [ %posi ] ] if (%svalue == !drink) { msg # 0 $nick Drink For You, $read(Drinks/drink.txt) } elseif (!drink isin %svalue) && (%svalue != !drink) && ($right(%svalue,-6) isnum) { msg # 0 $nick Drink For You, $read(Drinks/drink.txt,$right(%svalue,-6)) } set -u10 %drinky off } Link to comment Share on other sites More sharing options...
Ozzy10 Posted September 3, 2008 Report Share Posted September 3, 2008 change it to this because of the colour problems your having on *:TEXT:*!drink*:*: { if (%drinky == off) halt var %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)) } set -u10 %drinky off } Link to comment Share on other sites More sharing options...
Ozzy10 Posted September 3, 2008 Report Share Posted September 3, 2008 as request , you pain in the ass lol on *:TEXT:*!drink*:*: { if (%drinky == off) halt var %posi $findtok($1-,$matchtok($1-,!drink,1,32),1,32) var %svalue = $ [ $+ [ %posi ] ] var %dcolour $r(1,15) if (%svalue == !drink) { msg # $+ %dcolour $nick Drink For You, $read(Drinks/drink.txt) } elseif (!drink isin %svalue) && (%svalue != !drink) && ($right(%svalue,-6) isnum) { msg # $+ %dcolour $nick Drink For You, $read(Drinks/drink.txt,$right(%svalue,-6)) } set -u10 %drinky off } Link to comment Share on other sites More sharing options...
Guest X-Fusion Posted September 3, 2008 Report Share Posted September 3, 2008 What, no %ozvars?!?!?!?!?! Link to comment Share on other sites More sharing options...
Ozzy10 Posted September 3, 2008 Report Share Posted September 3, 2008 try this , i think the code tags are messing it up when you copy on *:TEXT:*!drink*:*: { if (%drinky == off) halt var %posi $findtok($1-,$matchtok($1-,!drink,1,32),1,32) var %svalue = $ [ $+ [ %posi ] ] var %dcolour $r(1,15) if (%svalue == !drink) { msg # $+ %dcolour $+ $nick Drink For You, $read(Drinks/drink.txt) } elseif (!drink isin %svalue) && (%svalue != !drink) && ($right(%svalue,-6) isnum) { msg # $+ %dcolour $+ $nick Drink For You, $read(Drinks/drink.txt,$right(%svalue,-6)) } set -u10 %drinky off } Link to comment Share on other sites More sharing options...
Guest Johnson Posted September 3, 2008 Report Share Posted September 3, 2008 took a while but you got there in the end lololol ... seriously thankyou very much ozzy im very grateful for your help on that code ... ty mate Link to comment Share on other sites More sharing options...
Ozzy10 Posted September 4, 2008 Report Share Posted September 4, 2008 its ok it was the forum [ code ] [/ code ] tags that were removing some spaces and making it fail thats why the last one i use Quote tags Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now