Black Pearl - Page 2
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

Black Pearl

Started by Troubadour, 21 July, 2004, 19:59:34

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Psycho_Chihuahua

updated above post  :D
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

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
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

#27
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
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

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
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

#29
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.
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

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
--------------------------------------------------------------------------------
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Troubadour

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
--------------------------------------------------------------------------------
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

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.
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

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
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

--------- 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
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

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!!!!!!
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

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?
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

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

---------------------------------------------------------
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Troubadour

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
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Troubadour

-- 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 **

Regards,
Troubadour
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

didnt see it at first lol

thnx for the help man really appreciate it

greetz
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

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
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

#42
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
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

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
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

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
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

Troubadour

#45
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
Regards,

Troubadour

** Guardian Forum **

hubaddy:   nederfun.no-ip.com

Psycho_Chihuahua

#46
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  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
PtokaxWiki ?PtokaX Mirror + latest Libs

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

SMF spam blocked by CleanTalk