Stealthbot Toàn Tập - Công cụ để check ping trên Battle.net

Status
Không mở trả lời sau này.

Darkgamer

The Warrior of Light
Tham gia ngày
23/2/03
Bài viết
2,086
Reaction score
0
Stealthbot​

1 trong những điểm hạn chế của server Blizzard là chúng ta không thể đo ping so với các server free .Bạn không thể chắc rằng ping bạn luôn ở mức an toàn và bắt đầu 1 trận đấu với lag + delay ,vì thế Stealthbot ra đời nhằm bổ sung cho những khiếm khuyến đó .Trên thực tế ,người ta không chỉ sử dụng riêng chức năng check Ping mà còn mở rộng thêm các chức năng khác rất hữu ích ,chẳng hạn như tạo clan chỉ với 3 người ,check Cdkey ,và đặc biệt là những đoạn script bổ sung đã giúp cho Stealthbot trở thành phần mềm ckeck Ping được ưa chuộng nhất hiện nay .
Để tiện việc trình bày ,tôi xin chia ra 6 phần :
+ Phần 1 : Download & Setup Stealthbot
+ Phần 2 : Xây dựng Stealthbot đơn giản
+ Phần 3 : Xây dựng Stealthbot với Script
+ Phần 4 : Xây dựng Stealthbot với Plugin
+ Phần 5 : Công cụ hỗ trợ cho Stealthbot
+ Phần 6 : Giải đáp 1 số câu hỏi thường gặp
--------------------------------------------------------
* Phần 1 : Download & Setup
Phiên bản hiện tại là StealthBot v2.6R3
_Download :
InstallSB Here
StealthBot_ Critical Update 5 Here
_Cài đặt InstallSB trước ,sau đó copy & paste file StealthBot_ Critical Update 5 .exe vào thư mục Stealthbot .Quá trình cài đặt coi như xong
_Thế tại sao lại phải download thêm file StealthBot_ Critical Update 5 ? Vì nếu chỉ cài đặt InstallSB thì khi Connect sẽ báo lỗi Version Check Failed Error .
 
* Phần 2 : Xây dựng Stealthbot đơn giản .
Nếu bạn dùng SB (Stealthbot) chỉ với mục đích đơn thuần là Check Ping , thì làm như sau :
_Chạy SB ,click chọn Settings ===> Bot Settings ,trong nhánh Connection Settings chọn Configuration .
_Nhìn qua bảng bên phải và điền các thông tin theo yêu cầu :
------------------------
+ Username : Account trong Server
+ Pass : Pass trong Server
( Nếu như chưa có User và Pass thì khi connect SB sẽ tự reg cho bạn ,không cần phải vào Warcraft để đăng ký )
+ Cdkey : nhập Cdkey của bản Ring Of Chao
+ Expansion CdKey : nhập Cdkey của bản Frozen Throne .
+ Home Channel : Channel mà bạn muốn SB connect
+ Server : chọn server mà bạn muốn SB connect
+ Trigger : lệnh để sử dụng SB .Ví dụ : nếu bạn chọn Trigger là dấu ' . ' ,muốn check ping thì người dùng phải gõ " .pingme " .
+ Product : chọn Game để nhập Cdkey cho đúng .
Kinh nghiệm : Trong mục Product , bạn nên chọn Warcraft III bởi vì khi chọn The Frozen Throne bạn sẽ phải nhập cả bộ CDKEY ROC & TFT ,còn khi chọn Warcraft III chỉ tốn 1 Key ROC mà còn được cái Icon ROC vừa đẹp vừa phân biệt .
_ Ai chưa có Cdkey thì dùng đỡ các key này :
87JFKGYFYEF26ZPV2DKRPFX2YC
CTEGTX69VNGDF46YFC4FH7H2DD
B2EZYD6M4P2DF8RE7RBF2TV2M6
4Y2Z4VNRN8KXZDHCJDKX2DF8FG
7H9BT7R7MP9BWP2RGPHV98CK2D
8YT2K74P466JG7X44JY9Y496CZ
BZMPNP4WZYWV94VCJP4C2NMJTG
FP4EDR9ZT2TW4GENWWRXWDHRJD
H7K8RVFY26MMW88JRZCTPHMDFV

_Nếu muốn thêm thì download cái này Click Here
-------------------------
_Khi đã điền đầy đủ thông tin , trong nhánh General Settings chọn Greet Message Settings .
_Chọn Greet Users who join the channel ,trong bảng Greet Message gõ dòng lệnh theo mẫu như sau : " Chao %0 ,Ping Hien Tai Cua Ban La %p " .Với câu lệnh trên , Bot sẽ tự động gửi dòng chữ cho người vừa join channel .Đánh dấu chọn Whisper the greet Message để gửi tin nhắn Whisper .Sau đó chọn Apply And Close .
_Nếu bạn muốn gõ .pingme để tự check ping hoặc .ping "username" để đo ping người khác . Chọn Setting ==> Edit Files ==> Access/Flags .Thay thế tất cả đoạn code bằng đoạn code sau :
-----------------------------------------------------------
[Flags]

[Numeric]
pingme=0
ping=0
;Warning!
; Adding anything other than a number as the required access for a command
; will result in that command being available with 0 ACCESS.
-----------------------------------------------------------
Phần này coi như xong .
 
* Phần 3 : Xây dựng Stealthbot với Script
Trong phần này ,chúng ta sẽ tìm hiểu cách tạo 1 con BOT cao cấp với các tính năng Addon rất thú vị và hữu ích .
+ Điểm cần lưu ý :
Vì script là 1 ngôn ngữ lập trình nhỏ nên tác giả sẽ thiết lập các Access để quy định quyền sử dụng chức năng của script . Để khắc phục ta sẽ thiết lập lại các Access bằng cách tìm những đoạn code trong script có dạng Access = X ( X là giá trị ) và Edit giá trị X = -1 .
Nếu chưa hiểu thì tôi sẽ làm mẫu cho 1 cái Script để minh hoạ .
--------------------------------------
+ Speed Challenge (Script game)
_Miêu tả : Script sẽ tạo 1 đoạn chử gồm nhiều ký tự ,và ai trong channel gõ nhanh nhất sẽ là người chiến thắng .
_Lệnh kích hoạt
.startsc : bắt đầu cuộc chơi
.stopsc : ngừng cuộc chơi
.clearsc : reset đỉêm về mức 0
.score [username] ; xem điểm của user
_Cách cài đặt
Bật Stealthbot lên .Chọn Settings ==> Edit Files ==> Script Files
Xoá hết các đoạn code trong đó và thêm đoạn code này vào
Mã:
'// Speed Challenge v5.6
'//   by Swent
'//     Last Modified by Swent 1:02 AM 3/26/2006

Public spcFSO, spcRandString, spcStringInterval
Public spcCount, timeLimitCounter, spcCounter, spcTickCount '// Counters
Public spcPlayGame, spcGuessActive '// game control bools
Public spcArrScores(2,1000), spcArrChar(90), spcArrNum(12), spcArrLetter(12)

'/*************************
'*  PROGRAM SETTINGS      *
'*************************/

'// Data File Path
Const spc_path = "C:\Program Files\StealthBot\speedchallenge.dat"

'// General Settings
Const string_length   = 4   '// Average Speed Challenge string length. Range: 1-7. Default: 4
Const time_limit      = 45  '// Time limit in seconds. Default: 45
Const string_interval = 11  '// Average delay in seconds between each string display. Default: 11

