Meka][Meka Unstopable Posts: 700
| a subscript is a script that is a stand-alone script, but uses a bot that is already in use by another script, here is an example
Code: | --// Host: Scriptek v1.2 --// Meka][Meka --// If you run more then 1 script, and want to use same bot in same hub then use this feature MultiScript = 1; --//Set to 1 if u want to enable feature MultiBot = '-BOT-'; --//The multi bots nick u want to use global for this script. if MultiScript == 1 then bot = GetUsedBot(MultiBot); else --//maybe create a new bot and connect it someplace. bot = GetNewBot() bot.Name = MultiBot; bot.Connection = 'DSL'; bot.Description = 'Scriptek Lua Bot'; bot.Tag = '<++ multi bot'; bot.Password = 'test1'; bot:Connect('127.0.0.1',411); end; function ChatArrival(self, nick, chat) print ( '<'..nick .. '> '.. chat ); if self.Name == nick then --// do something maybe elseif chat == 'test' then bot:SendChat('test'); end end |
|