PtokaX forum

Archive => Archived 4.0 boards => Finished Lua 4 scripts => Topic started by: Troubadour on 21 July, 2004, 19:59:34

Title: Black Pearl
Post by: Troubadour on 21 July, 2004, 19:59:34
-- Black Pearl
--------------------------------------------------------------------------------
-- included !myip for users to find out their IP
-- included !myversion to check your client version
-- added !showreg command
-- description, faq, lol, network, rules and oprules txt file reading.
-- script announcer in the mainchat
-- ops and vip announcing in the mainchat
-- welcome to any new user
-- profile based inbuilt hubfunction assignment
-- multiple help files
-- also included inbuilt hub commands
--------------------------------------------------------------------------------

** Download Black-Pearl ** (http://www.djbert.org/Troubadour/Black%20Pearl.rar)

Regards,
Troubadour
Title:
Post by: Psycho_Chihuahua on 25 July, 2004, 19:59:12
Could it be modified to welcome admin with a seperate welcome note?


--------- Op Connected ---------

function OpConnected(user)
SendToAll(BOTName, "[OPS] "..user.sName.." has joined the hub")
end

--------- Op Disconnected ---------

function OpDisconnected(user)
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
end

--------- Vip Disconnected ---------

function UserDisconnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has left the hub")
end
end

---------------- Vip Connected -----------------
function NewUserConnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has joined the hub")
elseif user.iProfile == nil then
SendToNick(BOTName, "Welcome to "..sHubName.." " )
end
end

it would be nice to have the admins/masters in as well please


EDIT

would this work?

function NewUserConnected(user)
if user.iProfile == 0 then
SendToAll(BOTName, "[MASTER] "..user.sName.." has joined the hub")
elseif user.iProfile == nil then
SendToNick(BOTName, "Welcome to "..sHubName.." " )
end
end
Title:
Post by: jackthebest on 25 July, 2004, 20:39:05
function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(Bot,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot," welcome ADMIN  " ..user.sName)
return 1
end
        if user.iProfile == 1 then
user:SendData(Bot,"hi master "..user.sName.." ^_^")
SendToAll(Bot,"Un op ? entrato, salutiamo "..user.sName)
return 1

in alex v 0.9 i use it
p.s alex doesn' t work please help me!

http://board.univ-angers.fr/thread.php?threadid=2444&boardid=6&sid=94ef48862a4d3010b17e0b78600e7a5e
Title:
Post by: Psycho_Chihuahua on 25 July, 2004, 20:47:05
thnx but then i end up with this:

Syntax Error: `end' expected (to close `if' at line 134);
  last token read: `function' at line 141 in file `\ptokax\scripts\Black_Pearl.lua'
Title:
Post by: jackthebest on 25 July, 2004, 20:48:49
QuoteOriginally posted by Psycho_Chihuahua
thnx but then i end up with this:

Syntax Error: `end' expected (to close `if' at line 134);
  last token read: `function' at line 141 in file `\ptokax\scripts\Black_Pearl.lua'

sorry

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(Bot,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot," welcome ADMIN  " ..user.sName)
return 1
end
        if user.iProfile == 1 then
user:SendData(Bot,"hi master "..user.sName.." ^_^")
SendToAll(Bot,"Un op ? entrato, salutiamo "..user.sName)
return 1
end

it' s in italian you can modify it ^_^
Title:
Post by: Psycho_Chihuahua on 25 July, 2004, 21:04:17
tried this:

--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[ADM] "..user.sName.." has joined the hub")
return 1
end
        if user.iProfile == 1 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[OPS] "..user.sName.." has joined the hub")
return 1
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, "[ADM] "..user.sName.." has keft the hub")
return 1
end
        if user.iProfile == 1 then
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
return 1
end

end up with this:
Syntax Error: `end' expected (to close `function' at line 141);
  last token read: `' at line 271 in file `.\ptokax\scripts\Black_Pearl.lua'


**EDIT**

Gone through it again and now got rid of Syntax's with
--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, "[ADM] "..user.sName.." has keft the hub")
return 1
end
        if user.iProfile == 1 then
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
return 1
end

--------- Vip Disconnected ---------

function UserDisconnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has left the hub")
end
end
end

---------------- Vip Connected -----------------
function NewUserConnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has joined the hub")
elseif user.iProfile == nil then
SendToNick(BOTName, "Welcome to "..sHubName.." " )
end
end

thnx alot jackthebest

but it still doesnt show the message at entrance
Title:
Post by: jackthebest on 25 July, 2004, 21:20:36
function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName,"Ecco "..user.sName.." benvenuto")
SendToAll(Bot," welcome ADMIN  " ..user.sName)
return 1
end
        if user.iProfile == 1 then
user:SendData(Bot,"hi master "..user.sName.." ^_^")
SendToAll(BOTName,"Un op ? entrato, salutiamo "..user.sName)
return 1
end

