info about command variables

This is not a Support area! Discuss about the Server here. Non-Server related discussion goes in Off-Topic Discussion.
Forum rules
READ NOW: L2j Forums Rules of Conduct
Post Reply
User avatar
Sikken
Posts: 53
Joined: Sat Sep 05, 2009 10:03 pm

info about command variables

Post by Sikken »

is it possible to add a substring to a voiced command? example : .bank 7, notice there is a space between the .bank, and the 7. hopefully this can allow a player to deposit x amount of gold bars, x substituted as 7 in my example. this could also work for .withdraw and many other commands.

it works with //recall characterName , so it should work for voiced, if i get it working, ill post it, but if someone has already tried this, can you please tell me any problems that i might encounter.
User avatar
Sikken
Posts: 53
Joined: Sat Sep 05, 2009 10:03 pm

Re: info about command variables

Post by Sikken »

ok , for now i have resolved with a html text bow with buttons, 1,10,100 for depositing, and withdrawing my gold and adena ... but i am still lokking for a solution for this ^^ ... its not as easy as it sounds ^^
issle88
Posts: 36
Joined: Sat Apr 01, 2017 2:35 pm

Re: info about command variables

Post by issle88 »

You can edit the way voicedcommandhandler works to set commands in the form of .command_arg1_arg2_art3 etc
Tokenize with _ as split indicator use the first substring as the command and parse the other three inside for the voicedcommand to be able to use them. Just a rough thought, didnt try it but it can ( and will ) work.
User avatar
janiii
L2j Veteran
L2j Veteran
Posts: 4269
Joined: Wed May 28, 2008 3:15 pm
Location: Slovakia

Re: info about command variables

Post by janiii »

Code: Select all

public boolean useVoicedCommand(String command, L2PcInstance activeChar, String target)
the string target is the string after command and can be used to check the parameters from the command. it has only a wrong name.. e.g. if you have ".bank 10" command then bank is command and "10" is the target.
that means that the voiced command has already support for parameters, you dont need to code anything else, just use the string target in your voiced command to check parameters.
DO NOT EVEN TRY TO MESS WITH ME!
forum flOOder dancing dEVILoper
I don't give private support - PM will be ignored!
User avatar
denser
Posts: 1392
Joined: Wed May 30, 2007 9:13 pm
Location: Russia
Contact:

Re: info about command variables

Post by denser »

viewtopic.php?f=69&t=14124

here is my contrin. i made it max for 4 banking - cos of bug with more than 2kkk adena.

it works on my live about 3 month :) players a little happier till now
Tiger, once tasted human flesh, will want to taste it again
L2J - the place where glad to see you any time!
Post Reply