HOW-TO : Write your own Bot = Lesson 1 - 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

HOW-TO : Write your own Bot = Lesson 1

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

Previous topic - Next topic

0 Members and 6 Guests are viewing this topic.

speedX

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,

speedX

Naithif


Cêñoßy†ê

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

Naithif

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

speedX

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

speedX

Naithif

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)

jack_port1000

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")


end

function OpConnected(user)

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


end


Psycho_Chihuahua

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

01100001011011000111001101101111001000000110101101101110011011110111011101101110001000000110000101110011001000000101010001101111011010110110111101101100011011110111001101101000

JamespaX

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

Thank you

SMF spam blocked by CleanTalk