Author Topic: UserHelpBot  (Read 2131 times)

0 Members and 1 Guest are viewing this topic.

Offline dvxjunkie

  • Fulll Member
  • ****
  • Posts: 56
  • Karma: +0/-0
UserHelpBot
« on: 20 October, 2003, 03:10:27 »
Answers frequently asked questions so operators can go eat thier dinner.



 --//UserHelperBot Concept by ?V?J??K??, with lots of help from RabbidWombat who helped keep the concats out and all the scopedness under control!!Please leave All his explanations in script if sharing it out so that newbies can learn.

 botname = "UserHelpBot"
 
trigs = {["+help"]="Type +dchelp If you need help getting DC to work. Type +iphelp If you need help seeing your own ip address. Type +vidhelp If you need help getting a movie file to play or convert format. Type +findhelp If you need help finding a certain file on dc. Type +hubhelp If you need help running hub software. Type +2dc If there are two dc's running in hub with your nick having a number added to one of them",

["+dchelp"]="first do a search for the letter E, if no search results then try passive mode in settings/connections if still no search results then open your web browser and go to http://personal.inet.fi/surf/finx/en-faq.htm if you dont find your answer there, try www.neo-modus.com/?page=help if still no luck ask an op for help.",

["+iphelp"]="in windows versions before xp, simply click start, then run and type in ipconfig.exe then click ok. in xp click start, then settings, then network connections. now double click on the internet connection(if cable or dsl it will say lan connection) then choose the support tab, Then choose details and ip will show along with the ip's for your local server as well as the shceduled time to lease a new ip if your server changes ip at regular intervals.",  
 
["+vidhelp"]="Note that if you resume to a copy of a video that you have a partial of by renaming your file be sure that the total file size of the two copys match exactly or else the file will not play. go to http://www.virtualdub.org/index and get free download of virtual dub video editor and open video file in that. if the video is corrupt it will tell you whats wrong with video when it refuses to open it. then you can open it in its own built in hex editor or choose to delete the file. vdub is also a great divx rendering tool and has many other features but is pretty easy to use.",

["+findhelp"]="if you really have to find a file, you can seach all dc hubs at once (not all allow it though) with this cool mutihub search tool--->http://www.dawnload.net/p2p_software/p2p_tools/glo-seach.cfm",


["+hubhelp"]="Make sure your ip address or hostname address is correctly typed into the hub software, in Ptokax hub versions test drive 4 and erlier uncheck the additional slots check feature in advanced settings page. To get your hub listed in public lists copy paste this string of hublist addresses--->vandel405.dynip.com;dreamland.gotdns.org;dcreg.mine.nu into the register address window (bottom left corner of network settings page)If you are looking for the newest releases of ptokax hub software, go to: http://ptokax.box.cz Looking for new scripts? Go here: http://lua.bcs-solutions.de",

["+2dc"]="that is because of a bug in ne modus dc that happens when you close dc. it stays running in the background on your pc, still connected to hub. then when you open a new client it renames you and logs you in with a number added to your nick. to fix this, press control alt delete ONCE and wait a second. the list of running apps will appear showing two instances of direct connect. then choose direct connect and click END TASK"}                                                                                                           tUsers = { n = 0 };

function Main()
frmHub:RegBot(botname);
SetTimer(1800);
StartTimer();
end

function NewUserConnected(curUser)
curUser:SendPM(botname, "Hello Im the user help bot. The following commands are available to you - +dchelp If you need help getting DC to work. Type +iphelp If you need help seeing your own ip address. Type +vidhelp If you need help getting a movie file to play or convert format. Type +findhelp If you need help finding a certain file on dc. Type +hubhelp If you need help running hub software. Type +2dc If there are two dc's running in hub with your nick having a number added to one of them. Type commands into main chat. bot reply can only be seen by you.")
end
function DataArrival(curUser, data)
if( strsub(data, 1, 1) == "<" ) then
-- get the msg only using regular expression
local s,e,msg = strfind(data, "%b<>%s+([^|%s]+)");
-- modified search pattern so it only gets the first word
-- this way msg will be nil on regular conversation which will
-- limit the number of time Lua checks the table
-- since it appears that you are using this trigger method as
-- a help bot, you don't need the nested for loops
if(msg and trigs[msg]) then
SendToAll( data ) -- send the original data
StartTimer();
-- You also don't need gsub because you do not use any [  ]
tinsert(tUsers, { curUser.sName, trigs[msg] });
-- What if several users send the message with 1.8 seconds?
return 1; -- tell the hub we have processed the data
end
end
end
function OnTimer()
local userMsg = tremove(tUsers);
while(userMsg) do
SendToNick(userMsg[1], "<"..botname.."> "..userMsg[2]);
userMsg = tremove(tUsers);
end
StopTimer();
end


PtokaX forum

UserHelpBot
« on: 20 October, 2003, 03:10:27 »