user connect script for Ops, VIPs and regs
 

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

user connect script for Ops, VIPs and regs

Started by gOOfus, 11 January, 2004, 21:55:17

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gOOfus

I need a script that states to the hub when Ops, VIPs and Regs join the hub. All I could find was a script that works for VIPs and I couldn't figure out how to change it for all. Could someone help this old noob? :(

kepp

onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"

function NewUserConnected(user)
   if user.iProfile == 3 then
      SendToAll(Bot, user.sName.." "..onENTER)
   elseif user.iProfile == 2 then
       SendToAll(Bot, user.sName.." "..onENTER)
    end
end


function OpConnected(user)
   SendToAll(bot, user.sName.." "..onEnter)
end

function UserDisconnected(user)
    if user.iProfile == 3 then
       SendToAll(Bot, user.sName.." "..onEXIT)
    elseif user.iProfile == 2 then
       SendToAll(Bot, user.sName.. " "..onEXIT)
    end
end

function OpDisconnected()
   SendToAll(Bot, user.sName.." "..onEXIT)
end
Guarding    

Devastator

i tried this script but it doesnt seem to work.

i got the follwing error:

Syntax Error: attempt to index global `user' (a nil value)
Syntax Error: attempt to concat global `onEnter' (a nil value)

which i know nothing abt

also i want 2 try adjust the above script so that users, whetehr they are registered or not reistered the ' has entered message' comes up......also i want to take out the Op enter msg as its not needed for me.

Sorry i'm so rubbish at this but i think i'm graddually learning!

please help

thanx a lot!

Devastator
(? ?.??.->PLOP DEFINATELY 4 MOD!!!<-.??.???)


kepp

#3
onENTER = "-= Has entered the hub =-"

onEXIT = "-= Has left the hub =-"

Bot = "Botname_here"