'// Access Requirements
Const clearsc_cmd_access = 100 '// Access required to clear all scores.  Default: 100
Const startsc_cmd_access = 60  '// Access required to start Speed Challenge. Default: 60
Const stopsc_cmd_access  = 60  '// Access required to stop Speed Challenge. Default: 60
Const score_cmd_access   = -1  '// Access required to get a user's score. Default: -1

'// Commands
Const clearsc_command = "clearsc" '// Used to clear all current and saved scores
Const startsc_command = "startsc" '// Used to start Speed Challenge
Const stopsc_command  = "stopsc"  '// Used to stop Speed Challenge
Const score_command   = "score"   '// Used to get a user's score

'// Program Components
'//   Default for all components: True
Const time_limit_enabled  = True
Const clearsc_cmd_enabled = True
Const startsc_cmd_enabled = True
Const stopsc_cmd_enabled  = True
Const score_cmd_enabled   = True

'/**************************
'* DO NOT EDIT BELOW HERE  *
'* DO NOT EDIT BELOW HERE  *
'* DO NOT EDIT BELOW HERE  *
'**************************/


Sub Event_Load()

spcStringInterval = string_interval
Randomize '// Initialize the RNG
If string_length > 7 or string_length < 1 Then '// String length setting is valid?
 string_length = 4
End If

Set spcFSO = CreateObject("Scripting.FileSystemObject")
If Not spcFSO.FileExists(spc_path) Then
Set spcFile = spcFSO.CreateTextFile(spc_path)
End If
Set spcFile = spcFSO.OpenTextFile(spc_path, 1) '// Open scores file
If Not spcFile.AtEndofStream Then
 spcLines = Split(spcFile.ReadAll, vbCrLf)  
 spcCount = 0
 '// Add all lines from saved scores file to an array
 For Each spcLine in spcLines
   If spcLine <> "" then
     spcArrScores(0,spcCount) = Left(spcLine, instr(1, spcLine, ":")-1)
     spcArrScores(1,spcCount) =  Mid(spcLine, instr(1, spcLine, ":")+1)
     spcCount = spcCount + 1
   End If
 Next  
End If
spcFile.Close

'// Create and enable timer
scTimer.Interval = 1000
scTimer.Enabled = True
End Sub

Sub Event_UserTalk(Username, Flags, Message, Ping)

GetDBentry Username, MyAccess, MyFlags

'// Is a command?
If Left(Message, 1) = BotVars.Trigger Then
 Message = Mid(Message, 2)
End If

'// Get the command and arguments
If Instr(Trim(Message), " ") = 0 Then Message = Message & " "
cmd = Split(Trim(Message), " ")

'// Call the appropriate sub
Select Case cmd(0)
 Case clearsc_command: clearsc_cmd cmd, Username, myAccess
 Case startsc_command: startsc_cmd cmd, Username, myAccess
 Case stopsc_command: stopsc_cmd cmd, Username, myAccess
 Case score_command: score_cmd cmd, Username, myAccess
 Case Else: is_correct_string cmd, Username
End Select
End Sub


Sub clearsc_cmd(cmd, Username, Access)

If Access < clearsc_cmd_access Or clearsc_cmd_enabled = False Then Exit Sub
If spcPlayGame Then
 spcPlayGame = False
 AddQ "/w " & Username & " Speed Challenge stopped."
End If

'// Erase current scores
Erase spcArrScores

'// Delete saved scores
If spcFSO.FileExists(spc_path) Then  
 spcFSO.DeleteFile(spc_path)
End If
AddQ "/w " & Username & " Scores cleared."
End Sub

Sub startsc_cmd(cmd, Username, Access)

If Access < startsc_cmd_access Or startsc_cmd_enabled = False Then Exit Sub

If Not spcPlayGame Then
 spcPlayGame = True
 AddQ "/w " & Username & " Speed Challenge started."
Else
 AddQ "/w " & Username & " Speed Challenge has already been started."
End If
End Sub

Sub stopsc_cmd(cmd, Username, Access)

If Access < stopsc_cmd_access Or stopsc_cmd_enabled = False Then Exit Sub
 spcPlayGame = False
 AddQ "/w " & Username & " Speed Challenge stopped."
End Sub

Sub score_cmd(cmd, Username, Access)

If Access < score_cmd_access Or score_cmd_enabled = False Then Exit Sub

'// Username arguement exists?
If UBound(cmd) > 0 Then
 user = cmd(1)
Else
 user = Username
End If

'// Score array is empty?
If spcCount = 0 Then
 score = 0
End If

'// Get user's score
For i = 0 to spcCount - 1
 If LCase(user) = spcArrScores(0,i) Then
   score = spcArrScores(1,i)
   Exit For  
 Else
   score = 0
 End If
Next
AddQ "/w " & Username & " " & user & "'s score is [" & score & "]"
End Sub


Sub is_correct_string(cmd, Username)

'// There's a game in progress and an active string?
If Not(spcPlayGame And spcGuessActive) Then Exit Sub

'// User has typed correct string?
If cmd(0) <> spcRandString Then Exit Sub

'// Add 1 to user's current score
For i = 0 To spcCount - 1
 If LCase(Username) = spcArrScores(0,i) Then
   spcArrScores(1,i) = spcArrScores(1,i) + 1
   score = spcArrScores(1,i)
   spcFlag = 1
 End If
Next
If spcFlag = 0 then
 spcArrScores(0,spcCount) = Lcase(Username)
 spcArrScores(1,spcCount) = 1
 score = 1
 spcCount = spcCount + 1
End If

'// Get user's response time
ansTime = Int((GetGTC - spcTickCount)/1000)

'// Create time serial
secs = Right("00" & ansTime & ":", 3)
mSecs = Right("000" & ((GetGTC - spcTickCount)/1000 - ansTime) * 1000, 3)
spcTimeSerial = secs & mSecs

AddQ "Well done " & Username & "! Your score is [" & score & "]. Your time was [" & spcTimeSerial & "]."
spcStringInterval = spcStringInterval - 1 + Int(rnd * 3) '// vary the string interval
spcGuessActive = False
spcCounter = 0
timeLimitCounter = 0
End Sub

Sub scTimer_Timer()

'// Game in progress?
If Not spcPlayGame Then Exit Sub

If Not spcGuessActive Then

 '// Display strings appx. at the specified interval
 spcCounter = spcCounter + 1
 If spcCounter = spcStringInterval Then

   '// Generate random string
   For i = 0 to 25
     spcArrChar(i) = Chr(i + 97)
   Next
   For i = 26 to 89
     spcArrChar(i) = ""
   Next
   For i = 0 to 11
     spcArrNum(i) = Int(Rnd * (100 - string_length * 10))
     spcArrLetter(i) = spcArrChar(spcArrNum(i))
   Next
   spcRandString = Join(spcArrLetter, "")
   If spcRandString = "" Then '// Generated string is empty?
     spcNum = Int(Rnd * 25)
     spcRandString = spcArrChar(spcNum)
   End If

   AddQ "Type this the fastest: [" & spcRandString & "]"
   spcTickCount = GetGTC
   spcGuessActive = True
 End If
Else
 If time_limit_enabled = True Then
   timeLimitCounter = timeLimitCounter + 1
   If timeLimitCounter >= time_limit Then
     AddQ "Time's up, you were too slow."
     spcGuessActive = False
     spcCounter = 0
     timeLimitCounter = 0
   End If
 End If
