#(hatzefatz) run command
51 messages · Page 1 of 1 (latest)
Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.
!c run tags
queue
run [<script>] (path:<name>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (id:<name>) (speed:<value>/instantly) (delay:<value>)
Runs a script in a new queue.
Runs a script in a new queue.
You must specify a script object to run.
Optionally, use the "path:" argument to choose a specific sub-path within a script.
Optionally, use the "def:" argument to specify definition values to pass to the script,
the definitions will be named via the "definitions:" script key on the script being ran,
or numerically in order if that isn't specified (starting with <[1]>).
Alternately, use "defmap:<map>" to specify definitions to pass as a MapTag, where the keys wi...
<entry[saveName].created_queue> returns the queue that was started by the run command.
!t queue.determinations
Did you mean to search for queuetag.determination?
Returns the values that have been determined via !command Determine
for this queue, or null if there is none.
ListTag
^ you can get the created queue's determinations
to be honest i have exactly both pages open but there is no example to understand...
Why do you need a task script to determine results?
I will communicate with a questplugin different things. And there is the idea of using a taskscript, that i don't have to put all the logic into every single interact script from all the npcs.
Is there a better way instead of using determine?
or is the better way using a procedure script?
for example: i have this taskscript: AQuestPlayerStatus: type: task script: - execute as_server "tps" save:queststatus - define status <entry[queststatus].output> - narrate <[status]> - determine <[status]>
And the npc which is calling that taskscript should do different thnigs if the tps is low than if the tps is high.
!t tps
tps is an example to explain what my intention is. the command I'm executing is later something like: /questcli <player> <quest> status form a different plugin which is programmed by somebody else
!command execute
server
execute [as_player/as_op/as_npc/as_server] [<Bukkit-command>] (silent)
Executes an arbitrary server command as if the player, NPC, or server typed it in.
Allows the execution of server commands through a Denizen script.
Commands can be executed as the server, as an npc, as an opped player, or as a player, as though it was typed by the respective source.
Note that you should generally avoid using 'as_op', which is only meant for very specific special cases. 'as_server' is usually a better option.
Note: do not include the slash at the start. A slash at the start will be interpreted equivalent to typing two slashes at the front in-game.
Note that...
<entry[saveName].output>returns the output to an as_server sender.
you already had that but its unclear if that's not what you wanted
ok, let me try again to explain what my idea is... I want to retrieve player information from a quest plugin and process it with a logic in the background. What I then get as a result, I want to give back to the NPC and this should then continue to work according to the result.
I would like to put the whole thing in an extra script so that I only have "one" line of code from the NPC. because I will want to use this logic for different NPCs
Returns the value of the placeholder.
For example, <placeholder[server_name]>
Note that you do not need to include the "%" marks on the placeholder.
The queue's linked player, if any, will be linked to the placeholder as well for any player-specific placeholder usage.
Note: this should generally only be used for reading values from other plugins not already supported by Depenizen.
This should not be used for cases where a Denizen tag already exists, or should exist.
Depenizen, PlaceholderAPI
ElementTag
Most plugins have placeholders, which are way easier to work with than commands
ohh tats a nice feature i didn't know.. and that i can put all this into a procedure script right?
Yeah
but how can i initially sent something to the plugin.. can i use the execute also with an procedure script. i ask cause i need to provide the plugin also information as well..
No, execute can't be in procedures
If you want to send out information, you don't need to return any values, just - run do_thing def.thing:value def.other_input:value
that i understood. but i want to get information back like /questcli start player quest and then i need to know something like qust started for player to have a correct handshake. or /questcli check player quest and than i get back f.e. no,reason. if we would use the placeholder, we must create multiple for one quest and we will have multiple quests..
What do you mean? if the plugin has the proper placeholders, it'd be just the same if not simpler
E.g. /questcli check player <quest> would be <placeholder[questcli_check_player_<quest>]> or whatever
I think we're talking past each other...
Let me ask a simple question.. is it possible to execute an -run command which saves the result? so i can use the result in the queue where i executed the run command?
The answer to your specific question is yes, as explained up here
You save the queuetag related to the run just like in any other case of saving an output (check the run command also pulled up for relevant tag)
And then you use that tag queuetag.determination to get what the task determined
Oke, i understood... but how am i getting information back. if i do this i only get the q@<scriptname> back..
The taskscript is looking like this right now..
AQuestPlayerStatus: type: task script: - execute as_server "tps" save:tps - narrate "task: <entry[tps].output>" - determine <entry[tps].output>
and the part where the run gets executed:
- run aquestplayerstatus save:test - narrate "execute: <entry[test].created_queue>"
how can i now read that what i'm determine? as an FYI tps is just an example
!t queue.determination
Returns the values that have been determined via !command Determine
for this queue, or null if there is none.
ListTag
Feel free to ask if you need any more help, otherwise -
Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.
If not yet resolved, please reply below to tell us what you still need.
(Note that if there is no reply for a few days, this thread will eventually close itself.)
@lunar silo
Thanks for the help so far. No i have one last problem. I get that dertermination back as a "double" list:
- task is that, what i'm executing right now in the task script it self for debugging. and execute is back in the npc script. Any ideas, to get just one list back to the npc?
well, double lists often compile themselves away
but if not, just stick a .first on there
that fixed it, thanks!
Thread closed as resolved.