PtokaX forum

Archive => Archived 5.1 boards => Help with scripts => Topic started by: ruler on 15 April, 2006, 01:40:36

Title: connecting to a hub via script
Post by: ruler on 15 April, 2006, 01:40:36
hi peeps, more of a question than a request.
Is it posible for a script that is run within a hub to connect to another hub? I figure if a client can do it then i see no reason that a script cannot too but maybe i am wrong.
thanks
Title: Re: connecting to a hub via script
Post by: Troubadour on 15 April, 2006, 10:07:12
and what is the use of it, if i may ask?
Title: Re: connecting to a hub via script
Post by: ruler on 16 April, 2006, 01:42:16
ive done very little coding on the client side so i am not sure what limitations it has.
there are several purposes i could have but if it was to be written on the client side then i would be in the wrong section. it is however nice to know what the limitations are when using LUA wether it be client side or hub side.
I figure on the client side i wouldnt need to worry about lock to key sinario and other general connection stuff so i think Mutor is most likley right, client side would be a whole lot easier.

it does however seem strange that on all of these LUA boards ive never seen any topics about connecting to other hubs by using a hub script ;D
Title: Re: connecting to a hub via script
Post by: Dessamator on 16 April, 2006, 11:30:51
Client Side scripting is a nightmare when compared to hub side, some of those functions seem rushed and well, it takes getting used to besides not having all the added API that ptokax has.
Title: Re: connecting to a hub via script
Post by: bluebear on 16 April, 2006, 11:35:24
Its absolutely no problem to connect to a hub from a lua script.. With the first PxWSA release i've included a dchub.lua.
Witch connects to a DirectConnect Protocol server and prints mainchat to screen. You're also allowed to send mainchat with the script.
It runs in ptokax console. The script is not compatible with the newest version of PxWSA, but atm im writing a book; a tutorial for PxWSA witch will contain a upgraded version. I might throw the LockToKey algorithm inside PxUtilities.dll, but it can be done in pure lua with help from PxBITWISE.

I've lost this script myself, but it is possible that it still is located on Plop's cvs/svn!
Title: Re: connecting to a hub via script
Post by: CrazyGuy on 27 May, 2006, 13:45:04
QuoteIs it posible for a script that is run within a hub to connect to another hub?

Are you talking Hub <--> Hub connections ?
Title: Re: connecting to a hub via script
Post by: Snooze on 14 July, 2006, 16:44:10
I've found that creating a client was much easier to manage and would give me more control and possibilities ... I think that bluebear made a guide for that too using VS (bluebear: Correct me if I'm wrong)
Well.. It all comes down to what you wanna use it for ..

Good luck :)
Snooze