Page 6 of 13

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 3:20 pm
by Chrumps
Kandarim wrote:attachment at the time of writing of my post is safe. Chrumps confirmed lost kudos for not including
Code: Select all
      ui.message("Thanks for your password, "+ui.sess.username+"!", GameUI.MsgType.WARNING);

Will do next time, thx.
Heffernan wrote:this is indeed a legitimate question, could plugins read out the password of players?

Assume yes, and much more, beyond game related things. Consider it as risky as running a random code from the internet.

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 3:45 pm
by Kandarim
Chrumps wrote:
Heffernan wrote:this is indeed a legitimate question, could plugins read out the password of players?

Assume yes, and much more, beyond game related things. Consider it as risky as running a random code from the internet.


As far as 'clean' java code is concerned within the client .jar: mostly no. The plug-ins are only loaded once you log a character in, which is after you've input your password. They could access your session key (i.e. the thing that allows 'remembered' accounts to log in without requiring the password) which might or might not allow them to log into your character (I'm not entirely sure whether they could use it to log in).
Minor note on the fact that logging in a character loads the plug-in but never forcibly unloads it. The plug- ins in the first post so far are clean and won't place permanent hooks in the client; shady plug-ins might insert hooks that linger even when logging out. Which means that afterwards, the plug-in might be around when entering your password.

But as Chrumps pointed out: java doesn't have a particularily clean background as far as security is concerned. At some point you have to trust the source of your code, much as you have to do to use a custom client.

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 4:11 pm
by Heffernan
got it loaded in but nothing working? any explanation on how it works?

Image

i stand near torches or braziers and nothing happens when u click it


also Kandarim cant you put Extended icons to the hotkey bar?


EDIT: got it, activate it, hold a woodchop in ur hand, hold shift and press F on the torchpost

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 4:19 pm
by Kandarim
you don't have to press shift afaik. Also, currently extended things cannot go on the hotbar, sadly. I'm pretty sure you can hotkey them with the hotkey system in my client, but I haven't tried yet how to do so.

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 4:38 pm
by Taipion
Heffernan wrote:EDIT: got it, activate it, hold a woodchop in ur hand, hold shift and press F on the torchpost


From the code I'd guess you can skip the "on the torchpost" part, as it should pick the closest fill-able object (that long list in the IF block).

[edit]: And yes, it won't do anything if the hand is empty.

But it does not care what is in your hand, does not matter much as it runs for 1.5 seconds at a time only, but there could be a check for what is in the hand right before the loop, and an appropriate error message if it's not fuel fitting to the closest fuel-able object that was found, but well, I am drifting away... :lol:

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 5:40 pm
by Kandarim
I tend to say '***** it' on most things I implement in my spare time. Mostly I'm programming for myself anyhow, and if my end users end up being idiots then that's no problem of mine :) I think we can all agree that implementing something to do what it should do is the easiest part. Getting it to not do what it shouldn't is the hard part.

moment of clarity: that goes for people and code equally.

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 7:00 pm
by Chrumps
Once again, you do not have to keep shift pressed, but you can if makes you feel better.

Checking what is in hand and how it fits nearest object is like diving into Pandora box. For once everything would be slower, because the code would have to wait for the hand to update.
And now imagine the multibranch IF to check what fuel is cheap enough for each utility.

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 9:14 pm
by Taipion
Chrumps wrote:Once again, you do not have to keep shift pressed, but you can if makes you feel better.

Checking what is in hand and how it fits nearest object is like diving into Pandora box. For once everything would be slower, because the code would have to wait for the hand to update.
And now imagine the multibranch IF to check what fuel is cheap enough for each utility.


You could prepare those lists beforehand, and I doubt it would be either slow (check hand only once every 1.5 seconds) or difficult to do, except for getting those lists/relations straight once.

Re: Plug-in system for Latikai's client

PostPosted: Thu Apr 20, 2017 9:48 pm
by Chrumps
You just do not understand.
I encourage you to write a plugin according to your own recipe.

Kandarim wrote:I tend to say '***** it' on most things I implement in my spare time.

Proven right.

Re: Plug-in system for Latikai's client

PostPosted: Sun Apr 23, 2017 4:16 pm
by Kandarim
The Fuel Plugin is now on the front page, as well as on my github page for easier code-viewing.
On top of Chrump's version, I've added:
- multithreading to stop the client from freezing for the duration of the plugin (honestly, this should probably be part of the sample plugin)
- a check at the start that the user has something on hand to start with

Chrumps wrote:
Kandarim wrote:I tend to say '***** it' on most things I implement in my spare time.

Proven right.


Luckily, not applicable in this case as you've programmed it, not me :)