mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Apr 2007
Posts: 19
E
endlos Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2007
Posts: 19
Hi guys

Need your help. A person pastes that text and the bot should track which weapons were sabotaged by who.

Quote:

<Matt>Your spies successfully enter Chaos's armory undetected, and destroy 20 of the enemy's Blackpowder Missile stockpile. Your spies all return safely to your camp.
<bot>Matt sabotaged: 20 Blackpowder Missiles from Chaos

<Matt>Your spies successfully enter Chaos's armory undetected, and destroy 20 of the enemy's Excalibur stockpile. Your spies all return safely to your camp.
<bot>Matt sabotaged: 20 Excaliburs from Chaos


So far I have this, but cant get the "weapons" part.

Code:
ON 1:TEXT:*Your spies all return safely to your camp.:#endlos:{ /set-sab $$1- }

alias set-sab {
 .msg # $nick sabotaged: $$10 ??? from $remove($$5,$right($$5,2)) }
}


Thanks ^^

Joined: Jul 2007
Posts: 19
O
Old Offline
Pikka bird
Offline
Pikka bird
O
Joined: Jul 2007
Posts: 19
Are you trying to get the bot to save this information to a file? Or, just reply to the channel the main facts?


http://www.CloudyOneStudios.com
irc.CloudyOneStudios.com:#CloudyOne
Joined: Apr 2007
Posts: 19
E
endlos Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2007
Posts: 19
I will save all to a file later.
For now I need to show it only ^_^

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
Code:
alias set-sab {
  var %weapon = $14- [ $+ [ $calc($0 - 9) ] ]
  .msg # $nick sabotaged: $10 $+(%weapon , $iif($10 != 1 && *s !iswm %weapon, s)) from $left($5,-2)
}


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Apr 2007
Posts: 19
E
endlos Offline OP
Pikka bird
OP Offline
Pikka bird
E
Joined: Apr 2007
Posts: 19
Cool starbucks, it works great!

it even pluralizes it ^^

Thanks m8!

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
That looks *very* familiar. I know I saw a question regarding a script that looked just like that a year or two ago on here. You might try searching for it. Increase the time span to 5 years and see what you see.


Invision Support
#Invision on irc.irchighway.net

Link Copied to Clipboard