function NewUserConnected(user)
   user:SendData(Bot, "Welcome user.sName.."\r\nYour IP: "..user.sIP)

   if user.iProfile == 3 then

      SendToAll(Bot, user.sName.." "..onENTER)

   elseif user.iProfile == 2 then

       SendToAll(Bot, user.sName.." "..onENTER)

    end

end

function UserDisconnected(user)

    if user.iProfile == 3 then

       SendToAll(Bot, user.sName.." "..onEXIT)

    elseif user.iProfile == 2 then

       SendToAll(Bot, user.sName.. " "..onEXIT)

    end

end

Sorry, was in a rush.. this should work..i checked for errors and had none so good luck!!
Guarding    

D-J Valhala

#4
kepp please dont give the "-= =-" coz it's was for my hub and i dont whant that other hubs will have the same welcome as in my hub 10x

:P

CyA all
My PsyIsrael Network
==================
--=[PsyIsrael DC Hub]=--
--=[PsyIsrael Website]=--
==================

SaintSinner

QuoteOriginally posted by D-J Valhala
kepp please dont give the "-= =-" coz it's was for my hub and i dont whant that other hubs will have the same welcome as in my hub 10x

:P

CyA all

i dont think you own the copyright to  the "-= =-"
and yours is not the only hub to have that welcome.
   


Devastator

Syntax Error: `)' expected;
  last token read: `\' at line 8 in file ....

again i have no clue i'm jus pointin things out!


its an error thats popped up

if u can fix it thanx a lot m8 (y)
(? ?.??.->PLOP DEFINATELY 4 MOD!!!<-.??.???)


kepp

#7
onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"
Bot = "Botname_here"

function NewUserConnected(user)
   user:SendData(Bot, "Welcome "..user.sName.."\r\nYour IP: "..user.sIP)
   if user.iProfile == 3 then
      SendToAll(Bot, user.sName.." "..onENTER)
   elseif user.iProfile == 2 then
       SendToAll(Bot, user.sName.." "..onENTER)
    end
end

function UserDisconnected(user)
    if user.iProfile == 3 then
       SendToAll(Bot, user.sName.." "..onEXIT)
    elseif user.iProfile == 2 then
       SendToAll(Bot, user.sName.. " "..onEXIT)
    end
end

here.. :S
Guarding    

Devastator

#8
Thanx a lot m8 it works now :D

can u make it so wen all users registered or not registered sign in the same msg shows

sorry 2 b such a pain plz b kind enuff 2 change it so it appears 4 unregistered users 2! plz  :rolleyes:  :rolleyes:  :rolleyes:

Thanx a LoT i apologise 4 bein such a nusiance!

Devastator
(? ?.??.->PLOP DEFINATELY 4 MOD!!!<-.??.???)


gOOfus

Works great, thank you!

Devastator

i'm usin this script but i got

Syntax Error: attempt to concat local `iProfile' (a nil value)

i'm quite sure its with this script try fix this if u can

thanx a lot u guys r gr8!

Devastator
(? ?.??.->PLOP DEFINATELY 4 MOD!!!<-.??.???)


Devastator

cnt n e bodee help me with this?
(? ?.??.->PLOP DEFINATELY 4 MOD!!!<-.??.???)


plop

QuoteOriginally posted by Devastator
i'm usin this script but i got

Syntax Error: attempt to concat local `iProfile' (a nil value)

i'm quite sure its with this script try fix this if u can

thanx a lot u guys r gr8!

Devastator
can't see anything wrong in the script, but it's for testdrive and up.
on icecube it's logical that you get sutch an error, it doesn't have profiles yet.

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Devastator

i dnt use ice cube i use 0.326 TD 4...dunno wat problem is usin Robocop and MasterChat script with it also
(? ?.??.->PLOP DEFINATELY 4 MOD!!!<-.??.???)


plop

QuoteOriginally posted by Devastator
i dnt use ice cube i use 0.326 TD 4...dunno wat problem is usin Robocop and MasterChat script with it also
give this 1 a try, i placed some debugging msg's in it.
hope that can help finding whats going wrong.
onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"
Bot = "Botname_here"



function NewUserConnected(user)
   user:SendData(Bot, "Welcome "..user.sName.."\r\nYour IP: "..user.sIP)
   if user.iProfile then
      if user.iProfile == 3 then
         SendToAll(Bot, user.sName.." "..onENTER)
      elseif user.iProfile == 2 then
         SendToAll(Bot, user.sName.." "..onENTER)
      end
   else
      user:SendData(Bot, "whaaaaaaaaaaaaaaa problem, somehow you don't have a profile.|")
   end
end



function UserDisconnected(user)
   if user.iProfile then
      if user.iProfile == 3 then
         SendToAll(Bot, user.sName.." "..onEXIT)
      elseif user.iProfile == 2 then
         SendToAll(Bot, user.sName.. " "..onEXIT)
      end
   else
      user:SendData(Bot, "whaaaaaaaaaaaaaaa problem, somehow you don't have a profile.|")
   end
end
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Devastator

i jus found out that i get the error when i temp op a user and when they exit the following syntax error appears...

Syntax Error: attempt to concat local `iProfile' (a nil value)

hope that helps u 2 solve ma problem

thanx a lot

Devastator
(? ?.??.->PLOP DEFINATELY 4 MOD!!!<-.??.???)


plop

then this should solve your problem.
onENTER = "-= Has entered the hub =-"
onEXIT = "-= Has left the hub =-"
Bot = "Botname_here"



function NewUserConnected(user)
   user:SendData(Bot, "Welcome "..user.sName.."\r\nYour IP: "..user.sIP)
   if user.iProfile then
      if user.iProfile == 3 then
         SendToAll(Bot, user.sName.." "..onENTER)
      elseif user.iProfile == 2 then
         SendToAll(Bot, user.sName.." "..onENTER)
      end
   end
end



function UserDisconnected(user)
   if user.iProfile then
      if user.iProfile == 3 then
         SendToAll(Bot, user.sName.." "..onEXIT)
      elseif user.iProfile == 2 then
         SendToAll(Bot, user.sName.. " "..onEXIT)
      end
   end
end
plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

Devastator

am gonna keep sayin this until his made mod or until i go mad....sum1 make plop a mod....his just a helping machine he was born 2 help every1!....

Thanx once agen on replyin much appreciated! =)

PLOP 4 MOD!!!

^^^^^^^^

Devastator
(? ?.??.->PLOP DEFINATELY 4 MOD!!!<-.??.???)


SMF spam blocked by CleanTalk