Author | Message | Time |
---|---|---|
aosonic | I was wondering if there was any way to have the bot respond to different things that the users say in the channel. More specifically, I was wondering if it would be possible to make a simple script, somewhat like TDA. A player could type !setgame <gamename> to set the game name, and someone could also type !game to display <gameame>. I'm not much of a 'scripter' and I have no idea how to script this. Anyways, I was just wanting to know if it was possible. If it is, can someone point me in the direction of some tutorials or such to scripting for this bot? | March 12, 2007, 10:40 PM |
Spht | Yes, that is possible First, you'll need the oper plugin. Now, to create the command, open oper.cfg and add this: &5&&G&&"!setgame &+:set 1 $1 &5&&G&&"!setgame &+:set 2 $3 &5&&G&&"!setgame &Game set to: %3 &5&&G&&"!game"&%20 set game set to: %21 This allows anyone with the G flag to use the commands !setgame and !game. I recommend only allow privileged users to access commands to prevent abuse. Result: [19:46:37] <Spht> !setgame This is a test [19:46:37] <Spht@USEast> Game set to: This is a test [19:47:15] <K20A> !game [19:47:15] <Spht@USEast> Spht@Azeroth set game set to: This is a test | March 12, 2007, 11:25 PM |