thx to you
Title:
Post by: Psycho_Chihuahua on 25 July, 2004, 21:37:05
still the same prob, im afraid :(


Seems to work now yippie

-- Black Pearl by Troubadour

-- included !myip for users to find out their IP
-- included !myversion to check your client version
-- added !showreg command
-- description, faq, lol, network, rules and oprules txt file reading.
-- script announcer in the mainchat
-- ops and vip announcing in the mainchat
-- welcome to any new user
-- profile based inbuilt hubfunction assignment
-- multiple help files

--------------------------------------------------------------------------------

BOTName ="Black_Pearl"
Version ="Black Pearl"
Creators ="Troubadour"

sUserCount = frmHub:GetUsersCount()
sHubName = frmHub:GetHubName()
sHubDesc = frmHub:GetHubDescr()
sRedirect = frmHub:GetRedirectAddress()
sMaxUsers = frmHub:GetMaxUsers()
sMinShare = frmHub:GetMinShare()/(1024)
sCurrentShare = frmHub:GetCurrentShareAmount()/(1024^3)

ptokaxcommands = {
op = 1, drop = 1, ban = 1, unban = 1, nickban = 1, getbanlist = 1,
getinfo = 1, gag = 1, ungag = 1, banip = 1, ipinfo = 1, iprangeinfo = 1,
userinfo = 1, clrtempban = 1, stat = 1 }

ptokax2commands = {
clrpermban = 1, topic = 1, reloadtxt = 1 }

function Main()
frmHub:UnregBot(BOTName)
frmHub:RegBot(BOTName)
SendToAll("( >>>>  "..Version.." Started"..date(" the %d/%m-%Y at %X ").."  <<<< )")
BOTNameInfo = "$MyINFO $ALL "..BOTName.." <++V:1 Black_Pearl,C:Troubadour> $ $Black Light"..strchar( 1 ).."$black_pearl@dhq-eurotopia.no-ip.com$"
SendToAll(BOTNameInfo)
end

function DataArrival(user, data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
end
if (cmd=="!help") then
if user.iProfile == nil then
SendUserhelp(user)
return 1
elseif user.iProfile == 0 then
SendMasterhelp(user)
return 1
elseif user.iProfile == 1 then
SendOpshelp(user)
return 1
elseif user.iProfile == 2 then
SendViphelp(user)
return 1
elseif user.iProfile == 3 then
SendReghelp(user)
return 1
elseif user.iProfile == 4 then
SendModeratorhelp(user)
return 1
end
elseif (cmd=="!lol") then
SendLol(user)
return 1
elseif (cmd=="!rules") then
SendRules(user)
return 1
elseif (cmd=="!network") then
SendNetwork(user)
return 1
elseif (cmd=="!faq") then
SendFaq(user)
return 1
elseif (cmd=="!description") then
SendDescription(user)
return 1
elseif (cmd=="!showreg") then
showreg(user)
return 1
elseif (cmd == "!myip" ) then
user:SendData(BOTName,"Your ip is: "..user.sIP)
return 1
elseif (cmd == "!myversion" ) then
user:SendData(BOTName,"Your client version is: "..user.iVersion)
return 1
elseif (cmd == "!addreguser") then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
user:SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!me") then
AddAChatter(user)
return 0
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokaxcommands[cmd] then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "you are not allowed to use this command")
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokax2commands[cmd] then
if user.iProfile == 1 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!restartscripts") and user.iProfile == 0 then
return 0
elseif (cmd == "!restart") and user.iProfile == 0 then
return 0
end
end
end


--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(Bot, "[MAS] "..user.sName.." has entered the hub")
return 1
end
        if user.iProfile == 1 then
user:SendData(Bot, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[OPS] "..user.sName.." has entered the hub")
return 1
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, "[MAS] "..user.sName.." has left the hub")
return 1
end
        if user.iProfile == 1 then
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
return 1
end
end

--------- Vip Disconnected ---------

function UserDisconnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has left the hub")
end
end

---------------- Vip Connected -----------------
function NewUserConnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has joined the hub")
elseif user.iProfile == nil then
SendToNick(BOTName, "Welcome to "..sHubName.." " )
end
end

function DoRead(user)
while 1 do
line = read()
if line == nil then break end
user:SendPM(BOTName, line)
end
readfrom()
end

function showreg(user)
user:SendPM(BOTName, "==> Regged users <==")
user:SendPM(BOTName, "_______________________________")
user:SendPM(BOTName, "??? Level\t==> Nick")
user:SendPM(BOTName, "???????????????????????????????")
local allprofiles = GetProfiles()
local index, profile, index2, username, n
for index, profile in allprofiles do
if strlower(profile) ~= strlower("reg") then
n = 0
message = "??? "..profile.."\t==> "
local users = GetUsersByProfile(profile)
for index2, username in users do
if not username or username == "" then
message = nil
elseif n < 3 then
message = message..username.."\t"
n = n + 1
else
user:SendPM(BOTName, message)
message = "??? \t\t==> "..username.."\t"
n = 1
end
end
if message == "??? "..profile.."\t==> " then
message = nil
end
user:SendPM(BOTName, message)
end
end
end

function SendOprules(user)
readfrom("Data/oprules.txt")
DoRead(user)
end

function SendRules(user)
readfrom("Data/rules.txt")
DoRead(user)
end

function SendNetwork(user)
readfrom("Data/network.txt")
DoRead(user)
end

function SendLol(user)
readfrom("Data/lol.txt")
DoRead(user)
end

function SendFaq(user)
readfrom("Data/faq.txt")
DoRead(user)
end

function SendDescription(user)
readfrom("Data/description.txt")
DoRead(user)
end

function SendUserhelp(user)
readfrom("Data/userhelp.txt")
DoRead(user)  
end

function SendMasterhelp(user)
readfrom("Data/masterhelp.txt")
DoRead(user)  
end

function SendOpshelp(user)
readfrom("Data/opshelp.txt")
DoRead(user)  
end

function SendViphelp(user)
readfrom("Data/viphelp.txt")
DoRead(user)
end

function SendReghelp(user)
readfrom("Data/reghelp.txt")
DoRead(user)
end

function SendModeratorhelp(user)
readfrom("Data/moderatorhelp.txt")
DoRead(user)
end

--------------------------------------------------------------------------------
Title:
Post by: Troubadour on 25 July, 2004, 23:31:43
Do it like this


-- Black Pearl by Troubadour

-- included !myip for users to find out their IP
-- included !myversion to check your client version
-- added !showreg command
-- description, faq, lol, network, rules and oprules txt file reading.
-- script announcer in the mainchat
-- ops and vip announcing in the mainchat
-- welcome to any new user
-- profile based inbuilt hubfunction assignment
-- multiple help files

--------------------------------------------------------------------------------

BOTName ="Black_Pearl"
Version ="Black Pearl"
Creators ="Troubadour"

sUserCount = frmHub:GetUsersCount()
sHubName = frmHub:GetHubName()
sHubDesc = frmHub:GetHubDescr()
sRedirect = frmHub:GetRedirectAddress()
sMaxUsers = frmHub:GetMaxUsers()
sMinShare = frmHub:GetMinShare()/(1024)
sCurrentShare = frmHub:GetCurrentShareAmount()/(1024^3)

ptokaxcommands = {
op = 1, drop = 1, ban = 1, unban = 1, nickban = 1, getbanlist = 1,
getinfo = 1, gag = 1, ungag = 1, banip = 1, ipinfo = 1, iprangeinfo = 1,
userinfo = 1, clrtempban = 1, stat = 1 }

ptokax2commands = {
clrpermban = 1, topic = 1, reloadtxt = 1 }

function Main()
frmHub:UnregBot(BOTName)
frmHub:RegBot(BOTName)
SendToAll("( >>>>  "..Version.." Started"..date(" the %d/%m-%Y at %X ").."  <<<< )")
BOTNameInfo = "$MyINFO $ALL "..BOTName.." <++V:1 Black_Pearl,C:Troubadour> $ $Black Light"..strchar( 1 ).."$black_pearl@dhq-eurotopia.no-ip.com$"
SendToAll(BOTNameInfo)
end

function DataArrival(user, data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
end
if (cmd=="!help") then
if user.iProfile == nil then
SendUserhelp(user)
return 1
elseif user.iProfile == 0 then
SendMasterhelp(user)
return 1
elseif user.iProfile == 1 then
SendOpshelp(user)
return 1
elseif user.iProfile == 2 then
SendViphelp(user)
return 1
elseif user.iProfile == 3 then
SendReghelp(user)
return 1
elseif user.iProfile == 4 then
SendModeratorhelp(user)
return 1
end
elseif (cmd=="!lol") then
SendLol(user)
return 1
elseif (cmd=="!rules") then
SendRules(user)
return 1
elseif (cmd=="!network") then
SendNetwork(user)
return 1
elseif (cmd=="!faq") then
SendFaq(user)
return 1
elseif (cmd=="!description") then
SendDescription(user)
return 1
elseif (cmd=="!showreg") then
showreg(user)
return 1
elseif (cmd == "!myip" ) then
user:SendData(BOTName,"Your ip is: "..user.sIP)
return 1
elseif (cmd == "!myversion" ) then
user:SendData(BOTName,"Your client version is: "..user.iVersion)
return 1
elseif (cmd == "!addreguser") then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
user:SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!me") then
AddAChatter(user)
return 0
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokaxcommands[cmd] then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "you are not allowed to use this command")
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokax2commands[cmd] then
if user.iProfile == 1 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!restartscripts") and user.iProfile == 0 then
return 0
elseif (cmd == "!restart") and user.iProfile == 0 then
return 0
end
end
end


--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(Bot, "[MAS] "..user.sName.." has entered the hub")
       elseif user.iProfile == 1 then
user:SendData(Bot, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[OPS] "..user.sName.." has entered the hub")
return 1
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, "[MAS] "..user.sName.." has left the hub")
        elseif user.iProfile == 1 then
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
return 1
end
end

--------- Vip Disconnected ---------

function UserDisconnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has left the hub")
end
end

---------------- Vip Connected -----------------
function NewUserConnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has joined the hub")
elseif user.iProfile == nil then
SendToNick(BOTName, "Welcome to "..sHubName.." " )
end
end

function DoRead(user)
while 1 do
line = read()
if line == nil then break end
user:SendPM(BOTName, line)
end
readfrom()
end

function showreg(user)
user:SendPM(BOTName, "==> Regged users <==")
user:SendPM(BOTName, "_______________________________")
user:SendPM(BOTName, "??? Level\t==> Nick")
user:SendPM(BOTName, "???????????????????????????????")
local allprofiles = GetProfiles()
local index, profile, index2, username, n
for index, profile in allprofiles do
if strlower(profile) ~= strlower("reg") then
n = 0
message = "??? "..profile.."\t==> "
local users = GetUsersByProfile(profile)
for index2, username in users do
if not username or username == "" then
message = nil
elseif n < 3 then
message = message..username.."\t"
n = n + 1
else
user:SendPM(BOTName, message)
message = "??? \t\t==> "..username.."\t"
n = 1
end
end
if message == "??? "..profile.."\t==> " then
message = nil
end
user:SendPM(BOTName, message)
end
end
end

function SendOprules(user)
readfrom("Data/oprules.txt")
DoRead(user)
end

function SendRules(user)
readfrom("Data/rules.txt")
DoRead(user)
end

function SendNetwork(user)
readfrom("Data/network.txt")
DoRead(user)
end

function SendLol(user)
readfrom("Data/lol.txt")
DoRead(user)
end

function SendFaq(user)
readfrom("Data/faq.txt")
DoRead(user)
end

function SendDescription(user)
readfrom("Data/description.txt")
DoRead(user)
end

function SendUserhelp(user)
readfrom("Data/userhelp.txt")
DoRead(user)  
end

function SendMasterhelp(user)
readfrom("Data/masterhelp.txt")
DoRead(user)  
end

function SendOpshelp(user)
readfrom("Data/opshelp.txt")
DoRead(user)  
end

function SendViphelp(user)
readfrom("Data/viphelp.txt")
DoRead(user)
end

function SendReghelp(user)
readfrom("Data/reghelp.txt")
DoRead(user)
end

function SendModeratorhelp(user)
readfrom("Data/moderatorhelp.txt")
DoRead(user)
end

--------------------------------------------------------------------------------
Title:
Post by: Troubadour on 25 July, 2004, 23:33:22
code:--------------------------------------------------------------------------------
function OpConnected(user)
   if user.iProfile == 0 then  
      user:SendData(BOTName,"Ecco "..user.sName.." benvenuto"
      SendToAll(Bot," welcome ADMIN  " ..user.sName)
return 1
   end
        if user.iProfile == 1 then
      user:SendData(Bot,"hi master "..user.sName.." ^_^"
      SendToAll(BOTName,"Un op ? entrato, salutiamo "..user.sName)
return 1
end
--------------------------------------------------------------------------------

should be like


code:--------------------------------------------------------------------------------
function OpConnected(user)
   if user.iProfile == 0 then  
      user:SendData(BOTName,"Ecco "..user.sName.." benvenuto"
      SendToAll(BOTName," welcome ADMIN  " ..user.sName)
        elseif user.iProfile == 1 then
      user:SendData(BOTName,"hi master "..user.sName.." ^_^"
      SendToAll(BOTName,"Un op ? entrato, salutiamo "..user.sName)
return 1
end
--------------------------------------------------------------------------------
Title:
Post by: jackthebest on 26 July, 2004, 07:55:02
in the copy / paste to alex i forgot the Bot ---> BOTname
sorry
Title:
Post by: Troubadour on 26 July, 2004, 12:01:10
also should use more
elseif
instead of
return 1
end
if ..........

just a tip.
Title:
Post by: Psycho_Chihuahua on 26 July, 2004, 21:48:12
thnx alot m8, works fine now.
Title:
Post by: Herodes on 26 July, 2004, 23:17:31
Trobadour,
I have a suggestion to make...
I think it would be much better if u used one function to display any of the text files ...

You can find one in the How To section by Optimus that is quite complete ...
Doing that to your script has saved it from many lines ...
I propose this because first it would be a bit easier to coordinate if you have this script developed further.
and second because it would save some memory .. :)
Title:
Post by: Troubadour on 27 July, 2004, 12:22:37
Thanks for the tip, Herodes.
Indeed it will save memory and the script will reduce in size.
My intention is not to develop this script any further, it was to help someone out, with the basic setup of a script. (as an example)
While i am working on Guardian Nemesis at this moment. (wich we will release this week).
Then i continue with Guardian Corridor.
Once that version is finished, i will decide if i will continue Black Pearl or let someone else take over.
If someone wants to take it over, be my guest.
If i will continue this script, i will use the function for calling all txt files or i will store them in a table (like i did in Guardian).
When there are enough people who want this script to be continued then i will do it from time to time.

Regards,
Troubadour
Title: sum more probs
Post by: Psycho_Chihuahua on 28 July, 2004, 21:53:05
Now i've been trying to get all Levels into the Bot without any luck....

Heres what i've done so there r at least no syntax errors

--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(Bot, "[MAS] "..user.sName.." has entered the hub")
       elseif user.iProfile == 1 then
user:SendData(Bot, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[OPS] "..user.sName.." has entered the hub")
return 1
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, "[MAS] "..user.sName.." has left the hub")
        elseif user.iProfile == 1 then
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
return 1
end
end

--------- Vip Disconnected ---------

function UserDisconnected(user)
if user.iProfile == nil then
SendToAll(BOTName, ""..user.sName.." has left the hub")
        elseif user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has left the hub")
        elseif user.iProfile == 3 then
SendToAll(BOTName, "[REG] "..user.sName.." has left the hub")
return 1
end
end

---------------- Vip Connected -----------------
function NewUserConnected(user)
if user.iProfile == nil then
SendToAll(BOTName, "Welcome to "..sHubName.." " )
elseif user.iProfile == 2 then
SendToNick(BOTName, "[VIP] "..user.sName.." has joined the hub")
elseif user.iProfile == 3 then
SendToNick(BOTName, "[REG] "..user.sName.." has joined the hub")
return 1
end
end

any hints to what i've done wrong?
Title:
Post by: Herodes on 29 July, 2004, 13:13:29
QuoteOriginally posted by Psycho_Chihuahua
Now i've been trying to get all Levels into the Bot without any luck....

Heres what i've done so there r at least no syntax errors

--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(Bot, "[MAS] "..user.sName.." has entered the hub")
       elseif user.iProfile == 1 then
user:SendData(Bot, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[OPS] "..user.sName.." has entered the hub")
return 1
end
end
any hints to what i've done wrong?


In this function I see an mistake that is probably the source of ur problem ...

try return 1 after the end of the if then elseif then sequence...
Or if that dont work then try removing the return 1 completely ..  :)

... I suspect this is the same for the rest of the functions.
Title:
Post by: Optimus on 29 July, 2004, 14:35:48
I think so to
Title: funny
Post by: Psycho_Chihuahua on 29 July, 2004, 18:18:00
It must have been something to do with the formatting or so.....a little shuffling round to:
--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(Bot, "[MAS] "..user.sName.." has entered the hub")
return 1
       elseif user.iProfile == 1 then
user:SendData(Bot, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[OPS] "..user.sName.." has entered the hub")
return 1
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, "[MAS] "..user.sName.." has left the hub")
return 1
       elseif user.iProfile == 1 then
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
return 1
end
end

--------- Vip Disconnected ---------

function UserDisconnected(user)
if user.iProfile == nil then
SendToAll(BOTName, ""..user.sName.." has left the hub")
       elseif user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has left the hub")
       elseif user.iProfile == 3 then
SendToAll(BOTName, "[REG] "..user.sName.." has left the hub")
return 1
end
end

---------------- Vip Connected -----------------
function NewUserConnected(user)
if user.iProfile == nil then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToNick(BOTName, "[VIP] "..user.sName.." has joined the hub")
       elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToNick(BOTName, "[REG] "..user.sName.." has joined the hub")
return 1
end
end
must of done the trick.
Didnt change anything except for some spacing in the VIP part and inserted theuser:SendData(BOTName, "Welcome to "..sHubName.." " ) lines :) no syntax errors and everything working.

thnx u guys for the help :)
Title:
Post by: Optimus on 29 July, 2004, 19:27:04
Well i see no use for the return 1 with the login part.
Title:
Post by: Psycho_Chihuahua on 29 July, 2004, 19:46:03
QuoteOriginally posted by Optimus
Well i see no use for the return 1 with the login part.
yeah, i noticed to. well for a noob like me it all takes a bit longer :)
Title:
Post by: Troubadour on 29 July, 2004, 21:02:42
i will create you an example of entering through profile with random intros.

Regards,
Troubadour
Title:
Post by: Optimus on 29 July, 2004, 23:00:31
Quoteyeah, i noticed to. well for a noob like me it all takes a bit longer :)
No prob Psycho_Chihuahua i understand that. Just dropped by the thread. lol ;)
Title: the result - works
Post by: Psycho_Chihuahua on 30 July, 2004, 23:40:54
--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[MAS] "..user.sName.." has entered the hub")
       elseif user.iProfile == 1 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[OPS] "..user.sName.." has entered the hub")
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, "[MAS] "..user.sName.." has left the hub")
       elseif user.iProfile == 1 then
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
end
end

--------- Vip Disconnected ---------

function UserDisconnected(user)
if user.iProfile == nil then
SendToAll(BOTName, ""..user.sName.." has left the hub")
       elseif user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has left the hub")
       elseif user.iProfile == 3 then
SendToAll(BOTName, "[REG] "..user.sName.." has left the hub")
end
end

---------------- Vip Connected -----------------
function NewUserConnected(user)
if user.iProfile == nil then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToNick(BOTName, "[VIP] "..user.sName.." has joined the hub")
       elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToNick(BOTName, "[REG] "..user.sName.." has joined the hub")