End If
End Sub

Sub Event_PressedEnter(Text)

Event_UserTalk BotVars.Username, "", Text, 1
End Sub

Sub Event_Close()

If spcFSO.FileExists(spc_path) Then
 spcFSO.DeleteFile(spc_path) '// Delete scores file
End If

Set spcFile = spcFSO.OpenTextFile(spc_path, 2, True) '// Create new, empty scores file

'// Write array of current scores to scores file
For j = 0 to spcCount - 1
 If spcArrScores(i,j) <> "" Then
   spcFile.WriteLine spcArrScores(0,j) & ":" & spcArrScores(1,j)
 End If
Next
spcFile.close
End Sub
Để mọi người có thể sử dụng Script này mà không cần Access .Tìm trong Script các đoạn code sau
Const clearsc_cmd_access = 100 '// Access required to clear all scores. Default: 100
Const startsc_cmd_access = 60 '// Access required to start Speed Challenge. Default: 60
Const stopsc_cmd_access = 60 '// Access required to stop Speed Challenge. Default: 60
Const score_cmd_access = -1 '// Access required to get a user's score. Default: -1
Và Edit lại như sau
Const clearsc_cmd_access = -1 '// Access required to clear all scores. Default: 100
Const startsc_cmd_access = -1 '// Access required to start Speed Challenge. Default: 60
Const stopsc_cmd_access = -1 '// Access required to stop Speed Challenge. Default: 60
Const score_cmd_access = -1 '// Access required to get a user's score. Default: -1

Khi chỉnh sửa xong ,save lại .Trong bảng chính Stealthbot ,Chọn Settings ==> Reload Script .Nếu hiện dòng chữ "Loaded 1 of 1 script files referenced " thì xem như bạn đã Add code thành công và có thể dụng .Nếu không hiện ra đoạn chữ thì tắt Stealthbot đi và Run lại là được . Còn hiện ra các dỏng chữ màu đỏ thì bạn đã add code sai .

Bạn có thể tìm thêm các Script tại địa chỉ này Click Here
 
* Phần 4 : Xây dựng Stealthbot với Plugin
Plugin chẳng qua là Script đã được convert thành file .Plug riêng biệt , ưu điểm của Plugin là ta không cần phải Add Script ,chỉ cần ngồi gõ lệnh là Script sẽ được Add 1 cách tự động .
_Cài đặt Plugin
Chọn Settings ==> Edit Files ==> Script Files
Thay thế toàn bộ đoạn code bên torng thành đoạn code này
Mã:
'0.935

'// Plugin Script
'//   Designed and Scripted By:
'//     Xelloss



'//**********************************//
'//  CHANGELOG                       //   
'//**********************************//

'// ver .89 by Swent
'//   *script now reads from [url]http://users.domaindlx.com/plugs/[/url]
'// ver .90 by Swent
'//   *Added code from update plugin
'//   *Added automatic plugin updates (see autoUpdatePlugins sub)
'// ver .91 by Swent
'//   *Fixed error with .getscript command (problem in AddScript sub)
'//   *Fixed the .lset command (it works now)   
'// ver .92 by Swent
'//   *Fixed type mismatch error in the scriptTimer sub
'// ver .93 by Swent (the big re-write)
'//   *Reduced redundant code by adding the ExecuteEvent sub
'//   *Replaced the setsub, setsubstat, and getsubstat functions with the new eventExists function.
'//   *Modified the changeEnabled sub and renamed it pStatusCmd
'//   *Removed the callsub, isNewVersion, reloadscript subs/functions (all unnecessary)
'//   *Cleaned up the code overall (added appropriate capitalization, renamed variables, added comments, removed unnecessary code)
'//   sub-ver .931 by Swent
'//     *Fixed problem with bold/underlined command output by adding the SetChrCodes sub.
'//   sub-ver .932 by Jack
'//     *New plugin server
'//   sub-ver .933 by Jack
'//     *Minor edit in changelog
'//   sub-ver .934 by Jack
'//     *Fixed typo "Pluginsetings"
'//   sub-ver .935 by Jack
'//     *Stupid mistake somewhere somehow

'//**********************************//
'//  NOTES ON PLUGIN SUBS/FUNCTIONS  //   
'//**********************************//

'// [ Default Settings Subs/Functions ]

'// - SetSetting
'// USAGE: SetSetting "prefix", "SettingName", Setting, "Comment", Overwrite
'//   Overwrite is a boolean (True or False). You almost always want to set it to True.

'// - GetSetting
'// USAGE: Setting = GetSetting("prefix", "SettingName")


'// [ Timer Subs/Functions ]

'// - CreateTimer
'// USAGE: CreateTimer "prefix", "TimerName"

'// - TimerInterval
'// USAGE: TimerInterval "prefix", "TimerName", Interval
'//   Interval is in seconds (must be an integer).

'// - TimerEnabled
'// USAGE: TimerEnabled "prefix", "TimerName", Enabled
'//   Enabled is a boolean (True or False).

'// - GetTimerEnabled
'// USAGE: Enabled = GetTimerEnabled("prefix", "TimerName")
'//   Enabled will hold a boolean (True or False).

'// - GetTimeLeft
'// USAGE: timeLeft = GetTimeLeft("prefix", "TimerName")
'//   timeLeft will hold the number of seconds left until your timer sub is executed.

'// - GetTimeWaiting
'// USAGE: timeWaiting = GetTimeWaiting("prefix", "TimerName")
'//   timeWaiting will hold the number seconds since the last time your timer sub was executed.

'// - RemoveTimer
'// USAGE: RemoveTimer "prefix", "TimerName"


'// [ Message Display Sub ]

'// - dsp
'// USAGE: dsp DisplayID, Message, Username, Color
'//   DisplayID must be one of the following integer values:
'//	1 = AddQ
'//	2 = Emote
'//	3 = Whisper
'//	4 = AddChat
'//   Color needs to be a vbcolor:
'//	vbGreen, vbRed, vbCyan, vbYellow, vbBlue, vbMagenta, vbBlack, vbOrange, vbWhite


'//**********************************//
'//  THE PLUGIN SCRIPT               //
'//**********************************//

'// [[[ CONSTANT AND GLOBAL DECLARATIONS, OBJECT REFERENCES ]]]

Public Const PS_UPDATE_PATH = "http://scripting.berzerkerweb.com/"

Public psD2   '// holds "*" If Bot is using D2
Public psBold '// holds chr code for bold text
Public psUL   '// holds chr code for underlined text

Set psPlugins = CreateObject("Scripting.Dictionary")       '// holds plugin files
Set psVersions = CreateObject("Scripting.Dictionary")      '// holds plugin versions
Set psTimerInterval = CreateObject("Scripting.Dictionary") '// holds timer intervals
Set psTimerCount = CreateObject("Scripting.Dictionary")    '// holds timer counts
Set psTimerEnabled = CreateObject("Scripting.Dictionary")  '// holds timer statuses
Set psSettings = CreateObject("Scripting.Dictionary")      '// holds plugin settings
Set psFSO = CreateObject("Scripting.FileSystemObject")     '// holds the FSO


'// [[[ PUBLIC SUBS/FUNCTIONS ]]]

