mIRC Home    About    Download    Register    News    Help

Print Thread
#248911 03/11/14 02:51 PM
Joined: Jun 2014
Posts: 248
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
I'd like to trigger an event with the name of a variable.

example
a particular channel use 'gold' as a currency, another 'Timmybucks'. So the variable is %currency.timmyschannel TimmyBucks and the other is %currency.rpgcentralchannel gold
I'd like the event to trigger on !(currency name). I should also probably have a default if the channel doesn't have a currency named, like $iif($($+(%,currency.,$chan),2)) == $null),dollars,$($+(%,currency.,$chan),2))<--I'm sure that is wrong/typo'd..but ya. I'm just not sure where to start with this. I hope my meaning is clear..thanks in advance.

Can I just plop an in line if statement like that on an on text event or is there some other mechanic to do it?

Joined: Dec 2013
Posts: 779
N
Hoopy frood
Offline
Hoopy frood
N
Joined: Dec 2013
Posts: 779
Code:
on *:text:!*:#: {
if ($1 == $($+(!,%,currency.,$chan),2)) || ($1 == !dollars) { 
;do stuff
}
}


Nillens @ irc.twitch.tv
Nillen @ irc.rizon.net
Joined: Jun 2014
Posts: 248
B
Fjord artisan
OP Offline
Fjord artisan
B
Joined: Jun 2014
Posts: 248
fml..duh.

ty


Link Copied to Clipboard