end
end
Finally all works as i wanted  :D
Masters/Operaters/VIP's/Registered and normal Users are now welcomed by the Bot.
Thnx u guys for helping out
Title:
Post by: Troubadour on 30 July, 2004, 23:45:46
check your spelling
it still has Bot instead of BOTName in some places m8.

Regards,
Troubadour
Title: whoops
Post by: Psycho_Chihuahua on 31 July, 2004, 01:04:08
updated above post  :D
Title:
Post by: Troubadour on 31 July, 2004, 10:47:14
QuoteOriginally posted by Psycho_Chihuahua
--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[MAS] "..user.sName.." has entered the hub")
       elseif user.iProfile == 1 then
user:SendData([COLOR=red]Bot[/COLOR] , "Welcome to "..sHubName.." " )
SendToAll(BOTName, "[OPS] "..user.sName.." has entered the hub")
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, "[MAS] "..user.sName.." has left the hub")
       elseif user.iProfile == 1 then
SendToAll(BOTName, "[OPS] "..user.sName.." has left the hub")
end
end

--------- Vip Disconnected ---------

function UserDisconnected(user)
if user.iProfile == nil then
SendToAll(BOTName, ""..user.sName.." has left the hub")
       elseif user.iProfile == 2 then
SendToAll(BOTName, "[VIP] "..user.sName.." has left the hub")
       elseif user.iProfile == 3 then
SendToAll(BOTName, "[REG] "..user.sName.." has left the hub")
end
end

---------------- Vip Connected -----------------
function NewUserConnected(user)
if user.iProfile == nil then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToNick(BOTName, "[VIP] "..user.sName.." has joined the hub")
       elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToNick(BOTName, "[REG] "..user.sName.." has joined the hub")
end
end
Finally all works as i wanted  :D
Masters/Operaters/VIP's/Registered and normal Users are now welcomed by the Bot.
Thnx u guys for helping out

It still has even after you edited the thread.
Look at the colored word to see, where it is.

Regards,
Troubadour
Title: thnx again
Post by: Psycho_Chihuahua on 31 July, 2004, 11:34:52
Troubadour i've now tried implanting your random intro/outro into Black Pearl and i've come out with this.
Havent had time to test yet, but maybe it works :)

--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomMasterEntryMsg(user))
       elseif user.iProfile == 1 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomOPEntryMsg(user))
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, RandomMasterExitMsg(user))
       elseif user.iProfile == 1 then
SendToAll(BOTName, RandomOPExitMsg(user))
end
end

--------- Vip-Reg-NonReg Disconnected ---------

function UserDisconnected(user)
if user.iProfile == nil then
SendToAll(BOTName, RandomEntryMsg(user))
       elseif user.iProfile == 2 then
SendToAll(BOTName, RandomVIPExitMsg(user))
       elseif user.iProfile == 3 then
SendToAll(BOTName, RandomRegExitMsg(user))
end
end

---------------- Vip-Reg-NonReg Connected -----------------
function NewUserConnected(user)
if user.iProfile == nil then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 2 then
SendToAll(BOTName, RandomVIPEntryMsg(user))
user:SendData(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 3 then
SendToAll(BOTName, RandomRegEntryMsg(user))
user:SendData(BOTName, "Welcome to "..sHubName.." " )
end
end

function RandomEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomRegEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomVIPMsgConnect(user)
local randomSeed = random(4)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." is about to get the party started ..."
elseif randomSeed == 4 then
return user.sName.." is happy to be a member of this cool hub!"
end
end

function RandomOPEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please behave cause he is always ready to kick some ....!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's all cheer for him for 5 minutes!"
elseif randomSeed == 3 then
return user.sName.." has entered the spotlights."
elseif randomSeed == 4 then
return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is peeking at you I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
elseif randomSeed == 5 then
return "Looking around in the doorway "..user.sName.." greetz all users with 'Wassup kids.'"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Now there's somebody who knows all!!!"
end
end

function RandomMasterEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please behave cause he is always ready to kick some ....!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's all cheer for him for 5 minutes!"
elseif randomSeed == 3 then
return user.sName.." has entered the spotlights."
elseif randomSeed == 4 then
return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is peeking at you I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
elseif randomSeed == 5 then
return "Looking around in the doorway "..user.sName.." greetz all users with 'Wassup kids.'"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Now there's somebody who knows all!!!"
end
end

function RandomExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomRegExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomVIPMsgExit(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
end
end

function RandomOPExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomMasterExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end
Title:
Post by: Troubadour on 31 July, 2004, 13:07:30
QuoteOriginally posted by Psycho_Chihuahua
Troubadour i've now tried implanting your random intro/outro into Black Pearl and i've come out with this.
Havent had time to test yet, but maybe it works :)

--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomMasterEntryMsg(user))
       elseif user.iProfile == 1 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomOPEntryMsg(user))
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, RandomMasterExitMsg(user))
       elseif user.iProfile == 1 then
SendToAll(BOTName, RandomOPExitMsg(user))
end
end

--------- Vip-Reg-NonReg Disconnected ---------

function UserDisconnected(user)
[COLOR=red]if user.iProfile == nil then
SendToAll(BOTName, RandomEntryMsg(user))        else[/COLOR]if user.iProfile == 2 then
SendToAll(BOTName, RandomVIPExitMsg(user))
       elseif user.iProfile == 3 then
SendToAll(BOTName, RandomRegExitMsg(user))
end
end

---------------- Vip-Reg-NonReg Connected -----------------
function NewUserConnected(user)
if user.iProfile == nil then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
[COLOR=red]SendToAll(BOTName, "Welcome to "..sHubName.." " ) [/COLOR]  
       elseif user.iProfile == 2 then
SendToAll(BOTName, RandomVIPEntryMsg(user))
user:SendData(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 3 then
SendToAll(BOTName, RandomRegEntryMsg(user))
user:SendData(BOTName, "Welcome to "..sHubName.." " )
end
end

function RandomEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomRegEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomVIPMsgConnect(user)
local randomSeed = random(4)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." is about to get the party started ..."
elseif randomSeed == 4 then
return user.sName.." is happy to be a member of this cool hub!"
end
end

function RandomOPEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please behave cause he is always ready to kick some ....!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's all cheer for him for 5 minutes!"
elseif randomSeed == 3 then
return user.sName.." has entered the spotlights."
elseif randomSeed == 4 then
return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is peeking at you I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
elseif randomSeed == 5 then
return "Looking around in the doorway "..user.sName.." greetz all users with 'Wassup kids.'"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Now there's somebody who knows all!!!"
end
end

function RandomMasterEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please behave cause he is always ready to kick some ....!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's all cheer for him for 5 minutes!"
elseif randomSeed == 3 then
return user.sName.." has entered the spotlights."
elseif randomSeed == 4 then
return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is peeking at you I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
elseif randomSeed == 5 then
return "Looking around in the doorway "..user.sName.." greetz all users with 'Wassup kids.'"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Now there's somebody who knows all!!!"
end
end

function RandomExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomRegExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomVIPMsgExit(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
end
end

function RandomOPExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomMasterExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

That should work Psycho_Chihuahua.
But i would not put in the red parts if i was you. (while this can flood the mainchat because many people are not registered and only dropping by and leave in just a moment)

Keep it up and when your finished, please post the result so others can enjoy the new Black-Pearl version too. (You can take over the script if you want to improve further)
I will help you with some parts if needed.

Regards,
Troubadour
Title:
Post by: Psycho_Chihuahua on 01 August, 2004, 11:15:22
took ur advice Toubadour  :D
Yeah i would like to "try" taking over the script as i still have a couple of ideas lol even  though im still an absolut LUA noob.

well like i said i followed ur advice and this is what i have now:
--------- Op Connected ---------

function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomMasterEntryMsg(user))
       elseif user.iProfile == 1 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomOPEntryMsg(user))
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, RandomMasterExitMsg(user))
       elseif user.iProfile == 1 then
SendToAll(BOTName, RandomOPExitMsg(user))
end
end

--------- Vip-Reg Disconnected ---------

function UserDisconnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, RandomVIPExitMsg(user))
       elseif user.iProfile == 3 then
SendToAll(BOTName, RandomRegExitMsg(user))
end
end

