|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
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?
sub-zero.homeip.net:6667
|
|
|
|
Joined: Mar 2005
Posts: 420
Fjord artisan
|
Fjord artisan
Joined: Mar 2005
Posts: 420 |
That should work. Maybe there is another On TEXT event on top that is conflicting with this one.
If you have a plastic floor runner over your tiles, then you're one Hella Pinoy!
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
where does %nick.bshot get set?
if ($$2 == %nick.bshot) {
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
Last edited by Skeletor; 23/03/06 06:45 PM.
sub-zero.homeip.net:6667
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
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 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)
|
|
|
|
Joined: Feb 2005
Posts: 185
Vogon poet
|
OP
Vogon poet
Joined: Feb 2005
Posts: 185 |
sub-zero.homeip.net:6667
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
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?
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)
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
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.
|
|
|
|
Joined: Jan 2006
Posts: 468
Fjord artisan
|
Fjord artisan
Joined: Jan 2006
Posts: 468 |
On *:TEXT:*:#:{
if ($1 == $+(.,<trigger>, *)) && ($2 == <whatever>) {
do stuff here
}
}
General code syntax
|
|
|
|
Joined: Feb 2006
Posts: 546
Fjord artisan
|
Fjord artisan
Joined: Feb 2006
Posts: 546 |
== 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 :|
"The only excuse for making a useless script is that one admires it intensely" - Oscar Wilde
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
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.
|
|
|
|
Joined: Sep 2003
Posts: 4,230
Hoopy frood
|
Hoopy frood
Joined: Sep 2003
Posts: 4,230 |
Id concure with that. As always seems to be the problem, no one gives enough info when asking for help and were left to "assume" things!
|
|
|
|
Joined: Dec 2002
Posts: 1,245
Hoopy frood
|
Hoopy frood
Joined: Dec 2002
Posts: 1,245 |
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"
|
|
|
|
|