HOW-TO : Write your own Bot = Lesson 1 - Page 2


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

Main Menu

HOW-TO : Write your own Bot = Lesson 1

Started by pHaTTy, 12 October, 2003, 15:42:49

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


Thx for the help Naithif

Quote from: Naithif on 13 November, 2006, 07:57:44
My guess would be that more people read these here than in the wiki

Yup even I agree to this :)
Thanking You,




Quote from: Naithif on 13 November, 2006, 07:01:20
rank = GetProfileName(user.iProfile)
if rank == nil then rank = "User"; user:SendData(Bot,"Welcome "..rank.." "..user.sName)
else user:SendData(Bot,"Welcome "..rank.." User "..user.sName); end

or like this:
user:SendData(Bot,"Welcome "..(GetProfileName(user.iProfile) or "User").." "..user.sName)
Powered By Leviathan™ 2nd Generation v. 1.9


Nice idea :D
I could have shorten it too (not this much though :D), but he asked for "Reg User" and this extension should go only to Reg and VIP


And wat code to show Welcome Operator speedX or Master speedX?
Thanking You,



You can use any of them

rank = GetProfileName(user.iProfile)
user:SendData(Bot,"Welcome "..rank.." "..user.sName)

(No chance for nil because operator on login can't be user :D)

C??o?y??'s code is good as he pasted it there above
user:SendData(Bot,"Welcome "..(GetProfileName(user.iProfile) or "User").." "..user.sName)


is tat possible to add color in words if yes then in this script some error

[21:21] Syntax ... and Settings\SWAGAT.JAGIRDAR\Desktop\New Folder (3)\scripts\welcome.lua:15: ']' expected near '='

Bot = "1st"

function NewUserConnected(user)

SendToAll(Bot,"Welcome our new guest "..user.sName..", enyot your stay")


function OpConnected(user)

SendToAll(Bot,"Welcome our Op "..user.sName.. " hope he enjoys his stay")



no you cannot add colors by scripting
PtokaxWiki ?PtokaX Mirror + latest Libs



Hi does anyone know how I can get into the chat room?

Thank you

SMF spam blocked by CleanTalk