---------------- Vip-Reg Connected -----------------
function NewUserConnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, RandomVIPEntryMsg(user))
user:SendData(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 3 then
SendToAll(BOTName, RandomRegEntryMsg(user))
user:SendData(BOTName, "Welcome to "..sHubName.." " )
end
end

function RandomRegEntryMsg(user)
local randomSeed = random(4)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." is about to get the party started ..."
elseif randomSeed == 4 then
return user.sName.." is happy to be a member of this cool hub!"
end
end

function RandomVIPEntryMsg(user)
local randomSeed = random(4)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." is about to get the party started ..."
elseif randomSeed == 4 then
return user.sName.." is happy to be a member of this cool hub!"
end
end

function RandomOPEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please behave cause he is always ready to kick some ....!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's all cheer for him for 5 minutes!"
elseif randomSeed == 3 then
return user.sName.." has entered the spotlights."
elseif randomSeed == 4 then
return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is peeking at you I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
elseif randomSeed == 5 then
return "Looking around in the doorway "..user.sName.." greetz all users with 'Wassup kids.'"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Now there's somebody who knows all!!!"
end
end

function RandomMasterEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please behave cause he is always ready to kick some ....!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's all cheer for him for 5 minutes!"
elseif randomSeed == 3 then
return user.sName.." has entered the spotlights."
elseif randomSeed == 4 then
return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is peeking at you I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
elseif randomSeed == 5 then
return "Looking around in the doorway "..user.sName.." greetz all users with 'Wassup kids.'"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Now there's somebody who knows all!!!"
end
end

function RandomRegMsgExit(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
end
end

function RandomVIPMsgExit(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
end
end

function RandomOPExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomMasterExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end
Busy translating Bot to German as well so proper testing will follow in the next couple of days.
Title:
Post by: Troubadour on 02 August, 2004, 00:35:11
Very well.
Another tip = let the master and the op entrance be different. Also between reg and vip
like this

code:----------------------------------------------------------------------------------------- Op Connected ---------

function OpConnected(user)
   if user.iProfile == 0 then  
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
      SendToAll(BOTName, RandomMasterEntryMsg(user))
       elseif user.iProfile == 1 then
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
      SendToAll(BOTName, RandomOPEntryMsg(user))
   end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
   if user.iProfile == 0 then  
      SendToAll(BOTName, RandomMasterExitMsg(user))
       elseif user.iProfile == 1 then
      SendToAll(BOTName, RandomOPExitMsg(user))
   end
end

--------- Vip-Reg Disconnected ---------

function UserDisconnected(user)
   if user.iProfile == 2 then
      SendToAll(BOTName, RandomVIPExitMsg(user))
       elseif user.iProfile == 3 then
      SendToAll(BOTName, RandomRegExitMsg(user))
   end
end

---------------- Vip-Reg Connected -----------------
function NewUserConnected(user)
   if user.iProfile == 2 then
      SendToAll(BOTName, RandomVIPEntryMsg(user))
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 3 then
      SendToAll(BOTName, RandomRegEntryMsg(user))
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
   end
end

function RandomRegMsgConnect(user)
   local randomSeed = random(4)
   if randomSeed == 1 then
      return user.sName.." rocks the hub with his presence."
   elseif randomSeed == 2 then
      return "Walking down the stairs "..user.sName.." enters the hub!"
   elseif randomSeed == 3 then
      return user.sName.." is about to get the party started ..."
   elseif randomSeed == 4 then
      return user.sName.." is happy to be a member of this cool hub!"
   end
end

function RandomVIPMsgConnect(user)
   local randomSeed = random(4)
   if randomSeed == 1 then
      return user.sName.." really adores this cool place."
   elseif randomSeed == 2 then
      return "Drums are playing while "..user.sName.." enters the hub!"
   elseif randomSeed == 3 then
      return user.sName.." has finally found the fountain of youth ... through sharing...."
   elseif randomSeed == 4 then
      return user.sName.." is pooring drinks for all to enjoy his presence!"
   end
end

function RandomOPEntryMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." has entered the hub. Please give him a hand!"
   elseif randomSeed == 2 then
      return user.sName.." has entered the hub. Let's grab his slots!"
   elseif randomSeed == 3 then
      return user.sName.." tried to make a silence entrance but failed."
   elseif randomSeed == 4 then
      return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is watching  you     I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
   elseif randomSeed == 5 then
      return "Please call my name, because i am "..user.sName.." !!!!!"
   elseif randomSeed == 6 then
      return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
   elseif randomSeed == 7 then
      return "Here is "..user.sName..". Wow look at the move while he's walking in here!"
   end
end

function RandomMasterEntryMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." needs some mistresses, please pm him if you want to ....!"
   elseif randomSeed == 2 then
      return user.sName.." has returned to the scene of the crime!"
   elseif randomSeed == 3 then
      return user.sName.." has entered to chat with all of you."
   elseif randomSeed == 4 then
      return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is looking at you    I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
   elseif randomSeed == 5 then
      return "Who is the man behind the curtains?  Yes it is "..user.sName..".'"
   elseif randomSeed == 6 then
      return "Watch me throw slots at everybody because i am "..user.sName.." the big spender of this hub.!"
   elseif randomSeed == 7 then
      return "Here is "..user.sName.." !"
   end
end

function RandomRegMsgExit(user)
   local randomSeed = random(3)
   if randomSeed == 1 then
      return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
   elseif randomSeed == 2 then
      return "Riding his harley, "..user.sName.." is now riding the freeway."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
   end
end

function RandomVIPMsgExit(user)
   local randomSeed = random(3)
   if randomSeed == 1 then
      return user.sName..", has left the hub!"
   elseif randomSeed == 2 then
      return "Circling on the parkinglot, "..user.sName.." is waiting for people to join him for a ride."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub, shall he return?"
   end
end

function RandomOPExitMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." snaps his fingers and disappears like david copperfield ..."
   elseif randomSeed == 2 then
      return user.sName.." is gone for a ride on the storm ..."
   elseif randomSeed == 3 then
      return user.sName.." took his board and rides the waves now ..."
   elseif randomSeed == 4 then
      return user.sName.." has left the hub and is now howling to the moon!'"
   elseif randomSeed == 5 then
      return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
   elseif randomSeed == 6 then
      return user.sName.." does a elvis presley imitation and has left the building!'"
   elseif randomSeed == 7 then
      return user.sName.." has left the hub, and is taking his absurdly huge share with him."
   end
end

function RandomMasterExitMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." waves his hand and slams the door behind him ..."
   elseif randomSeed == 2 then
      return user.sName.." has left this incredible cool place ..."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub to check his e-mail ..."
   elseif randomSeed == 4 then
      return user.sName.." is chasing cats in the alley!'"
   elseif randomSeed == 5 then
      return "'oh mama!', says "..user.sName.." and left to powder his nose ..."
   elseif randomSeed == 6 then
      return user.sName.." is about to get to drunk to type, so he left the hub!'"
   elseif randomSeed == 7 then
      return user.sName.." has left the hub, to do some weirdo online game."
   end
end
--------------------------------------------------------------------------------
Title:
Post by: Troubadour on 02 August, 2004, 13:21:45
i saw another error i color it red.
see below and change that one.


Quote
code:----------------------------------------------------------------------------------------- Op Connected ---------

function OpConnected(user)
   if user.iProfile == 0 then  
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
      SendToAll(BOTName, RandomMasterEntryMsg(user))
       elseif user.iProfile == 1 then
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
      SendToAll(BOTName, RandomOPEntryMsg(user))
   end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
   if user.iProfile == 0 then  
      SendToAll(BOTName, RandomMasterExitMsg(user))
       elseif user.iProfile == 1 then
      SendToAll(BOTName, RandomOPExitMsg(user))
   end
end

--------- Vip-Reg Disconnected ---------

function UserDisconnected(user)
   if user.iProfile == 2 then
      SendToAll(BOTName, RandomVIPExitMsg(user))
       elseif user.iProfile == 3 then
      SendToAll(BOTName, RandomRegExitMsg(user))
   end
end

---------------- Vip-Reg Connected -----------------
function NewUserConnected(user)
   if user.iProfile == 2 then
      SendToAll(BOTName, RandomVIPEntryMsg(user))
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
       elseif user.iProfile == 3 then
      SendToAll(BOTName, RandomRegEntryMsg(user))       user:SendData(BOTName, "Welcome to "..sHubName.." " )
   end
end

function RandomRegMsgConnect(user)
   local randomSeed = random(4)
   if randomSeed == 1 then
      return user.sName.." rocks the hub with his presence."
   elseif randomSeed == 2 then
      return "Walking down the stairs "..user.sName.." enters the hub!"
   elseif randomSeed == 3 then
      return user.sName.." is about to get the party started ..."
   elseif randomSeed == 4 then
      return user.sName.." is happy to be a member of this cool hub!"
   end
end

function RandomVIPMsgConnect(user)
   local randomSeed = random(4)
   if randomSeed == 1 then
      return user.sName.." really adores this cool place."
   elseif randomSeed == 2 then
      return "Drums are playing while "..user.sName.." enters the hub!"
   elseif randomSeed == 3 then
      return user.sName.." has finally found the fountain of youth ... through sharing...."
   elseif randomSeed == 4 then
      return user.sName.." is pooring drinks for all to enjoy his presence!"
   end
end

function RandomOPEntryMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." has entered the hub. Please give him a hand!"
   elseif randomSeed == 2 then
      return user.sName.." has entered the hub. Let's grab his slots!"
   elseif randomSeed == 3 then
      return user.sName.." tried to make a silence entrance but failed."
   elseif randomSeed == 4 then
      return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is watching  you     I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
   elseif randomSeed == 5 then
      return "Please call my name, because i am "..user.sName.." !!!!!"
   elseif randomSeed == 6 then
      return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
   elseif randomSeed == 7 then
      return "Here is "..user.sName..". Wow look at the move while he's walking in here!"
   end
end

function RandomMasterEntryMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." needs some mistresses, please pm him if you want to ....!"
   elseif randomSeed == 2 then
      return user.sName.." has returned to the scene of the crime!"
   elseif randomSeed == 3 then
      return user.sName.." has entered to chat with all of you."
   elseif randomSeed == 4 then
      return "\r\n\r\n                \\ ~ ~ //\r\n                  ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI       "..user.sName.."      I\r\n     I           Is looking at you    I\r\n-------------------oOO----------------------\r\n               I__I__I\r\n                I I  I I\r\n           nooO Ooo"
   elseif randomSeed == 5 then
      return "Who is the man behind the curtains?  Yes it is "..user.sName..".'"
   elseif randomSeed == 6 then
      return "Watch me throw slots at everybody because i am "..user.sName.." the big spender of this hub.!"
   elseif randomSeed == 7 then
      return "Here is "..user.sName.." !"
   end
end

function RandomRegMsgExit(user)
   local randomSeed = random(3)
   if randomSeed == 1 then
      return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
   elseif randomSeed == 2 then
      return "Riding his harley, "..user.sName.." is now riding the freeway."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
   end
end

function RandomVIPMsgExit(user)
   local randomSeed = random(3)
   if randomSeed == 1 then
      return user.sName..", has left the hub!"
   elseif randomSeed == 2 then
      return "Circling on the parkinglot, "..user.sName.." is waiting for people to join him for a ride."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub, shall he return?"
   end
end

function RandomOPExitMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." snaps his fingers and disappears like david copperfield ..."
   elseif randomSeed == 2 then
      return user.sName.." is gone for a ride on the storm ..."
   elseif randomSeed == 3 then
      return user.sName.." took his board and rides the waves now ..."
   elseif randomSeed == 4 then
      return user.sName.." has left the hub and is now howling to the moon!'"
   elseif randomSeed == 5 then
      return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
   elseif randomSeed == 6 then
      return user.sName.." does a elvis presley imitation and has left the building!'"
   elseif randomSeed == 7 then
      return user.sName.." has left the hub, and is taking his absurdly huge share with him."
   end
end

function RandomMasterExitMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." waves his hand and slams the door behind him ..."
   elseif randomSeed == 2 then
      return user.sName.." has left this incredible cool place ..."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub to check his e-mail ..."
   elseif randomSeed == 4 then
      return user.sName.." is chasing cats in the alley!'"
   elseif randomSeed == 5 then
      return "'oh mama!', says "..user.sName.." and left to powder his nose ..."
   elseif randomSeed == 6 then
      return user.sName.." is about to get to drunk to type, so he left the hub!'"
   elseif randomSeed == 7 then
      return user.sName.." has left the hub, to do some weirdo online game."
   end
end
--------------------------------------------------------------------------------
Title:
Post by: Psycho_Chihuahua on 02 August, 2004, 17:16:35
QuoteOriginally posted by Troubadour
Very well.
Another tip = let the master and the op entrance be different.

Yeah that was the plan, just i'm simultaniously translating into german to so i just copied some of the messages to post the Bot results here  :D

QuoteOriginally posted by Troubadour

i saw another error i color it red.
see below and change that one

yeah, saw that one to and corrected it.
Title:
Post by: Troubadour on 02 August, 2004, 17:53:18
very good, you are improving very well.
i am curious about the german version as well.
Keep it up and you could also release two versions of it.
(german and englisch a.k.a uk)
Take your time to do it (better release as bugfree as quick and buggy)

Regards,
Troubadour
Title:
Post by: Psycho_Chihuahua on 02 August, 2004, 19:31:55
--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, RandomMasterExitMsg(user))
       elseif user.iProfile == 1 then
SendToAll(BOTName, RandomOPExitMsg(user))
end
end

--------- Vip-Reg Disconnected ---------

function UserDisconnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, RandomVIPExitMsg(user))
       elseif user.iProfile == 3 then
SendToAll(BOTName, RandomRegExitMsg(user))
end
end

---------------- Vip-Reg Connected -----------------
function NewUserConnected(user)
if user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomVIPEntryMsg(user))
       elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomRegEntryMsg(user))
end
end

function RandomRegEntryMsg(user)
local randomSeed = random(4)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName...." is about to get the party started ..."
elseif randomSeed == 4 then
return user.sName...." is happy to be a member of this cool hub!"
end
end

function RandomVIPEntryMsg(user)
local randomSeed = random(4)
if randomSeed == 1 then
return user.sName...." really adores this cool place."
elseif randomSeed == 2 then
return user.sName.."Drums are playing while "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName...." has finally found the fountain of youth ... through sharing...."
elseif randomSeed == 4 then
return user.sName...." is pooring drinks for all to enjoy his presence!"
end
end

function RandomOPEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please give him a hand!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's grab his slots!"
elseif randomSeed == 3 then
return user.sName.." tried to make a silence entrance but failed."
elseif randomSeed == 4 then
return "\r\n\r\n \\ ~ ~ //\r\n ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI "..user.sName.." I\r\n I Is watching you I\r\n-------------------oOO----------------------\r\n I__I__I\r\n I I I I\r\n nooO Ooo"
elseif randomSeed == 5 then
return "Please call my name, because i am "..user.sName.." !!!!!"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Wow look at the move while he's walking in here!"
end
end

function RandomMasterEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." needs some mistresses, please pm him if you want to ....!"
elseif randomSeed == 2 then
return user.sName.." has returned to the scene of the crime!"
elseif randomSeed == 3 then
return user.sName.." has entered to chat with all of you."
elseif randomSeed == 4 then
return "\r\n\r\n \\ ~ ~ //\r\n ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI "..user.sName.." I\r\n I Is looking at you I\r\n-------------------oOO----------------------\r\n I__I__I\r\n I I I I\r\n nooO Ooo"
elseif randomSeed == 5 then
return "Who is the man behind the curtains? Yes it is "..user.sName..".'"
elseif randomSeed == 6 then
return "Watch me throw slots at everybody because i am "..user.sName.." the big spender of this hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName.." !"
end
end

function RandomRegExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
end
end

function RandomVIPExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub!"
elseif randomSeed == 2 then
return "Circling on the parkinglot, "..user.sName.." is waiting for people to join him for a ride."
elseif randomSeed == 3 then
return user.sName.." has left the hub, shall he return?"
end
end

function RandomOPExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomMasterExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." waves his hand and slams the door behind him ..."
elseif randomSeed == 2 then
return user.sName.." has left this incredible cool place ..."
elseif randomSeed == 3 then
return user.sName.." has left the hub to check his e-mail ..."
elseif randomSeed == 4 then
return user.sName.." is chasing cats in the alley!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and left to powder his nose ..."
elseif randomSeed == 6 then
return user.sName.." is about to get to drunk to type, so he left the hub!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, to do some weirdo online game."
end
end

