PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: Exile on 07 January, 2005, 11:28:04

Title: Right Click Help
Post by: Exile on 07 January, 2005, 11:28:04
I have a  right-click menu for the hub bot that i am developing. I also have 'Prefix' as a variable in the GUI I am building for it...I was wondering how I would write the right-click commands because if the prefix is changed in the GUI, my current setup wont work  ?( . This is what I have atm:

OpConnected = NewUserConnected

function customCMDS(user)
user:SendData("$UserCommand 255 7") -- Clears Right-Click Menu First
user:SendData("$UserCommand 1 3 Evil-Eye Right-Click Menu\\Current Version $<%[mynick]> "..Version.." %[line:BotNick]||")
end

i was wondering if the following would work...

OpConnected = NewUserConnected

function customCMDS(user)
user:SendData("$UserCommand 255 7") -- Clears Right-Click Menu First
user:SendData("$UserCommand 1 3 Evil-Eye Right-Click Menu\\Current Version $<%[mynick]> "Prefix""..Version.." %[line:BotNick]||")
end

Any help is great help, thankyou

Truly,

Exile
Title:
Post by: nErBoS on 07 January, 2005, 14:27:42
Hi,

You have to consider the prefix has a var. For eg...

OpConnected = NewUserConnected

function customCMDS(user)
user:SendData("$UserCommand 255 7") -- Clears Right-Click Menu First
user:SendData("$UserCommand 1 3 Evil-Eye Right-Click Menu\\Current Version $<%[mynick]> "..Prefix..Version.." %[line:BotNick]||")
end

Best regards, nErBoS
Title: Duuuuuuuuh!
Post by: Exile on 07 January, 2005, 19:32:44
I am so dumb sumtimes, Just after I posted I started looking at my script and I just noticed your point, Thanks for your help Nerbos :D

Truly,

Exile