Login info
 

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

Login info

Started by Alexinno, 16 July, 2006, 15:52:27

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Alexinno

I'm not a lua coder but kinda maid this script because i needed a script to display custom profile names for Master and User
I inspired much from Mutor's scripts? :P? ::)

--[[
 Maybe allready is o bot like this but I maid it because I wanted a script 
? ? ?to display custom profile names Master = Admin and User = Guest
And if anyone else need it , here it is :)
? ? ? InfoBot.v1? ?- inspired from Mutor's Auto-Block 1.0? ? ? ? ?
? ? ? ? ? ? ?16/07/2006? by alexinno
? ? ? ? ? ? ? ? ?Sends custom Userinfo prer profile
? ? ? With this output:<PtokaX> Your info:
? ? ? ? ? ? ? ? ? ? ? ?Nick: User
? ? ? ? ? ? ? ? ? ? ? ?Class : User Profile 
? ? ? ? ? ? ? ? ? ? ? ?IP: User Ip
? ? ? ? ? ? ? ? ? ? ? ?Country Code: [RO]
? ? ? You can add other info's to display for which profile you want, i put the [b]Country Code: [RO][/b] in the info because is a private hub, only for Romania
]]--? ? ? ? ? ? ? ? ? ? 
-- Botname pulled from the hub
Bot = frmHub:GetHubBotName() -- or "BotName-Here"
-- Message to send
function NewUserConnected(user)
? ? ? ?if (user.iProfile == -1) then
	user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : Guest(0) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
? ? ? ?elseif (user.iProfile == 2) then
? ? ? ? ? ? ? ? user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : VIP(2) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
? ? ? ?elseif (user.iProfile == 3) then
? ? ? ? ? ? ? ? user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : Reg(1) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
? ? ? ?end? ? ? 
end

function OpConnected(user)
? ? ? ? if (user.iProfile == 1) then
? ? ? ? ? ? ? ? user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : Op(3) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
? ? ? ? elseif (user.iProfile == 0) then
? ? ? ? ? ? ? ? user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : Admin(4) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
? ? ? ? end
end

Markitos

Hi m8!
Consider this from the Ptokax API
User.
-----
bOperator
bRegistered

UwV

#2
Quote from: Alexinno on 16 July, 2006, 15:52:27
I'm not a lua coder but kinda maid this script because i needed a script to display custom profile names for Master and User

great , way to go :0)
i think we' be seeing more of your work ;0)

btw.. if you are sure there is no other profiles ..
you could do :

-- Message to send
function NewUserConnected(user)
       if (user.iProfile == -1) then
user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : Guest(0) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
       elseif (user.iProfile == 2) then
                user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : VIP(2) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
       else
                user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : Reg(1) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
       end     
end

function OpConnected(user)
        if (user.iProfile == 1) then
                user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : Op(3) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
        else
                user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : Admin(4) \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")
        end
end



ps.
Quote from: Markitos on 16 July, 2006, 16:09:22
Hi m8!
Consider this from the Ptokax API
User.
-----
bOperator
bRegistered



did you ever think about  why there is two arrivals ?
i think this way is nice .. why check bOperator if you  want the profile ID anyway ?
this i think saves a few elseif's in NewUserconnected (no need to look for op's there),
And vice versa for the OpConnected there we need not look for non op profiles.
bRegistered could be used but then he would still need to find the profile ID after that for the other levels..
and " if not user.bRegistered ", or " if  user.iProfile == -1 " saves nothing really.. or does it ?

Markitos ..consider that .
\NL   The knowledge and skills you have achieved are meant to be forgotten so you can float comfortably in emptiness, without obstruction.
" Holly loves me,...  . "      ;o)

& don't forget, the motto is :
  -- SUPPORT YOUR LOCAL DJ'S --

Markitos


Cêñoßy†ê

same with little less txt  ::)
NewNames = {
	[0] = "Admin(4)",
	[1] = "Op(3)",
	[2] = "VIP(2)",
	[3] = "Reg(1)",
	[-1] = "Guest(0)"
}

function NewUserConnected(user)
	user:SendData(Bot,"Your info:\r\n Nick: "..user.sName.." \r\n Class : "..NewNames[user.iProfile].." \r\n IP: "..user.sIP.." \r\n Country Code: [RO]")   
end
OpConnected=NewUserConnected
Powered By Leviathan™ 2nd Generation v. 1.9

jiten

Just as an addition, if you want to use PX's default profile names:

sBot = frmHub:GetHubBotName()

NewUserConnected = function(user)
	user:SendData(sBot, "Your info:\r\nNick: "..user.sName.."\r\nClass : "..(GetProfileName(user.iProfile) or "Guest")..
	" ("..user.iProfile..")\r\nIP: "..user.sIP.."\r\nCountry Code: [RO]")
end

OpConnected = NewUserConnected

Alexinno

like i said before ,i'm not a scripter :P but 10q all guys for the support and for helping me with scripts 
maybe one day i'll become a lua scripter too ;)

SMF spam blocked by CleanTalk