function DoRead(user)
while 1 do
line = read()
if line == nil then break end
user:SendPM(BOTName, line)
end
readfrom()
end
should be correct now
Title:
Post by: Troubadour on 03 August, 2004, 00:28:33
Yes it is!
I did not point out this errors

function RandomRegMsgExit(user)
function RandomVIPMsgExit(user)

wich should be

function RandomVIPExitMsg(user)
function RandomRegExitMsg(user)

You found them yourself.
Did that for in case you just used copy\paste without reading it.
Very well spotted, m8
Keep it up!!!!!!
Title: almost there
Post by: Psycho_Chihuahua on 03 August, 2004, 06:18:40
BOTName ="Black_Pearl"
Version ="Black Pearl 1.1 - English"
Creators ="Troubadour, psycho_chihuahua"

sUserCount = frmHub:GetUsersCount()
sHubName = frmHub:GetHubName()
sHubDesc = frmHub:GetHubDescr()
sRedirect = frmHub:GetRedirectAddress()
sMaxUsers = frmHub:GetMaxUsers()
sMinShare = frmHub:GetMinShare()/(1024)
sCurrentShare = frmHub:GetCurrentShareAmount()/(1024^3)

ptokaxcommands = {
op = 1, drop = 1, ban = 1, unban = 1, nickban = 1, getbanlist = 1,
getinfo = 1, gag = 1, ungag = 1, banip = 1, ipinfo = 1, iprangeinfo = 1,
userinfo = 1, clrtempban = 1, stat = 1 }

ptokax2commands = {
clrpermban = 1, topic = 1, reloadtxt = 1 }

function Main()
frmHub:UnregBot(BOTName)
frmHub:RegBot(BOTName)
SendToAll("( >>>>  "..Version.." Started"..date(" the %d/%m-%Y at %X ").."  <<<< )")
BOTNameInfo = "$MyINFO $ALL "..BOTName.." <++V:1.1 Black_Pearl,C:Troubadour> $ $Black Light"..strchar( 1

).."$black_pearl@dhq-eurotopia.no-ip.com$"
SendToAll(BOTNameInfo)
end

function DataArrival(user, data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
end
if (cmd=="!help") then
if user.iProfile == nil then
SendUserhelp(user)
return 1
elseif user.iProfile == 0 then
SendMasterhelp(user)
return 1
elseif user.iProfile == 1 then
SendOpshelp(user)
return 1
elseif user.iProfile == 2 then
SendViphelp(user)
return 1
elseif user.iProfile == 3 then
SendReghelp(user)
return 1
elseif user.iProfile == 4 then
SendModeratorhelp(user)
return 1
end
elseif (cmd=="!lol") then
SendLol(user)
return 1
elseif (cmd=="!rules") then
SendRules(user)
return 1
elseif (cmd=="!network") then
SendNetwork(user)
return 1
elseif (cmd=="!faq") then
SendFaq(user)
return 1
elseif (cmd=="!description") then
SendDescription(user)
return 1
elseif (cmd=="!showreg") then
showreg(user)
return 1
elseif (cmd == "!myip" ) then
user:SendData(BOTName,"Your ip is: "..user.sIP)
return 1
elseif (cmd == "!myversion" ) then
user:SendData(BOTName,"Your client version is: "..user.iVersion)
return 1
elseif (cmd == "!addreguser") then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
user:SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!me") then
AddAChatter(user)
return 0
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokaxcommands[cmd] then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "du bist nicht befugt diesen Befehl auszuf?hren")
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokax2commands[cmd] then
if user.iProfile == 1 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!restartscripts") and user.iProfile == 0 then
return 0
elseif (cmd == "!restart") and user.iProfile == 0 then
return 0
end
end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
if user.iProfile == 0 then  
SendToAll(BOTName, RandomMasterExitMsg(user))
       elseif user.iProfile == 1 then
SendToAll(BOTName, RandomOPExitMsg(user))
end
end

--------- Vip-Reg Disconnected ---------

function UserDisconnected(user)
if user.iProfile == 2 then
SendToAll(BOTName, RandomVIPExitMsg(user))
       elseif user.iProfile == 3 then
SendToAll(BOTName, RandomRegExitMsg(user))
end
end

---------------- Vip-Reg Connected -----------------
function NewUserConnected(user)
if user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomVIPEntryMsg(user))
       elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomRegEntryMsg(user))
end
end

function RandomRegEntryMsg(user)
local randomSeed = random(4)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName...." is about to get the party started ..."
elseif randomSeed == 4 then
return user.sName...." is happy to be a member of this cool hub!"
end
end

function RandomVIPEntryMsg(user)
local randomSeed = random(4)
if randomSeed == 1 then
return user.sName...." really adores this cool place."
elseif randomSeed == 2 then
return user.sName.."Drums are playing while "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName...." has finally found the fountain of youth ... through sharing...."
elseif randomSeed == 4 then
return user.sName...." is pooring drinks for all to enjoy his presence!"
end
end

function RandomOPEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please give him a hand!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's grab his slots!"
elseif randomSeed == 3 then
return user.sName.." tried to make a silence entrance but failed."
elseif randomSeed == 4 then
return "\r\n\r\n \\ ~ ~ //\r\n ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI "..user.sName.." I\r\n I Is

watching you I\r\n-------------------oOO----------------------\r\n I__I__I\r\n I I I I\r\n nooO Ooo"
elseif randomSeed == 5 then
return "Please call my name, because i am "..user.sName.." !!!!!"
elseif randomSeed == 6 then
return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName..". Wow look at the move while he's walking in here!"
end
end

function RandomMasterEntryMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." needs some mistresses, please pm him if you want to ....!"
elseif randomSeed == 2 then
return user.sName.." has returned to the scene of the crime!"
elseif randomSeed == 3 then
return user.sName.." has entered to chat with all of you."
elseif randomSeed == 4 then
return "\r\n\r\n \\ ~ ~ //\r\n ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI "..user.sName.." I\r\n I Is looking at you

I\r\n-------------------oOO----------------------\r\n I__I__I\r\n I I I I\r\n nooO Ooo"
elseif randomSeed == 5 then
return "Who is the man behind the curtains? Yes it is "..user.sName..".'"
elseif randomSeed == 6 then
return "Watch me throw slots at everybody because i am "..user.sName.." the big spender of this hub.!"
elseif randomSeed == 7 then
return "Here is "..user.sName.." !"
end
end

function RandomRegExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
end
end

function RandomVIPExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub!"
elseif randomSeed == 2 then
return "Circling on the parkinglot, "..user.sName.." is waiting for people to join him for a ride."
elseif randomSeed == 3 then
return user.sName.." has left the hub, shall he return?"
end
end

function RandomOPExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
elseif randomSeed == 4 then
return user.sName.." has left the hub and is now howling to the moon!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
elseif randomSeed == 6 then
return user.sName.." does a elvis presley imitation and has left the building!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, and is taking his absurdly huge share with him."
end
end

function RandomMasterExitMsg(user)
local randomSeed = random(7)
if randomSeed == 1 then
return user.sName.." waves his hand and slams the door behind him ..."
elseif randomSeed == 2 then
return user.sName.." has left this incredible cool place ..."
elseif randomSeed == 3 then
return user.sName.." has left the hub to check his e-mail ..."
elseif randomSeed == 4 then
return user.sName.." is chasing cats in the alley!'"
elseif randomSeed == 5 then
return "'oh mama!', says "..user.sName.." and left to powder his nose ..."
elseif randomSeed == 6 then
return user.sName.." is about to get to drunk to type, so he left the hub!'"
elseif randomSeed == 7 then
return user.sName.." has left the hub, to do some weirdo online game."
end
end

function DoRead(user)
while 1 do
line = read()
if line == nil then break end
user:SendPM(BOTName, line)
end
readfrom()
end

function DoRead(user)
while 1 do
line = read()
if line == nil then break end
user:SendPM(BOTName, line)
end
readfrom()
end

function showreg(user)
user:SendPM(BOTName, "==> Regged users <==")
user:SendPM(BOTName, "_______________________________")
user:SendPM(BOTName, "??? Level\t==> Nick")
user:SendPM(BOTName, "???????????????????????????????")
local allprofiles = GetProfiles()
local index, profile, index2, username, n
for index, profile in allprofiles do
if strlower(profile) ~= strlower("reg") then
n = 0
message = "??? "..profile.."\t==> "
local users = GetUsersByProfile(profile)
for index2, username in users do
if not username or username == "" then
message = nil
elseif n < 3 then
message = message..username.."\t"
n = n + 1
else
user:SendPM(BOTName, message)
message = "??? \t\t==> "..username.."\t"
n = 1
end
end
if message == "??? "..profile.."\t==> " then
message = nil
end
user:SendPM(BOTName, message)
end
end
end

function SendOprules(user)
readfrom("Data/oprules.txt")
DoRead(user)
end

function SendRules(user)
readfrom("Data/rules.txt")
DoRead(user)
end

function SendNetwork(user)
readfrom("Data/network.txt")
DoRead(user)
end

function SendLol(user)
readfrom("Data/lol.txt")
DoRead(user)
end

function SendFaq(user)
readfrom("Data/faq.txt")
DoRead(user)
end

function SendDescription(user)
readfrom("Data/description.txt")
DoRead(user)
end

function SendUserhelp(user)
readfrom("Data/userhelp.txt")
DoRead(user)  
end

function SendMasterhelp(user)
readfrom("Data/masterhelp.txt")
DoRead(user)  
end

function SendOpshelp(user)
readfrom("Data/opshelp.txt")
DoRead(user)  
end

function SendViphelp(user)
readfrom("Data/viphelp.txt")
DoRead(user)
end

function SendReghelp(user)
readfrom("Data/reghelp.txt")
DoRead(user)
end

function SendModeratorhelp(user)
readfrom("Data/moderatorhelp.txt")
DoRead(user)
end

I end up with
Syntax Error: `end' expected (to close `if' at line 160);
  last token read: `...' at line 165 in file `X:\ptokax\ptokax\scripts\Black_Pearl.lua'
anyone know what the problem is?
Title:
Post by: Troubadour on 03 August, 2004, 13:58:13
should be like this

--code

BOTName ="Black_Pearl"
Version ="Black Pearl 1.1 - English"
Creators ="Troubadour, psycho_chihuahua"

sUserCount = frmHub:GetUsersCount()
sHubName = frmHub:GetHubName()
sHubDesc = frmHub:GetHubDescr()
sRedirect = frmHub:GetRedirectAddress()
sMaxUsers = frmHub:GetMaxUsers()
sMinShare = frmHub:GetMinShare()/(1024)
sCurrentShare = frmHub:GetCurrentShareAmount()/(1024^3)

ptokaxcommands = {
   op = 1, drop = 1, ban = 1, unban = 1, nickban = 1, getbanlist = 1,
   getinfo = 1, gag = 1, ungag = 1, banip = 1, ipinfo = 1, iprangeinfo = 1,
   userinfo = 1, clrtempban = 1, stat = 1 }

ptokax2commands = {
   clrpermban = 1, topic = 1, reloadtxt = 1 }

function Main()
   frmHub:UnregBot(BOTName)
   frmHub:RegBot(BOTName)
   SendToAll("( >>>>  "..Version.." Started"..date(" the %d/%m-%Y at %X ").."  <<<< )")
   BOTNameInfo = "$MyINFO $ALL "..BOTName.." <++V:1.1 Black_Pearl,C:Troubadour> $ $Black Light"..strchar( 1 ).."$black_pearl@dhq-eurotopia.no-ip.com$"
   SendToAll(BOTNameInfo)
end