Public Sub SetSetting(Prefix, SettingName, SettingValue, Comment, Overwrite)

	If psSettings.Exists(Prefix & "::" & SettingName) and Overwrite Then
		psSettings.Item(Prefix & "::" & SettingName) = SettingValue & "::" & Comment
	ElseIf Not psSettings.Exists(Prefix & "::" & SettingName) Then
		psSettings.Add Prefix & "::" & SettingName, SettingValue & "::" & Comment
	End If
End Sub

Public Function GetSetting(Prefix, SettingName)

	If psSettings.Exists(Prefix & "::" & SettingName) then
		GetSetting = Split(psSettings.Item(Prefix & "::" & SettingName),"::")(0)
	Else
		GetSetting = "" 'vbnullstring
	End If
End Function


Public Sub CreateTimer(Prefix, TimerName)

	psTimerInterval.Add Prefix & "::" & TimerName, 1
	psTimerCount.Add Prefix & "::" & TimerName, 1
	psTimerEnabled.Add Prefix & "::" & TimerName, false
End Sub


Public Sub RemoveTimer(Prefix, TimerName)

	psTimerInterval.Remove Prefix & "::" & TimerName
	psTimerCount.Remove Prefix & "::" & TimerName
	psTimerEnabled.Remove Prefix & "::" & TimerName
End Sub


Public Sub TimerInterval(Prefix, TimerName, Interval)

	psTimerInterval.Item(Prefix & "::" & TimerName) = Interval
	psTimerCount.Item(Prefix & "::" & TimerName) = Interval
End Sub


Public Sub TimerEnabled(Prefix, TimerName, Enabled)

	psTimerEnabled.Item(Prefix & "::" & TimerName) = Enabled
End Sub


Public Function GetTimerEnabled(Prefix, TimerName)

	GetTimerEnabled = psTimerEnabled.Item(Prefix & "::" & TimerName)
End Function


Public Function GetTimeLeft(Prefix, TimerName)

	GetTimeLeft = psTimerCount.Item(Prefix & "::" & TimerName) - 1
End Function


Public Function GetTimerWaiting(Prefix, TimerName)

	GetTimerWaiting = psTimerInterval.Item(Prefix & "::" & TimerName) - psTimerCount.Item(Prefix & "::" & TimerName) + 1
End Function


Public Sub dsp(DisplayID, Message, Username, Color)

	Select Case DisplayID
		Case 1: AddQ Message
		Case 2: AddQ "/me " & Message
		Case 3: AddQ "/w " & psD2 & Username & " " & Message
		Case 4: AddChat Color, Message
	End Select
End Sub


'// [[[ INTERNAL SUBS/FUNCTIONS ]]]

Private Sub SetChrCodes()

	psBold = Chr(255) & "cb"
	psUL = Chr(255) & "cu"
End Sub


Private Sub Include(FilePath) '// Thanks imhotep[nu]

	On Error Resume Next
	Set fileStream = psFSO.OpenTextFile(FilePath, 1)
	includeFile = fileStream.ReadAll
	fileStream.Close
	ExecuteGlobal(includeFile)
End Sub


Private Sub AddScript(Prefix, filename, version)

	psPlugins.Add Prefix, filename
	If psVersions.Exists(Prefix) Then
		psVersions.Item(Prefix) = version
	Else
		psVersions.Add Prefix, version
	End If	
	SetSetting Prefix, "enabled", True, "", False
	If eventExists(Prefix, "timer") then
		CreateTimer Prefix, "scripttimer"
	End If
	Include filename
	On Error Resume Next
	Execute(Prefix & "_event_load()")
End Sub
	

Private Function eventExists(Prefix, EventName)

	Set FileStream = psFSO.OpenTextFile(psPlugins.Item(Prefix), 1, False, 0)
	pluginFile = FileStream.ReadAll
	FileStream.Close

	If Instr(LCase(pluginFile), "_" & LCase(EventName)) > 0 Then eventExists = True
End Function


Private Function InternalGetTimerEnabled(arg)

	InternalGetTimerEnabled = psTimerEnabled.Item(arg)
End Function

Private Function tmpTypoSwitch()

	If psFSO.FileExists(BotPath & "plugins\pluginsetings.ini") Then
		Dim OldName, NewName
		AddChat vbBlue, "Fixing plugin typo"
		OldName = BotPath() & "plugins\pluginsetings.ini"
		NewName = BotPath() & "plugins\pluginsettings.ini"
		Call psFSO.CopyFile(OldName, NewName, True)
		AddChat vbGreen, "Fixing typo completed"
		Call psFSO.DeleteFile(OldName)
		AddChat vbGreen, "Deleted old file!"
	End If
End Function

Private Sub pStatusCmd(Username, Message, DisplayID)

	GetDBEntry Username, myAccess, myFlags
	If (Left(Message, 1) = BotVars.Trigger Or Left(Message, 1) = "/") And (myaccess >= 100 or DisplayID = 4) Then
		VetoThisMessage
		statusCmd = Split(Mid(Trim(LCase(Message)), 2))
		If psPlugins.Exists(statusCmd(0)) then
			statusCmd(1) = mid(message, instr(1, message, " ")+1)
			If statusCmd(1) = "on" Then
				If Not GetSetting(statusCmd(0), "enabled") Then
					SetSetting statusCmd(0), "enabled", true, "", true
					dsp DisplayID, "The " & statusCmd(0) & " plugin has been enabled.", username, vbGreen
				Else
					dsp DisplayID, "The " & statusCmd(0) & " plugin is already enabled.", username, vbYellow
				End If		
			ElseIf statusCmd(1) = "off" Then
				If GetSetting(statusCmd(0), "enabled") Then
					SetSetting statusCmd(0), "enabled", false, "", true
					dsp DisplayID, "The " & statusCmd(0) & " plugin has been disabled.", username, vbRed
				Else
					dsp DisplayID, "The " & statusCmd(0) & " plugin is already disabled.", username, vbYellow
				End If
			End If
		End If
	End If
End Sub


Private Sub LoadSettings()
	Call tmpTypoSwitch()
	If psFSO.FileExists("plugins\pluginsettings.ini") Then
		Set psFile = psFSO.OpenTextFile("plugins\pluginsettings.ini", 1)
		Lines = Split(psFile.ReadAll, vbCrLf)
		For Each Line in Lines
			If left(Line,1) = "[" Then
				curPrefix = Mid(Line,2,InStr(Line,"]")-2)
			ElseIf left(Line, 1) = ";" Then
				curComment = Mid(Line,2)
			ElseIf InStr(Line,"=") Then
				temp = Split(Line,"=")
				settingName = temp(0)
				settingValue = temp(1)
				If psSettings.Exists(curPrefix & "::" & settingName) Then
					psSettings.Item(curPrefix & "::" & settingName) = settingValue & "::" & curComment
				Else
					psSettings.Add curPrefix & "::" & settingName, settingValue & "::" & curComment
				End If
				curComment = vbNullString
			End If
		Next
		psFile.Close
	End If
End Sub


