mIRC Homepage
Posted By: Skeletor on text - 23/03/06 05:17 PM
Code:
 on *:TEXT:.gbodyshot *:#:{
  if ($$2 == %nick.bshot) { 
    describe $chan ... $$2, Takes $$2, places them on the bar, pours a sachet of sugar onto their neck, Places a wedge of lemon into their mouth.
    describe $chan ... $nick licks the sugar of $$2's neck, slams the shot of $read($shortfn($mircdir) $+ system\bodyshot.txt)
    describe $chan ... Holds $$2 neck and then slowly bites into the lemon. just before kissing $$2!
    set %nick.bshot $$2
  }
} 


Nothing seems to happen, Any ideas?
Posted By: xDaeMoN Re: on text - 23/03/06 05:25 PM
That should work. Maybe there is another On TEXT event on top that is conflicting with this one.
Posted By: MikeChat Re: on text - 23/03/06 06:04 PM
where does %nick.bshot get set?

if ($$2 == %nick.bshot) {
Posted By: Skeletor Re: on text - 23/03/06 06:44 PM
in the varibles
Code:
%nick.bshot AquA_Chik  
Posted By: DaveC Re: on text - 23/03/06 07:27 PM
Your use of $2 is flawed , your using it as the Placer and the placie in the first describe, but then appear to use $nick correctly in the next line, this leads me to beleive you should infact be using $nick in replace of $$2 in the comparason and the first describe

Code:
on *:TEXT:.gbodyshot *:#:{
  if ($nick == %nick.bshot) {
    if (($2 == $nick) || ($2 == $me)) { notice $nick You cant do that to yourself or da bot }
    elseif ($2 !ison $chan) { notice $nick There not on the channel }
    else {
      describe $chan ... $nick $+ , Takes $$2, places them on the bar, pours a sachet of sugar onto their neck, Places a wedge of lemon into their mouth.
      describe $chan ... $nick licks the sugar of $2's neck, slams the shot of $read($shortfn($mircdir) $+ system\bodyshot.txt)
      describe $chan ... Holds $2's neck and then slowly bites into the lemon. just before kissing $$2!
      set %nick.bshot $2
    }
  }
}

* code untested *

* I also added a protection against doing it to yourself or the bot or someone not on channel.
* $$2 need only be encounteered once to halt the script so i used $2 for all remaining occurances (this is personal prefrence)
Posted By: Skeletor Re: on text - 24/03/06 09:06 AM
No, Still nothing
Posted By: MikeChat Re: on text - 24/03/06 06:43 PM
I made a little change to the code removing the use of the %var, because it was being compared at the Top of the code but not SET until the bottom of the code, and i see no point in the restriction, you want to only give one nick bodyshots?

Code:
on *:TEXT:.gbodyshot *:#:{
  REMOVE [color:red]  if ($nick == %nick.bshot) { [/color]
    if (($2 == $nick) || ($2 == $me)) { notice $nick You cant do that to yourself or da bot }
    elseif ($2 !ison $chan) { notice $nick There not on the channel }
    else {
      describe $chan ... $nick $+ , Takes $$2, places them on the bar, pours a sachet of sugar onto their neck, Places a wedge of lemon into their mouth.
      describe $chan ... $nick licks the sugar of $2's neck, slams the shot of $read($shortfn($mircdir) $+ system\bodyshot.txt)
      describe $chan ... Holds $2's neck and then slowly bites into the lemon. just before kissing $$2!
      REMOVE [color:red]      set %nick.bshot $2[/color]
    }
  }
}

on *:TEXT:.gbodyshot *:#:{
  if (($2 == $nick) || ($2 == $me)) { notice $nick You cant do that to yourself or da bot }
  elseif ($2 !ison $chan) { notice $nick There not on the channel }
  else {
    describe $chan ... $nick $+ , Takes $$2, places them on the bar, pours a sachet of sugar onto their neck, Places a wedge of lemon into their mouth.
    describe $chan ... $nick licks the sugar of $2's neck, slams the shot of $read($shortfn($mircdir) $+ system\bodyshot.txt)
    describe $chan ... Holds $2's neck and then slowly bites into the lemon. just before kissing $$2!
  }
}


in channel then post .gbodyshot (any nick in channel that is not you or the bot)
Posted By: DaveC Re: on text - 24/03/06 10:04 PM
I had assumed he had innitially set that var elsewhere (since he mentioned it was in the var list already), and the system was designed to allow each user who recieved a bodyshot to then give one to another user, thus its like a hotpotatoe script, being passed around users.
Posted By: symphony Re: on text - 25/03/06 09:28 AM
Code:
On *:TEXT:*:#:{
if ($1 == $+(.,<trigger>, *)) && ($2 == <whatever>) {
do stuff here 
}
}


General code syntax
Posted By: jaytea Re: on text - 25/03/06 03:02 PM
== comparisons dont consider wildcards.. i believe you want 'iswm'. looks like you just went ahead and ignored all the other posts in this thread that contained more correct and complete code :|
Posted By: MikeChat Re: on text - 25/03/06 07:59 PM
Quote:
I had assumed he had innitially set that var elsewhere (since he mentioned it was in the var list already), and the system was designed to allow each user who recieved a bodyshot to then give one to another user, thus its like a hotpotatoe script, being passed around users.

iI had thought that too, but suspect that the reason it wasnt woking in his tests were that he wasnt matching the var. Otherwise there was no reason for it to not work.
Posted By: DaveC Re: on text - 25/03/06 11:54 PM
Id concure with that. As always seems to be the problem, no one gives enough info when asking for help frown and were left to "assume" things!
Posted By: MikeChat Re: on text - 26/03/06 12:36 AM
and you have to love the posts
"It doesnt work"
no info like error messages, what things they did to test it or checks they made

just "It doesnt work"

and later "does it matter if im using version 5.71 for this multiserver script????"

being clear upfront of what you want, how you want it, and special parameters about where or how its to be used are not too much to expect from a poster.

more than "could sum 1 make me a bot"
© mIRC Discussion Forums