function DataArrival(user, data)
   if strsub(data, 1, 1) == "<" then
      data=strsub(data,1,strlen(data)-1)
      s,e,cmd = strfind(data,"%b<>%s+(%S+)")
      end
      if (cmd=="!help") then
         if user.iProfile == nil then
            SendUserhelp(user)
            return 1
         elseif user.iProfile == 0 then
            SendMasterhelp(user)
            return 1
         elseif user.iProfile == 1 then
            SendOpshelp(user)
            return 1
         elseif user.iProfile == 2 then
            SendViphelp(user)
            return 1
         elseif user.iProfile == 3 then
            SendReghelp(user)
            return 1
         elseif user.iProfile == 4 then
            SendModeratorhelp(user)
            return 1
         end
      elseif (cmd=="!lol") then
         SendLol(user)
         return 1
      elseif (cmd=="!rules") then
         SendRules(user)
         return 1
      elseif (cmd=="!network") then
         SendNetwork(user)
         return 1
      elseif (cmd=="!faq") then
         SendFaq(user)
         return 1
      elseif (cmd=="!description") then
         SendDescription(user)
         return 1
      elseif (cmd=="!showreg") then
         showreg(user)
         return 1
      elseif (cmd == "!myip" ) then
         user:SendData(BOTName,"Your ip is: "..user.sIP)
         return 1
      elseif (cmd == "!myversion" ) then
         user:SendData(BOTName,"Your client version is: "..user.iVersion)
         return 1
      elseif (cmd == "!addreguser") then
         if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
            return 0
         elseif user.iProfile == nil then
            user:SendPM(BOTName, "you are not allowed to use this command")
         end
      elseif (cmd == "!me") then
         AddAChatter(user)
         return 0
      end
         local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
         if s and ptokaxcommands[cmd] then
         if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
         return 0
         elseif user.iProfile == nil then
         SendPM(BOTName, "du bist nicht befugt diesen Befehl auszuf?hren")
      end
         local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
         if s and ptokax2commands[cmd] then
         if user.iProfile == 1 or user.iProfile == 4 then
         return 0
         elseif user.iProfile == nil then
         SendPM(BOTName, "you are not allowed to use this command")
      end
      elseif (cmd == "!restartscripts") and user.iProfile == 0 then
         return 0
      elseif (cmd == "!restart") and user.iProfile == 0 then
         return 0
      end
   end
end

--------- Op Disconnected ---------

function OpDisconnected(user)
   if user.iProfile == 0 then  
      SendToAll(BOTName, RandomMasterExitMsg(user))
       elseif user.iProfile == 1 then
      SendToAll(BOTName, RandomOPExitMsg(user))
   end
end

--------- Vip-Reg Disconnected ---------

function UserDisconnected(user)
   if user.iProfile == 2 then
      SendToAll(BOTName, RandomVIPExitMsg(user))
       elseif user.iProfile == 3 then
      SendToAll(BOTName, RandomRegExitMsg(user))
   end
end

---------------- Vip-Reg Connected -----------------
function NewUserConnected(user)
   if user.iProfile == 2 then
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
      SendToAll(BOTName, RandomVIPEntryMsg(user))
       elseif user.iProfile == 3 then
      user:SendData(BOTName, "Welcome to "..sHubName.." " )
      SendToAll(BOTName, RandomRegEntryMsg(user))
   end
end

function RandomRegEntryMsg(user)
   local randomSeed = random(4)
   if randomSeed == 1 then
      return user.sName.." rocks the hub with his presence."
   elseif randomSeed == 2 then
      return "Walking down the stairs "..user.sName.." enters the hub!"
   elseif randomSeed == 3 then
      return user.sName.." is about to get the party started ..."
   elseif randomSeed == 4 then
      return user.sName.." is happy to be a member of this cool hub!"
   end
end

function RandomVIPEntryMsg(user)
   local randomSeed = random(4)
   if randomSeed == 1 then
      return user.sName.." really adores this cool place."
   elseif randomSeed == 2 then
      return user.sName.."Drums are playing while "..user.sName.." enters the hub!"
   elseif randomSeed == 3 then
      return user.sName.." has finally found the fountain of youth ... through sharing...."
   elseif randomSeed == 4 then
      return user.sName.." is pooring drinks for all to enjoy his presence!"
   end
end

function RandomOPEntryMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." has entered the hub. Please give him a hand!"
   elseif randomSeed == 2 then
      return user.sName.." has entered the hub. Let's grab his slots!"
   elseif randomSeed == 3 then
      return user.sName.." tried to make a silence entrance but failed."
   elseif randomSeed == 4 then
      return "\r\n\r\n \\ ~ ~ //\r\n ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI "..user.sName.." I\r\n I Is watching you I\r\n-------------------oOO----------------------\r\n I__I__I\r\n I I I I\r\n nooO Ooo"
   elseif randomSeed == 5 then
      return "Please call my name, because i am "..user.sName.." !!!!!"
   elseif randomSeed == 6 then
      return "Please give him a big welcome! "..user.sName.." has entered the hub.!"
   elseif randomSeed == 7 then
      return "Here is "..user.sName..". Wow look at the move while he's walking in here!"
   end
end

function RandomMasterEntryMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." needs some mistresses, please pm him if you want to ....!"
   elseif randomSeed == 2 then
      return user.sName.." has returned to the scene of the crime!"
   elseif randomSeed == 3 then
      return user.sName.." has entered to chat with all of you."
   elseif randomSeed == 4 then
   return "\r\n\r\n \\ ~ ~ //\r\n ( 0-0 )\r\n----oOO-------(_)--------------------------\r\nI "..user.sName.." I\r\n I Is looking at you I\r\n-------------------oOO----------------------\r\n I__I__I\r\n I I I I\r\n nooO Ooo"
   elseif randomSeed == 5 then
      return "Who is the man behind the curtains? Yes it is "..user.sName..".'"
   elseif randomSeed == 6 then
      return "Watch me throw slots at everybody because i am "..user.sName.." the big spender of this hub.!"
   elseif randomSeed == 7 then
      return "Here is "..user.sName.." !"
   end
end

function RandomRegExitMsg(user)
   local randomSeed = random(3)
   if randomSeed == 1 then
      return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
   elseif randomSeed == 2 then
      return "Riding his harley, "..user.sName.." is now riding the freeway."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
   end
end

function RandomVIPExitMsg(user)
      local randomSeed = random(3)
   if randomSeed == 1 then
      return user.sName..", has left the hub!"
   elseif randomSeed == 2 then
      return "Circling on the parkinglot, "..user.sName.." is waiting for people to join him for a ride."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub, shall he return?"
   end
end

function RandomOPExitMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." snaps his fingers and disappears like david copperfield ..."
   elseif randomSeed == 2 then
      return user.sName.." is gone for a ride on the storm ..."
   elseif randomSeed == 3 then
      return user.sName.." took his board and rides the waves now ..."
   elseif randomSeed == 4 then
      return user.sName.." has left the hub and is now howling to the moon!'"
   elseif randomSeed == 5 then
      return "'oh mama!', says "..user.sName.." and suddenly disappears out off sight ..."
   elseif randomSeed == 6 then
      return user.sName.." does a elvis presley imitation and has left the building!'"
   elseif randomSeed == 7 then
      return user.sName.." has left the hub, and is taking his absurdly huge share with him."
   end
end

function RandomMasterExitMsg(user)
   local randomSeed = random(7)
   if randomSeed == 1 then
      return user.sName.." waves his hand and slams the door behind him ..."
   elseif randomSeed == 2 then
      return user.sName.." has left this incredible cool place ..."
   elseif randomSeed == 3 then
      return user.sName.." has left the hub to check his e-mail ..."
   elseif randomSeed == 4 then
      return user.sName.." is chasing cats in the alley!'"
   elseif randomSeed == 5 then
      return "'oh mama!', says "..user.sName.." and left to powder his nose ..."
   elseif randomSeed == 6 then
      return user.sName.." is about to get to drunk to type, so he left the hub!'"
   elseif randomSeed == 7 then
      return user.sName.." has left the hub, to do some weirdo online game."
   end
end

function DoRead(user)
   while 1 do
      line = read()
      if line == nil then break end
         user:SendPM(BOTName, line)
      end
   readfrom()
end

function showreg(user)
   user:SendPM(BOTName, "==> Regged users <==")
   user:SendPM(BOTName, "_______________________________")
   user:SendPM(BOTName, "??? Level\t==> Nick")
   user:SendPM(BOTName, "???????????????????????????????")
   local allprofiles = GetProfiles()
   local index, profile, index2, username, n
   for index, profile in allprofiles do
      if strlower(profile) ~= strlower("reg") then
         n = 0
         message = "??? "..profile.."\t==> "
         local users = GetUsersByProfile(profile)
         for index2, username in users do
            if not username or username == "" then
               message = nil
            elseif n < 3 then
               message = message..username.."\t"
               n = n + 1
            else
               user:SendPM(BOTName, message)
               message = "??? \t\t==> "..username.."\t"
               n = 1
            end
         end
         if message == "??? "..profile.."\t==> " then
            message = nil
         end
         user:SendPM(BOTName, message)
      end
   end
end

function SendOprules(user)
   readfrom("Data/oprules.txt")
   DoRead(user)
end

function SendRules(user)
   readfrom("Data/rules.txt")
   DoRead(user)
end

function SendNetwork(user)
   readfrom("Data/network.txt")
   DoRead(user)
end

function SendLol(user)
   readfrom("Data/lol.txt")
   DoRead(user)
end

function SendFaq(user)
   readfrom("Data/faq.txt")
   DoRead(user)
end

function SendDescription(user)
   readfrom("Data/description.txt")
   DoRead(user)
end

function SendUserhelp(user)
   readfrom("Data/userhelp.txt")
   DoRead(user)  
end

function SendMasterhelp(user)
   readfrom("Data/masterhelp.txt")
   DoRead(user)  
end

function SendOpshelp(user)
   readfrom("Data/opshelp.txt")
   DoRead(user)  
end

function SendViphelp(user)
   readfrom("Data/viphelp.txt")
   DoRead(user)
end

function SendReghelp(user)
   readfrom("Data/reghelp.txt")
   DoRead(user)
end

function SendModeratorhelp(user)
   readfrom("Data/moderatorhelp.txt")
   DoRead(user)
end

---------------------------------------------------------
Title:
Post by: Troubadour on 03 August, 2004, 13:58:46
I'll tell you wath the problem was.

You had this part.

function RandomRegEntryMsg(user)
   local randomSeed = random(4)
   if randomSeed == 1 then
      return user.sName.." rocks the hub with his presence."
   elseif randomSeed == 2 then
      return "Walking down the stairs "..user.sName.." enters the hub!"
   elseif randomSeed == 3 then
      return user.sName...." is about to get the party started ..."
   elseif randomSeed == 4 then
      return user.sName...." is happy to be a member of this cool hub!"
   end
end

i'll turn the error blue ...


function RandomRegEntryMsg(user)
   local randomSeed = random(4)
   if randomSeed == 1 then
      return user.sName.." rocks the hub with his presence."
   elseif randomSeed == 2 then
      return "Walking down the stairs "..user.sName.." enters the hub!"
   elseif randomSeed == 3 then
      return user.sName.... " is about to get the party started ..."
   elseif randomSeed == 4 then
      return user.sName.... " is happy to be a member of this cool hub!"
   end
end



Regards,
Troubadour
Title:
Post by: Troubadour on 03 August, 2004, 14:18:00
-- Black Pearl
-- Original by Troubadour
-- Taken over by Psycho_chihuahua (bugfixed by Troubadour)

-- Version1.1
-- added random welcome and exit announcement for each profile