Private Sub LoadPlugins()

	'// Make sure we can find the plugins folder
	On Error Resume Next
	Set pluginFolder = psFSO.GetFolder(BotPath() & "plugins\").Files
	If Err.Number <> 0 Then '// This should never happen since we're using BotPath()
		AddChat vbRed, "The Plugin Script encountered a problem while trying to locate your plugins folder."
		Exit Sub
	End If

        '// Load the plugins
	For Each File In pluginFolder
		fileExtension = Mid(File, instrrev(File, ".",-1)+1)

		'// Is it a plug file?
		If LCase(fileExtension) = "plug" then
			Set pluginFile = psfso.OpenTextFile(File, 1)
			curPrefix = Mid(pluginFile.ReadLine(), 2)
			curVersion = Mid(pluginFile.ReadLine(), 2)
			pluginFile.close

			'// Has a plugin with the same prefix already been loaded?
			If psPlugins.Exists(curPrefix) then
				AddChat vbred, "Can not have 2 plugins with the same prefix (2 Plugins have prefix " & curPrefix & ")"
			Else
				'// Load the plugin
				psPlugins.Add curPrefix, File
				psVersions.Add curPrefix, curVersion
				SetSetting curPrefix, "enabled", true, "", false
				If eventExists(curPrefix, "timer") then
					CreateTimer curPrefix, "scripttimer"
				End If
				Include File
			End If
		End If
	Next

	AddChat vbGreen, psPlugins.Count & " plugins loaded. Type /plist in the bot to view them."
	AddChat vbGreen, "Type /updates in the bot to view updates and new plugins that are available for download."
End Sub


Private Sub SaveSettings()

	psKeys = psSettings.Keys
	prefixes = psPlugins.Keys
	psItems = psSettings.Items
	If psFSO.FileExists("plugins\pluginsettings.ini") then
		psFSO.DeleteFile("plugins\pluginsettings.ini")
	End If
	Set psFile = psFSO.OpenTextFile("plugins\pluginsettings.ini", 2, true)
	psFile.WriteLine("[ps]")
	For i = 0 to psSettings.Count - 1
		pstemp = Split(psKeys(i), "::")
		If pstemp(0) = "ps" then
			pstemp2 = split(psItems(i), "::")
			If pstemp2(1) <> "" then
				psFile.WriteLine(vbNewLine & ";" & pstemp2(1))
			End If
			psFile.WriteLine(pstemp(1) & "=" & pstemp2(0))
		End If
	Next
	psFile.WriteLine(vbNewLine & String(50, "_"))
	For j = 0 to psPlugins.Count - 1
		psFile.WriteLine("[" & prefixes(j) & "]")
		For i = 0 to psSettings.count - 1
			pstemp = split(psKeys(i), "::")
			If pstemp(0) = prefixes(j) then
				pstemp2 = split(psItems(i), "::")
				psFile.WriteLine("")
				If pstemp2(1) <> "" then
					psFile.WriteLine(";" & pstemp2(1))
				End If
				psFile.WriteLine(pstemp(1) & "=" & pstemp2(0))
			End If
		Next
		psFile.WriteLine(vbNewLine & String(50, "_"))
	Next
	psFile.Close
End Sub


Private Sub BackUpFile(Path, Name, Version)

	Set FileStream = psFSO.OpenTextFile(Path & Name & ".txt", 1)
	fileContents = FileStream.ReadAll
	FileStream.Close
	backUpFileName = Path & Name & "-backup(v" & Version & ")"
	Do
		i = i + 1
		If Not psFSO.FileExists(backUpFileName & i & ".txt") Then
			Set File = psFSO.OpenTextFile(backUpFileName & i & ".txt", 2, True)
			File.WriteLine(fileContents)
			AddChat vbCyan, "Current " & Name & ".txt file has been backed up in file> " & backUpFileName & i & ".txt"
			Exit Do
		End If
	Loop
End Sub


Private Sub autoUpdatePluginScript()

	'// Get script.txt version on server and user's version
	curPSVersion = scINet.OpenURL(PS_UPDATE_PATH & "sctxtver.txt")
	Set myPluginScript = psFSO.OpenTextFile(BotPath() & "script.txt", 1)
	myPSVersion = Mid(myPluginScript.ReadLine(), 2)
	myPluginScript.close

	'// Is there are new script.txt version available?
	If CDbl(curPSVersion) > CDbl(myPSVersion) Then
		BackUpFile BotPath(), "script", myPSVersion
		AddChat vbBlue, "Downloading update for the plugin script."
		DownloadFile PS_UPDATE_PATH & "script.txt", "script.txt"
		AddChat vbGreen, "Your plugin script has been updated."
		AddChat vbGreen, "Reload your script file by clicking on the settings menu and choosing 'reload script'."
	End If
End Sub


Private Sub autoUpdatePlugins()

	Content = scInet.OpenURL(PS_UPDATE_PATH & "list.txt")
	Lines = Split(Content, vbCrLf)
	For i = 0 to UBound(Lines) - 1
		curLine = Split(Lines(i), "|||")

		script_name = curLine(0)
		script_prefix = curLine(1)
		script_version = curLine(2)
		script_description = curLine(3)

		'// Is there a newer version available for this plugin?
		If psPlugins.Exists(script_prefix) And CDbl(psVersions.Item(script_prefix)) < CDbl(script_version) Then

			updateNow = MsgBox("A new version (v" & script_version & ") is available for your " & script_name & " plugin. Would you " & _
                                           "like to automatically update this plugin now?", vbYesNoCancel + vbQuestion + vbApplicationModal, "New Version Notification")
			If updateNow = vbYes Then
				psPrefix = script_prefix
				Content = scInet.OpenURL(PS_UPDATE_PATH & "pinfo/" & psPrefix & ".txt")

				'// Get the plugin file name
				cvars = Split(Content, "|")
				If Right(cvars(0),1) = "," Then
					cvars(0) = Left(cvars(0), Len(cvars(0)) - 1)
				End If
				File = Split(cvars(0), ",")(0)

				AddChat vbBlue, "Getting File: " & File
				If File <> "" Then
					DownloadFile PS_UPDATE_PATH & File, BotPath() & "Plugins\" & File
				End If

				AddChat vbGreen, "Your " & script_name & " plugin was successfully updated."
				AddChat vbGreen, "You MUST reload the script by clicking on the Settings menu and choosing 'Reload Script'."
			End If
		End If
	Next
End Sub


Private Sub DownloadFile(strURL, strPath) '// Thanks SoCxFiftyToo

	'// Get a byte array from the Given URL
	arrBytes = scINet.OpenURL(cstr(strURL), 1)

	'// Write the data to a file
	Set objWriteFile = psFSO.OpenTextFile(strPath, 2, True)
	objWriteFile.Write byteArr2Str(arrBytes)
	objWriteFile.Close
End Sub


Private Function byteArr2Str(byteInput) '// Thanks SoCxFiftyToo

	Set Stream = CreateObject("ADODB.Stream")
	Stream.Type = 1
	Stream.Open
	Stream.Write byteInput
	Stream.Position = 0
	Stream.Type = 2
	Stream.CharSet = "x-ansi"
	strTemp = Stream.ReadText
	byteArr2Str = strTemp
	Stream.Close
End Function


Private Sub ExecuteEvent(Name, Parameters)

	Err.Clear			
	If Not GetSetting("ps", "debugmode") Then On Error Resume Next

	'// Get plugin prefixes and file paths
	prefixes = psPlugins.Keys
	filePaths = psPlugins.Items

	'// In each plugin execute the specified event with parameter values passed from the event's sub below
	For i = 0 to psPlugins.Count - 1
		If GetSetting(prefixes(i), "enabled") And eventExists(prefixes(i), Name) Then
			If Parameters(0) <> vbNullString Then
				For j = 0 to UBound(Parameters)
					paramString = paramString & "Parameters(" & j & ")" & ","
				Next
				paramString = Left(paramString, Len(paramString)-1)
			End If
			Execute("Call " & prefixes(i) & "_event_" & Name & "(" & paramString & ")")
			If Err.Number <> 0 Then
				AddChat vbRed, Name & " Call Error On File> " & filePaths(i)
				AddChat vbRed, "Error Number: " & err.number & "   Description: " & err.description
				Err.Clear
			End If
		End If
		paramString = vbNullString
	Next
End Sub


'// [[[ EVENTS ]]]

'// Fires when the bot executes.

Sub Event_load()

	'// Load the plugin settings from pluginsettings.ini
	Call LoadSettings()

	'// Create the debug mode status setting
	SetSetting "ps", "debugmode", False, "debugmode stores the debug mode status", False

	'// Create plugins folder if it doesn't exist yet
	If Not psFSO.FolderExists("plugins\") Then
		psFSO.CreateFolder("plugins\")
		AddChat vbgreen, "The plugins folder has been added to your Stealthbot directory."
		AddChat vbgreen, "To use plugins you must place plugin files in that folder and reload your script file."
	End If

	'// Load the plugins
	Call LoadPlugins()

	'// Enable the script timer with 1 second interval
	scTimer.Interval = 1000
	scTimer.Enabled = true

	'// Put chr codes for bold and underlined text in globals
	Call SetChrCodes()

	ExecuteEvent "Load", Array(vbNullString)
	ExecuteEvent "LoadDisplay", Array(vbNullString)
End Sub


'// Fires when the server sends a blue info-type message. (includes ban and kick messages.)

Sub Event_ServerInfo(Message)

	ExecuteEvent "ServerInfo", Array(Message)
End Sub


'// Fires when the server sends a red error-type message. (includes "that user is not logged on." etc.)

Sub Event_ServerError(Message)

	ExecuteEvent "ServerError", Array(Message)
End Sub


'// Fires when a user on battle.net talks.

Sub Event_UserTalk(Username, Flags, Message, Ping)

	If Right(LCase(Message), 3) = " on" Or Right(LCase(Message), 4) = " off" Then pStatusCmd Username,Message,1
	ExecuteEvent "UserTalk", Array(Username,Flags,Message,Ping)
End Sub


'// Fires when a user speaks with /emote.

Sub Event_UserEmote(Username, Flags, Message)

	ExecuteEvent "UserEmote", Array(Username,Flags,Message)
End Sub


'// Fires when a whisper is recieved.

Sub Event_WhisperFromUser(Username, Flags, Message)

	If Right(LCase(Message), 3) = " on" Or Right(LCase(Message), 4) = " off" Then pStatusCmd Username,Message,1
	ExecuteEvent "WhisperFromUser", Array(Username,Flags,Message)
End Sub


'// Fires when a user joins the channel.

Sub Event_UserJoins(Username, Flags, Message, Ping, Product, Level, OriginalStatString)

	ExecuteEvent "UserJoins", Array(Username,Flags,Message,Ping,Product,Level,OriginalStatString)
End Sub


'// Fires when a user leaves the channel.

Sub Event_UserLeaves(Username, Flags)

	ExecuteEvent "UserLeaves", Array(Username,Flags)
End Sub


'// Fires when battle.net updates a user's flags in the channel.

Sub Event_FlagUpdate(Username, NewFlags, Ping)

	ExecuteEvent "FlagUpdate", Array(Username,NewFlags,Ping)
End Sub


'// Fires after a successful login.

Sub Event_LoggedOn(Username, Product)

	'// Delete the update plugin if it still exists
	updatePlugin = BotPath() & "plugins\updatePluginUpdater.plug"
	If psFSO.FileExists(updatePlugin) Then psFSO.DeleteFile(updatePlugin)

	'// Connect to plugin server and check for script.txt and plugin updates
	AddChat vbYellow, "[PLUGIN SERVER] Connecting..."
	testServer = scINet.OpenURL(PS_UPDATE_PATH) 
	If Not(testServer = vbNullString Or InStr(testServer, "page cannot be displayed")) Then
		AddChat vbGreen, "[PLUGIN SERVER] Connected!"
		Call autoUpdatePluginScript()
		Call autoUpdatePlugins()
	Else
		AddChat vbRed, "Please note that the Plugin Server is down at the moment. You will not be able to use the /updates or /getscript commands."
	End If
	
	'// Is bot using D2?
	If Product = "VD2D" Or Product = "PX2D" Then psD2 = "*" Else psD2 = vbNullString End If
	
	ExecuteEvent "LoggedOn", Array(Username,Product)
End Sub


'// Fires once for each user in the channel upon joining a channel.

Sub Event_UserInChannel(Username, Flags, Message, Ping, Product)

	ExecuteEvent "UserInChannel", Array(Username,Flags,Message,Ping,Product)
End Sub


'// Flags in this case stores the channel's flags.

Sub Event_ChannelJoin(ChannelName, Flags)

	ExecuteEvent "ChannelJoin", Array(ChannelName,Flags)
End Sub


'// Executes after the user presses enter in the send box on the bot. Text will always be processed by the bot and sent to battle.net before arriving here.

Sub Event_PressedEnter(Text)

	'* /// Built-In Plugin Script Commands /// *
	If Instr(Text, " ") = 0 Then tmpText = Text & " " Else tmpText = Text End If
	cmd = Split(Trim(LCase(tmpText)), " ")
	
	'* Command to view all new plugins and updates available for download - Thanks SoCxFiftyToo!
	If cmd(0) = "/updates" Or cmd(0) = BotVars.Trigger & "updates" Then
	  	VetoThisMessage
		If psPlugins.Exists("update") Then Exit Sub
		Content = scInet.OpenURL(PS_UPDATE_PATH & "list.txt")
		If Content = vbNullString Or Instr(Content, "page cannot be displayed") Then
			AddChat vbRed, "The plugin server is down. Please try again later."
			Exit Sub
		End If
	 	Lines = Split(Content, vbCrLf)
		AddChat vbWhite, " "
		AddChat vbYellow, psUL & psBold & "Available Scripts For Download"
		AddChat vbGreen, "Green text represents new scripts"
		AddChat vbCyan, "Teal text represents updated scripts"
		For i = 0 to UBound(Lines) - 1
			curLine = Split(Lines(i), "|||")

			script_name = curLine(0)
			script_prefix = curLine(1)
			script_version = curLine(2)
			script_description = curLine(3)

			'// Lets check if we should display this script to the user
			If Not psPlugins.Exists(script_prefix) Then
				'// Script is not installed
				IsAvail = vbGreen
			ElseIf CDbl(psVersions.Item(script_prefix)) < CDbl(script_version) Then
				'// Script is newer than the currently installed version
				IsAvail = vbCyan
			Else
				IsAvail = 0
			End If

			'// Yep, this script should be displayed
			If IsAvail <> 0 Then '// IsAvail will be set to the proper color, or 0 if current version is installed
				AddChat vbWhite, String(58, "-")
				AddChat IsAvail, "Script Name: " & psUL & script_name
				AddChat IsAvail, "Script Version: " & script_version
				AddChat IsAvail, "Description: " & script_description
				AddChat IsAvail, "Prefix: " & psBold & script_prefix
			End If
		Next
		AddChat vbWhite, String(58, "-")
		AddChat vbYellow, "Type /getscript PREFIX (where PREFIX is the prefix of the script that you want)."

	'* Command to download a plugin from the plugin server - Thanks SoCxFiftyToo!
	ElseIf cmd(0) = BotVars.Trigger & "getscript" Or cmd(0) = "/getscript" Then
		If psPlugins.Exists("update") Then Exit Sub
	  	VetoThisMessage
		prefix = Mid(Text, 12)
		serverTest = scInet.OpenURL(PS_UPDATE_PATH)
		If serverTest = vbNullString Or Instr(serverTest, "page cannot be displayed") Then
			AddChat vbRed, "The plugin server is down. Please try again later."
			Exit Sub
		End If
		Content = scInet.OpenURL(PS_UPDATE_PATH & "pinfo/" & prefix & ".txt")
		If Instr(LCase(Content), "the page cannot be found") Then
			AddChat vbRed, "Invalid command: The prefix '" & prefix & "' does not exist."
			AddChat vbRed, "Type /updates to view the prefixes of available plugins."
		Else
			AddChat vbWhite, "*** NOTE ***"
			AddChat vbWhite, "If you get any messages asking to continue execution of the script,"
			AddChat vbWhite, "you MUST hit Continue. Stopping the script WILL CAUSE ERRORS!"

			'// Get the script name
			cvars = Split(Content, "|")
			script_name = cvars(1)

			'// Get the plugin and additional files
			If Right(cvars(0),1) = "," Then
				cvars(0) = Left(cvars(0), Len(cvars(0)) - 1)
			End If
			Files = Split(cvars(0), ",")
			newPluginPath = BotPath() & "Plugins\" & Files(0)

			'// If plugin is currently installed, only download the first file in the list
			'// The first file will always be the actual script.
			If psPlugins.Exists(prefix) Then
				iMax = 0
			Else
				iMax = UBound(Files)
			End If

			'// Get the files needed for the script
			For i = 0 to iMax
				AddChat vbBlue, "Getting File: " & Files(i)
				If Files(i) <> "" Then
					DownloadFile PS_UPDATE_PATH & Files(i), BotPath() & "Plugins\" & Files(i)
				End If
			Next

			'// Is this a new plugin or an update?
			If Not psPlugins.Exists(prefix) Then
				'// We are installing a new script, lets load it up!!
				AddScript prefix, newPluginPath, cvars(2)
				AddChat vbGreen, "The " & script_name & " plugin was installed and loaded successfully."
			Else
				AddChat vbGreen, "The " & script_name & " plugin was updated successfully."
				AddChat vbGreen, "You MUST reload the script by clicking on the Settings menu and choosing 'Reload Script'."
			End If
		End If

	'* Command to turn debugging on/off
	ElseIf cmd(0) = BotVars.Trigger & "debug" Or cmd(0) = "/debug" Then
		VetoThisMessage
		If cmd(1) = "on" Then
			AddChat vbCyan, "Debug Mode has been Enabled."
			psDebugOn = True
			SetSetting "ps", "debugmode", true, "this stores the debug mode status", true
		ElseIf cmd(1) = "off" Then
			AddChat vbCyan, "Debug Mode has been Disabled."
			psDebugOn = False
			SetSetting "ps", "debugmode", false, "this stores the debug mode status", true
		End If

	'* Command to load plugin settings
	ElseIf cmd(0) = BotVars.Trigger & "lset" Or cmd(0) = "/lset" Then
		VetoThisMessage
		AddChat vbyellow, "Loading plugin settings..."
		Call loadsettings()
		AddChat vbgreen, "Settings loaded."

	'* Command to list all plugins currently loaded
	ElseIf cmd(0) = BotVars.Trigger & "plist" Or cmd(0) = "/plist" Then
		VetoThisMessage
		AddChat vbWhite, " ", vbCyan, psBold & "Your Plugin List"
		prefixes = psPlugins.Keys
		pluginFilePaths = psPlugins.Items
		For i = 0 to psPlugins.count - 1
			fileName = Mid(pluginFilePaths(i), InStr(LCase(pluginFilePaths(i)), "plugins\")+8)
			If GetSetting(prefixes(i), "enabled") then
				AddChat vbWhite, String(58, "-")
				AddChat vbBlue, "Prefix:      " & psBold & prefixes(i)
				AddChat vbCyan, "Version:    " & psVersions.Item(prefixes(i))
				AddChat vbCyan, "Filename:  " & fileName
				AddChat vbCyan, "Status:      " & "Enabled"
			Else
				AddChat vbWhite, String(58, "-")
				AddChat vbBlue, "Prefix:      " & psBold & prefixes(i)
				AddChat vbCyan, "Version:    " & psVersions.Item(prefixes(i))
				AddChat vbCyan, "Filename:  " & fileName
				AddChat vbYellow, "Status:      " & "Disabled"				
			End If
		Next

	'* Command to enable/disable plugins
	ElseIf Right(LCase(Text), 3) = " on" Or Right(LCase(Text), 4) = " off" Then
		pStatusCmd BotVars.Username, Text, 4
	End If

	ExecuteEvent "PressedEnter", Array(Text)
End Sub


'// Executes when the bot recieves a profile return from the server.

Sub Event_KeyReturn(KeyName, KeyValue)

	ExecuteEvent "KeyReturn", Array(KeyName,KeyValue)
End Sub


'// Executes when the bot is closed. You can use this sub to write things to disk before the bot shuts down.

Sub Event_Close()

	ExecuteEvent "Close", Array(vbNullString)
	Call SaveSettings()
End Sub


'// [[[ SCRIPT TIMER ]]]

'// Executes every x milliseconds, as set by using its .interval property.

Sub scTimer_Timer()

	pskeys = psTimerEnabled.Keys
	psitems = psTimerEnabled.Items
	Err.Clear			
	If Not GetSetting("ps", "debugmode") then
		On Error Resume Next
	End If

	For i = 0 to psTimerEnabled.count - 1
		If InternalGetTimerEnabled(pskeys(i)) Then
			temp = Split(pskeys(i),"::")
			prefix = temp(0)
			timerName = temp(1)
			If GetSetting(prefix, "enabled") then
				If psTimerCount.Item(pskeys(i)) = 1 then
					Execute(prefix & "_" & timerName & "_timer()")
					If err.number <> 0 And err.number <> 13 Then
						AddChat vbred, "Timer Call Error On Script: prefix> " & prefix & " timername> " & timerName
						AddChat vbred, "Error Number: " & err.number & "   description: "  & err.description
						Err.Clear
					End If
					psTimerCount.Item(pskeys(i)) = psTimerInterval.Item(pskeys(i))
				Else
					psTimerCount.Item(pskeys(i)) = psTimerCount.Item(pskeys(i)) - 1
				End If
			End If
		End If
	Next
End Sub
Khi add xong ,tắt Stealthbot rồi Run lại .
Trong quá trình Connect nếu hiện dòng chữ như bên dưới thì coi như cài đặt Plugin thành công
The plugins folder has been added to your Stealthbot directory.
To use plugins you must place plugin files in that folder and reload your script file.
0 plugins loaded. Type /plist in the bot to view them.
Type /updates in the bot to view updates and new plugins that are available for download.
Trong bảng chính Stealthbot :
_Gõ " /updates "
1 bảng gồm rất nhiều các Script đã được convert thành Plugin
_Gõ " /getscript <prefix> " (prefix chính là kí tự của Script ,ví dụ : để Add Pelt Me Script , gõ " /getscript pm " )
Nếu hiện dòng chữ bên dưới thì Add thành công .
[/quote]*** NOTE ***
If you get any messages asking to continue execution of the script,
you MUST hit Continue. Stopping the script WILL CAUSE ERRORS!
Getting File: pmPeltMe.plug
The Pelt Me plugin was installed and loaded successfully.[/quote]
Tuy nhiên chỉ cần chú ý dòng chữ The Pelt Me plugin was installed and loaded successfully là được rồi .Mấy cái kia có thể sẽ khác đôi chút .
Bạn có thể Add tiếp các đoạn Script tương tự như trên .
Thiết lập Access thì mở file .plus rồi Edit y như Script
 
* Phần 5 : Công cụ hỗ trợ cho Stealthbot
+ Local Hashing
Khi sử dụng Stealthbot , bạn đừng nghĩ rằng việc connect chỉ giữa máy bạn và Battle mà nó còn thông qua trang chủ Stealthbot ,vì thế khi trang Stealthbot down thì đồng nghĩ với việc Soft Stealthbot cũng down theo . Nếu sử dụng Local Hashing , SB sẽ không cần thông qua trang chủ vì vậy việc connect sẽ nhanh hơn rất nhiều và không lo ngại việc SB bị down .
_Download :
Mirror 1
Mirror 2
_Tạo 1 Folder trong thư mục Stealthbot và đặt tên là War3
_Unzip file vừa download và copy các dữ liệu trong đó vào thư mục War3 vừa tạo .
_Run Stealthbot ,chọn Settings ==>Bot Settings ==> Connecttion Settings ==> Advanced . Nhìn qua khung bên phải ,phần Connection Method chọn Advanced - Local Hashing . Xong ấn Apple And Close để thoát .
_Bây giờ Connect lại nếu thấy nhanh hơn là được .

+ Script Add
Ai không thích dùng Plugin , chỉ thích dùng Script thì nên dùng Soft này , nó có thể Add tự động và nối nhiều Script với nhau rất tiện .
_Download : ( phần gửi kèm )
_Unzip ra rồi chạy file Script_Add.exe
Làm theo thao tác dưới đây :
_Script.txt path : chọn dường dẫn tới file script.txt của thư mục Stealthbot .
_Script Name : đặt tên cho Script của bạn .
_Script To Add : Copy và Paste Script vào .
_Sau đó chọn Add Script

+ Plugin Converter
Ngược lại nếu ai thích PLugin thì dùng soft này để convert script thành Plugin
_Download : (phần gửi kèm)
_Unzip ra rồi chạy file Plugin_Converter.exe
Làm theo thao tác dưới đây :
_Plugin Folder : chọn dường dẫn tới thư mục Plugin
_Plugin Name : đặt tên cho Plugin của bạn .
_Script To Conv : Copy và Paste Script vào .
_Sau đó chọn Save as Plugin

+ Script nguyên gốc
Nếu trong quá trình Add script bị lỗi ,bạn nên xoá file script.txt trong thư mục Stealthbot rồi paste file script.txt nguyên gốc vào
_Download ( phần gửi kèm )
 

Attachments

* Phần 6: Giải đáp 1 số câu hỏi thường gặp
Trong phần này ,sẽ có 1 số câu hỏi đã được giải đáp ở các phần trên .Nếu ai không để ý thì vô đây xem lại .
Hỏi : Mỗi lần connect tôi đều bị lỗi này :
[BNLS] Connecting...
[BNLS] Connected!
[BNLS] Authorized!
[BNET] Connecting...
[BNET] Connected!
[BNET] Checking version...
[BNET] Version check failed!
[BNET] BNLS has not been updated yet, or you experienced an error. Try connecting again.
All connections closed
Đáp : Download file này Here ,sau đó Unzip file StealthBot_ Critical Update 5 rồi copy & paste 2 file trong đó vào thư mục Stealthbot .
-----------------------------

Hỏi : Tôi muốn SB tự động Connect mỗi khi tôi bật Sb lên
Đáp : Trong bảng chính SB ,chọn Settings ==> Bot Settings ==> Miscellaneous Settings , nhìn khung bên phải click chọn Connect
On Startup
-----------------------------

Hỏi : Khi 1 user vào hay ra channel thì SB đều đưa tin nhắn Join hoặc Leave ,vậy có cách nào để tắt nó không ?
Đáp : Trong bảng chính SB ,chọn Window ==> Toggle Join/ Leave Messages
-----------------------------

Hỏi : Làm thế nào để Bot gửi thông điệp dạng Whisper ?
Đáp : Trong bảng chính SB ,chọn Settings ==> Bot Settings ==> Miscellaneous Settings , nhìn khung bên phải click chọn Whisper Command Responses .
-----------------------------

Hỏi : Cách nào để Bot tự gửi thông điệp và đặt thời gian giãn cách ?
Đáp : Trong bảng chính SB ,chọn Settings ==> Bot Settings ==> Idle Message Settings ,click chọn Show Anti-idle Messages .Delay Between là thời gian giãn cách và Idle message là thông điệp Bot sẽ gửi lên channel .
-----------------------------

Hỏi : Chỉnh màu sắc và kích cỡ trong bảng chính SB thế nào ?
Đáp : Trong bảng chính SB ,chọn Settings ==> Bot Settings Fonts And Color .THiếp lập các thuộc tính trong đây .
-----------------------------

Hỏi : Tôi đã thiết lập SB rất đúng nhưng Bot không thể chat hay gửi thông điệp trong channel mặc dù tôi có thể thấy user chat trong channel .
Đáp : Lỗi đó là do Cdkey đã bị Mute ,bạn nên tìm 1 Key khác để khắc phục .
-----------------------------

Hỏi : Bot thường bị Ban do member spam quá nhiều .Liệu có cách khắc phục ?
Đáp : Bạn có thể đưa user đó vào danh sách Shitlist .Chọn Settings ==> Edit Files ==> Shitlist ,gõ tên user đó vào .
-----------------------------

Hỏi : Tôi dùng Bot để tạo clan ,nhưng chỉ connect tối đa 7 bot ,làm sao để tăng số Bot lên ?
Đáp : Đó là quy định của Battlenet ,bạn không thể tăng nó lên được ,dù có dùng thêm Proxy .
-----------------------------

Hỏi : Tôi có thể Add Access cho member được không ?
Đáp : Trong bảng chính của SB ,gõ : " /add [username] X " , với username là tên người muốn Add và X là giá trị Add .Ví dụ : " /add Darkgamer 100 "
-----------------------------

Hỏi : Ngoài Script ra, tôi có thể cho Bot gửi thông điệp khi user nhập các lệnh đã được thiết lập .Ví dụ : tôi thiết lặp lệnh là .helpme ,và đoạn text phản hồi là : " Chào mừng Đã Đến với Bot_VN " ,khi user gõ .helpme thì đoạn text đó sẽ được gửi .
Đáp : Trong bảng chính SB , chọn Bot ==> Custom Commands Editor .
Tạo 1 lệnh mới bằng cách click vào New ,khung bên phải nhập đoạn text bạn muốn gửi .Sau đó rename lệnh lại ,nhớ là không có dấu '." .
Nếu muốn Bot Whisper thì thêm đoạn code "/w %m0 vào trước mỗi đoạn text .
 
Status
Không mở trả lời sau này.
Back
Top