** Download Black Pearl 1.1 ** (http://www.plop.nl/ptokaxbots/Troubadour/Black_Pearl1-1.rar)

Regards,
Troubadour
Title: aha
Post by: Psycho_Chihuahua on 03 August, 2004, 18:09:22
didnt see it at first lol

thnx for the help man really appreciate it

greetz
Title:
Post by: Troubadour on 03 August, 2004, 19:05:20
yw, m8
when busy scripting to long your gonna get blind for small typing errors.
sometimes different eyes see it at once! (else mostly you see it the next day yourself).
Keep it up.
I hope you didn't mind that i released your version (Black_Pearl 1.1) allready after bugfixing it.
Now you can continue with 1.2 and higher!

Regards,
Troubadour
Title:
Post by: Psycho_Chihuahua on 03 August, 2004, 20:10:56
QuoteOriginally posted by Troubadour
yw, m8...I hope you didn't mind that i released your version (Black_Pearl 1.1) allready after bugfixing it.
Now you can continue with 1.2 and higher!

Regards,
Troubadour

Na, dont mind at all  :D  im almost through with the German Version as well; just redoing some of the Messages atm otherwise finished.

Yeah i'm sure ther'll be a couple of new versions, it'll just take a while lol
Title:
Post by: Troubadour on 03 August, 2004, 23:22:57
when once starting with a script you'll keep improving and learning.
When your improvements are getting better you'll also will start on new scripts yourself (your getting addicted to it)
When you need any help, just give a call.

Regards,
Troubadour
Title: Small Update
Post by: Psycho_Chihuahua on 06 August, 2004, 11:34:14
Due to a request i've now integrated Hawk's kennylize script.
-- Version1.1b
-- [COLOR=red]minor adjustments to script[/COLOR]
-- [COLOR=blue]added ??????Hawk??????'s kennylize[/COLOR]
-- !kenny to kennylize User
-- !unkenny to unkennylize User
-- !unkennyall to unkennylize all
-- !kennyshow to show kennylized Users
--------------------------------------------------------------------------------

BOTName ="Black_Pearl"
Version ="Black Pearl 1.1b - English"
Creators ="Troubadour, psycho_chihuahua"

sUserCount = frmHub:GetUsersCount()
sHubName = frmHub:GetHubName()
sHubDesc = frmHub:GetHubDescr()
sRedirect = frmHub:GetRedirectAddress()
sMaxUsers = frmHub:GetMaxUsers()
sMinShare = frmHub:GetMinShare()/(1024)
sCurrentShare = frmHub:GetCurrentShareAmount()/(1024^3)

ptokaxcommands = {
op = 1, drop = 1, ban = 1, unban = 1, nickban = 1, getbanlist = 1,
getinfo = 1, gag = 1, ungag = 1, banip = 1, ipinfo = 1, iprangeinfo = 1,
userinfo = 1, clrtempban = 1, stat = 1 }

ptokax2commands = {
clrpermban = 1, topic = 1, reloadtxt = 1 }

function Main()
frmHub:UnregBot(BOTName)
frmHub:RegBot(BOTName)
SendToAll("( >>>> "..Version.." Started"..date(" the %d/%m-%Y at %X ").." <<<< )")
BOTNameInfo = "$MyINFO $ALL "..BOTName.." <++V:1.1b Black_Pearl,C:Troubadour> $ $Black Light"..strchar( 1

).."$black_pearl@dhq-eurotopia.no-ip.com$"
SendToAll(BOTNameInfo)
end

[COLOR=blue]kennytext = {
"*umfl* *uuffum*",
"*lluu* *mlmlff* *umfl* *lfumfl* *umfl*",
"*lmmf* *uullu* *mmmm*",
"*ommlu* *uullu* *lmmf* *ommlu* *mflf*",
"*olomum* *lmmf* *mhhhmmlm*",
"*Mhhl* *mujm* *umfl*",
}
kennylizednicks = {}[/COLOR]

function DataArrival(user, data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
end
if (cmd=="!help") then
if user.iProfile == nil then
SendUserhelp(user)
return 1
elseif user.iProfile == 0 then
SendMasterhelp(user)
return 1
elseif user.iProfile == 1 then
SendOpshelp(user)
return 1
elseif user.iProfile == 2 then
SendViphelp(user)
return 1
elseif user.iProfile == 3 then
SendReghelp(user)
return 1
elseif user.iProfile == 4 then
SendModeratorhelp(user)
return 1
end
elseif (cmd=="!lol") then
SendLol(user)
return 1
elseif (cmd=="!rules") then
SendRules(user)
return 1
elseif (cmd=="!network") then
SendNetwork(user)
return 1
elseif (cmd=="!faq") then
SendFaq(user)
return 1
elseif (cmd=="!description") then
SendDescription(user)
return 1
elseif (cmd=="!showreg") then
showreg(user)
return 1
elseif (cmd == "!myip" ) then
user:SendData(BOTName,"Your ip is: "..user.sIP)
return 1
elseif (cmd == "!myversion" ) then
user:SendData(BOTName,"Your client version is: "..user.iVersion)
return 1
elseif (cmd == "!addreguser") then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
user:SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!me") then
AddAChatter(user)
return 0
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokaxcommands[cmd] then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "du bist nicht befugt diesen Befehl auszuf?hren")
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokax2commands[cmd] then
if user.iProfile == 1 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!restartscripts") and user.iProfile == 0 then
return 0
elseif (cmd == "!restart") and user.iProfile == 0 then
return 0
end
end
end

[COLOR=red]function OpConnected(user)
if user.iProfile == 0 then  
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomMasterEntryMsg(user))
       elseif user.iProfile == 1 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomOPEntryMsg(user))
end
end[/COLOR]
function OpDisconnected(user)
if user.iProfile == 0 then
SendToAll(BOTName, RandomMasterExitMsg(user))
elseif user.iProfile == 1 then
SendToAll(BOTName, RandomOPExitMsg(user))
end
end

function UserDisconnected(user)
if user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomVIPExitMsg(user))
elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomRegExitMsg(user))
end
end

function NewUserConnected(user)
if user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomVIPEntryMsg(user))
elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomRegEntryMsg(user))
end
end

function RandomRegEntryMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." is about to get the party started ..."
end
end

function RandomVIPEntryMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." really adores this cool place."
elseif randomSeed == 2 then
return user.sName.."Drums are playing while "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." has finally found the fountain of youth ... through sharing...."
end
end

function RandomOPEntryMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please give him a hand!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's grab his slots!"
elseif randomSeed == 3 then
return user.sName.." tried to make a silence entrance but failed."
end
end

function RandomMasterEntryMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." needs some mistresses, please pm him if you want to ....!"
elseif randomSeed == 2 then
return user.sName.." has returned to the scene of the crime!"
elseif randomSeed == 3 then
return user.sName.." has entered to chat with all of you."
end
end

function RandomRegExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
end
end

function RandomVIPExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub!"
elseif randomSeed == 2 then
return "Circling on the parkinglot, "..user.sName.." is waiting for people to join him for a ride."
elseif randomSeed == 3 then
return user.sName.." has left the hub, shall he return?"
end
end

function RandomOPExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
end
end

function RandomMasterExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." waves his hand and slams the door behind him ..."
elseif randomSeed == 2 then
return user.sName.." has left this incredible cool place ..."
elseif randomSeed == 3 then
return user.sName.." has left the hub to check his e-mail ..."
end
end

function DoRead(user)
while 1 do
line = read()
if line == nil then break end
user:SendPM(BOTName, line)
end
readfrom()
end

[COLOR=blue]function DataArrival(user, data)
    if (strsub(data,1,1) == "<") then
    data=strsub(data,1,strlen(data)-1)
    s,e,cmd = strfind(data,"%b<>%s+(%S+)")
if user.bOperator then
      if (cmd=="!kenny") then
          kenylize(user, data)
return 1
      elseif (cmd=="!unkenny") then
          Unkenylize(user, data)
return 1
      elseif (cmd=="!showkenny") then
Showkennys(user)
return 1
      elseif (cmd=="!unkennyall") then
kennylizednicks = {}
          SendToAll(BOTName, " all kennys have gone ! ! !")
return 1
      end
end
      if strsub(data,1,1) == "<" then
          if kennylizednicks[user.sName] == 1 then
text=kennytext[random(1, getn(kennytext))]
SendToAll(user.sName, text)
return 1
          end
      end
    end
end

function kenylize(user, data)
local s,e,cmd,usr = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
local kennyd = GetItemByName(usr)
    if kennyd == nil then
      user:SendData(BOTName,"Der User befindet sich nicht im Hub ! ! !")
      else
if kennylizednicks[kennyd.sName] == nil then
          kennylizednicks[kennyd.sName] = 1
          SendToAll(BOTName,kennyd.sName.." Wurde zu einem kenny Klon  ! ! !")
      end
    end
end

function Unkenylize(user, data)
local s,e,cmd,usr = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
local kennyd = GetItemByName(usr)
    if kennyd == nil then
      user:SendData(BOTName,"Der User befindet sich nicht im Hub ! ! !")
    else
      if kennylizednicks[kennyd.sName] == 1 then
          kennylizednicks[kennyd.sName] = nil;
          SendToAll(BOTName, kennyd.sName.." ist zur?ckgekehrt ..")
      end
    end
end

function Showkennys(user)
local names = ""
for index, value in kennylizednicks do
local line = index
names = names.." "..line.."\r\n"
end
user:SendPM(BOTName,"\r\n\r\nkennylised users..\r\n\r\n"..names)

end[/COLOR]
function showreg(user)
user:SendPM(BOTName, "==> Regged users <==")
user:SendPM(BOTName, "_______________________________")
user:SendPM(BOTName, "??? Level\t==> Nick")
user:SendPM(BOTName, "???????????????????????????????")
local allprofiles = GetProfiles()
local index, profile, index2, username, n
for index, profile in allprofiles do
if strlower(profile) ~= strlower("reg") then
n = 0
message = "??? "..profile.."\t==> "
local users = GetUsersByProfile(profile)
for index2, username in users do
if not username or username == "" then
message = nil
elseif n < 3 then
message = message..username.."\t"
n = n + 1
else
user:SendPM(BOTName, message)
message = "??? \t\t==> "..username.."\t"
n = 1
end
end
if message == "??? "..profile.."\t==> " then
message = nil
end
user:SendPM(BOTName, message)
end
end
end

function SendOprules(user)
readfrom("Data/oprules.txt")
DoRead(user)
end

function SendRules(user)
readfrom("Data/rules.txt")
DoRead(user)
end

function SendNetwork(user)
readfrom("Data/network.txt")
DoRead(user)
end

function SendLol(user)
readfrom("Data/lol.txt")
DoRead(user)
end

function SendFaq(user)
readfrom("Data/faq.txt")
DoRead(user)
end

function SendDescription(user)
readfrom("Data/description.txt")
DoRead(user)
end

function SendUserhelp(user)
readfrom("Data/userhelp.txt")
DoRead(user)
end

function SendMasterhelp(user)
readfrom("Data/masterhelp.txt")
DoRead(user)
end

function SendOpshelp(user)
readfrom("Data/opshelp.txt")
DoRead(user)
end

function SendViphelp(user)
readfrom("Data/viphelp.txt")
DoRead(user)
end

function SendReghelp(user)
readfrom("Data/reghelp.txt")
DoRead(user)
end

function SendModeratorhelp(user)
readfrom("Data/moderatorhelp.txt")
DoRead(user)
end
Title:
Post by: Troubadour on 06 August, 2004, 13:05:30
Now you have a double function DataArrival(user,data)
Better do it like this.
------------------------------------------------------------------------

--Version1.1b
-- minor adjustments to script
-- added ??????Hawk??????'s kennylize
-- !kenny to kennylize User
-- !unkenny to unkennylize User
-- !unkennyall to unkennylize all
-- !kennyshow to show kennylized Users
----------------------------------------------------------------------------------

BOTName ="Black_Pearl"
Version ="Black Pearl 1.1b - English"
Creators ="Troubadour, psycho_chihuahua"

sUserCount = frmHub:GetUsersCount()
sHubName = frmHub:GetHubName()
sHubDesc = frmHub:GetHubDescr()
sRedirect = frmHub:GetRedirectAddress()
sMaxUsers = frmHub:GetMaxUsers()
sMinShare = frmHub:GetMinShare()/(1024)
sCurrentShare = frmHub:GetCurrentShareAmount()/(1024^3)

ptokaxcommands = {
op = 1, drop = 1, ban = 1, unban = 1, nickban = 1, getbanlist = 1,
getinfo = 1, gag = 1, ungag = 1, banip = 1, ipinfo = 1, iprangeinfo = 1,
userinfo = 1, clrtempban = 1, stat = 1 }

ptokax2commands = {
clrpermban = 1, topic = 1, reloadtxt = 1 }

function Main()
frmHub:UnregBot(BOTName)
frmHub:RegBot(BOTName)
SendToAll("( >>>> "..Version.." Started"..date(" the %d/%m-%Y at %X ").." <<<< )")
BOTNameInfo = "$MyINFO $ALL "..BOTName.." <++V:1.1b Black_Pearl,C:Troubadour> $ $Black Light"..strchar( 1

).."$black_pearl@dhq-eurotopia.no-ip.com$"
SendToAll(BOTNameInfo)
end

kennytext = {
"*umfl* *uuffum*",
"*lluu* *mlmlff* *umfl* *lfumfl* *umfl*",
"*lmmf* *uullu* *mmmm*",
"*ommlu* *uullu* *lmmf* *ommlu* *mflf*",
"*olomum* *lmmf* *mhhhmmlm*",
"*Mhhl* *mujm* *umfl*",
}
kennylizednicks = {}

function DataArrival(user, data)
if strsub(data, 1, 1) == "<" then
data=strsub(data,1,strlen(data)-1)
s,e,cmd = strfind(data,"%b<>%s+(%S+)")
end
if (cmd=="!help") then
if user.iProfile == nil then
SendUserhelp(user)
return 1
elseif user.iProfile == 0 then
SendMasterhelp(user)
return 1
elseif user.iProfile == 1 then
SendOpshelp(user)
return 1
elseif user.iProfile == 2 then
SendViphelp(user)
return 1
elseif user.iProfile == 3 then
SendReghelp(user)
return 1
elseif user.iProfile == 4 then
SendModeratorhelp(user)
return 1
end
elseif (cmd=="!lol") then
SendLol(user)
return 1
elseif (cmd=="!rules") then
SendRules(user)
return 1
elseif (cmd=="!network") then
SendNetwork(user)
return 1
elseif (cmd=="!faq") then
SendFaq(user)
return 1
elseif (cmd=="!description") then
SendDescription(user)
return 1
elseif (cmd=="!showreg") then
showreg(user)
return 1
elseif (cmd == "!myip" ) then
user:SendData(BOTName,"Your ip is: "..user.sIP)
return 1
elseif (cmd == "!myversion" ) then
user:SendData(BOTName,"Your client version is: "..user.iVersion)
return 1
elseif (cmd == "!addreguser") then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
user:SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!me") then
AddAChatter(user)
return 0
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokaxcommands[cmd] then
if user.iProfile == 1 or user.iProfile == 0 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "du bist nicht befugt diesen Befehl auszuf?hren")
end
local s, e, cmd, args = strfind(data, "^%b<> %!(%a+)%s*(.*)%|$")
if s and ptokax2commands[cmd] then
if user.iProfile == 1 or user.iProfile == 4 then
return 0
elseif user.iProfile == nil then
SendPM(BOTName, "you are not allowed to use this command")
end
elseif (cmd == "!restartscripts") and user.iProfile == 0 then
return 0
elseif (cmd == "!restart") and user.iProfile == 0 then
return 0
   end
  end
   if (strsub(data,1,1) == "<") then
         data=strsub(data,1,strlen(data)-1)
         s,e,cmd = strfind(data,"%b<>%s+(%S+)")
         if user.bOperator then
if (cmd=="!kenny") then
kenylize(user, data)
return 1
elseif (cmd=="!unkenny") then
Unkenylize(user, data)
return 1
elseif (cmd=="!showkenny") then
Showkennys(user)
return 1
elseif (cmd=="!unkennyall") then
kennylizednicks = {}
SendToAll(BOTName, " all kennys have gone ! ! !")
return 1
end
end
if strsub(data,1,1) == "<" then
if kennylizednicks[user.sName] == 1 then
text=kennytext[random(1, getn(kennytext))]
SendToAll(user.sName, text)
return 1
end
end
end
end


function OpConnected(user)
if user.iProfile == 0 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomMasterEntryMsg(user))
elseif user.iProfile == 1 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomOPEntryMsg(user))
end
end

function OpDisconnected(user)
if user.iProfile == 0 then
SendToAll(BOTName, RandomMasterExitMsg(user))
elseif user.iProfile == 1 then
SendToAll(BOTName, RandomOPExitMsg(user))
end
end

function UserDisconnected(user)
if user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomVIPExitMsg(user))
elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomRegExitMsg(user))
end
end

function NewUserConnected(user)
if user.iProfile == 2 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomVIPEntryMsg(user))
elseif user.iProfile == 3 then
user:SendData(BOTName, "Welcome to "..sHubName.." " )
SendToAll(BOTName, RandomRegEntryMsg(user))
end
end

function RandomRegEntryMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." rocks the hub with his presence."
elseif randomSeed == 2 then
return "Walking down the stairs "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." is about to get the party started ..."
end
end

function RandomVIPEntryMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." really adores this cool place."
elseif randomSeed == 2 then
return user.sName.."Drums are playing while "..user.sName.." enters the hub!"
elseif randomSeed == 3 then
return user.sName.." has finally found the fountain of youth ... through sharing...."
end
end

function RandomOPEntryMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." has entered the hub. Please give him a hand!"
elseif randomSeed == 2 then
return user.sName.." has entered the hub. Let's grab his slots!"
elseif randomSeed == 3 then
return user.sName.." tried to make a silence entrance but failed."
end
end

function RandomMasterEntryMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." needs some mistresses, please pm him if you want to ....!"
elseif randomSeed == 2 then
return user.sName.." has returned to the scene of the crime!"
elseif randomSeed == 3 then
return user.sName.." has entered to chat with all of you."
end
end

function RandomRegExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub and took all his available sluts........eh slots with him!"
elseif randomSeed == 2 then
return "Riding his harley, "..user.sName.." is now riding the freeway."
elseif randomSeed == 3 then
return user.sName.." has left the hub, and he's gonna be stinking drunk when he comes back."
end
end

function RandomVIPExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName..", has left the hub!"
elseif randomSeed == 2 then
return "Circling on the parkinglot, "..user.sName.." is waiting for people to join him for a ride."
elseif randomSeed == 3 then
return user.sName.." has left the hub, shall he return?"
end
end

function RandomOPExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." snaps his fingers and disappears like david copperfield ..."
elseif randomSeed == 2 then
return user.sName.." is gone for a ride on the storm ..."
elseif randomSeed == 3 then
return user.sName.." took his board and rides the waves now ..."
end
end

function RandomMasterExitMsg(user)
local randomSeed = random(3)
if randomSeed == 1 then
return user.sName.." waves his hand and slams the door behind him ..."
elseif randomSeed == 2 then
return user.sName.." has left this incredible cool place ..."
elseif randomSeed == 3 then
return user.sName.." has left the hub to check his e-mail ..."
end
end

function DoRead(user)
while 1 do
line = read()
if line == nil then break end
user:SendPM(BOTName, line)
end
readfrom()
end

function kenylize(user, data)
local s,e,cmd,usr = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
local kennyd = GetItemByName(usr)
if kennyd == nil then
user:SendData(BOTName,"Der User befindet sich nicht im Hub ! ! !")
else
if kennylizednicks[kennyd.sName] == nil then
kennylizednicks[kennyd.sName] = 1
SendToAll(BOTName,kennyd.sName.." Wurde zu einem kenny Klon ! ! !")
end
end
end

function Unkenylize(user, data)
local s,e,cmd,usr = strfind(data,"%b<>%s+(%S+)%s+(%S+)")
local kennyd = GetItemByName(usr)
if kennyd == nil then
user:SendData(BOTName,"Der User befindet sich nicht im Hub ! ! !")
else
if kennylizednicks[kennyd.sName] == 1 then
kennylizednicks[kennyd.sName] = nil;
SendToAll(BOTName, kennyd.sName.." ist zur?ckgekehrt ..")
end
end
end

function Showkennys(user)
local names = ""
for index, value in kennylizednicks do
local line = index
names = names.." "..line.."\r\n"
end
user:SendPM(BOTName,"\r\n\r\nkennylised users..\r\n\r\n"..names)

end
function showreg(user)
user:SendPM(BOTName, "==> Regged users <==")
user:SendPM(BOTName, "_______________________________")
user:SendPM(BOTName, "??? Level\t==> Nick")
user:SendPM(BOTName, "???????????????????????????????")
local allprofiles = GetProfiles()
local index, profile, index2, username, n
for index, profile in allprofiles do
if strlower(profile) ~= strlower("reg") then
n = 0
message = "??? "..profile.."\t==> "
local users = GetUsersByProfile(profile)
for index2, username in users do
if not username or username == "" then
message = nil
elseif n < 3 then
message = message..username.."\t"
n = n + 1
else
user:SendPM(BOTName, message)
message = "??? \t\t==> "..username.."\t"
n = 1
end
end
if message == "??? "..profile.."\t==> " then
message = nil
end
user:SendPM(BOTName, message)
end
end
end

function SendOprules(user)
readfrom("Data/oprules.txt")
DoRead(user)
end

function SendRules(user)
readfrom("Data/rules.txt")
DoRead(user)
end

function SendNetwork(user)
readfrom("Data/network.txt")
DoRead(user)
end

function SendLol(user)
readfrom("Data/lol.txt")
DoRead(user)
end

function SendFaq(user)
readfrom("Data/faq.txt")
DoRead(user)
end

function SendDescription(user)
readfrom("Data/description.txt")
DoRead(user)
end

function SendUserhelp(user)
readfrom("Data/userhelp.txt")
DoRead(user)
end

function SendMasterhelp(user)
readfrom("Data/masterhelp.txt")
DoRead(user)
end

function SendOpshelp(user)
readfrom("Data/opshelp.txt")
DoRead(user)
end

function SendViphelp(user)
readfrom("Data/viphelp.txt")
DoRead(user)
end

function SendReghelp(user)
readfrom("Data/reghelp.txt")
DoRead(user)
end

function SendModeratorhelp(user)
readfrom("Data/moderatorhelp.txt")
DoRead(user)
end
Title:
Post by: Psycho_Chihuahua on 22 September, 2004, 00:01:54
hmm found something else here...

A little Traceback from Error backwards


Using this:
GuardianFile = "guarding.p2p"
Error :
Syntax error: table index is nil
stack traceback:
function `LoadTable' at line 374 [file `C:\ptokax\scripts\ZZ_Black_Pearl_1.2_German.lua']
function `Main' at line 46 file `C:\ptokax\scripts\ZZ_Black_Pearl_1.2_German.lua'

line 374 is     ---> _,_,a,b,c,d,e,f,g,h = strfind(r1, "(%d+)%.(%d+)%.(%d+)%.(%d+)-(%d+)%.(%d+)%.(%d+)%.(%d+)")
line 46 is      ---> LoadTable(Guard,GuardianFile)



guarding.p2p (http://methlabs.org/sync/guarding_all.p2p.zip)  is in this Format:

University of New England:129.180.0.0-129.180.255.255
Edinburgh University local area network:129.215.0.0-129.215.255.255
Humboldt-Universitaet zu Berlin:141.20.0.0-141.20.255.255
Kielce University of Technology:81.6.128.0-81.6.191.255
Xi'an Academy of Fine Arts:218.195.16.0-218.195.23.255
Emerson College EDU:199.92.0.0-199.95.255.255
Communities in Schools Inc:4.17.18.64-4.17.18.79
Goucher College:4.17.88.0-4.17.95.255
New Bedford Public Schools EDU:4.17.112.0-4.17.112.255
Champlain College:4.17.113.0-4.17.113.255
Champlain College:4.17.123.0-4.17.123.255

Anyone got an Idea what s wrong? At least now i know why it was using so little resources *lol*

Can someone help me out here, Bots running fine otherwise. and got some other minor changes coming up for next version. I just havent a clue where the mistake here is

Here it is + the rest that belongs to it

function BlockGuard(ip)
local _,_,a,b,c,d = strfind(ip, "(%d+)%.(%d+)%.(%d+)%.(%d+)")
if ( tonumber(a) and tonumber(b) and tonumber(c) and tonumber(d) ) then
local uip = ComputeIP(a)..ComputeIP(b)..ComputeIP(c)..ComputeIP(d)
local ip1,ip2
for r1,comp in Guard do
  _,_,a,b,c,d,e,f,g,h = strfind(r1, "(%d+)%.(%d+)%.(%d+)%.(%d+)-(%d+)%.(%d+)%.(%d+)%.(%d+)")
ip1 = ComputeIP(a)..ComputeIP(b)..ComputeIP(c)..ComputeIP(d)
ip2 = ComputeIP(e)..ComputeIP(f)..ComputeIP(g)..ComputeIP(h)
if tonumber(uip) >= tonumber(ip1) and tonumber(uip) <= tonumber(ip2) then
return 1,comp
end
end
end
end

function ComputeIP(num)
  num = tonumber(num)
if (num < 10) then
return num.."00"
elseif (num < 100) then
return num.."0"
else
return num
end
end

function LoadTable(table,file)
local handle = openfile(file, "r")
if (handle) then
local line = read(handle)
while line do
s,e,comp,ip = strfind(line, "(.+):(%d+%.%d+%.%d+%.%d+-%d+%.%d+%.%d+%.%d+)")
table[ip]=comp
line = read(handle)
end
closefile(handle)
end
end