#(hatzefatz) run command

51 messages · Page 1 of 1 (latest)

halcyon fossilBOT
#

(hatzefatz) run command

#

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.

swift oar
#

!c run tags

queen hamletBOT
# swift oar !c run tags
Group

queue

Syntax

run [<script>] (path:<name>) (def:<element>|.../defmap:<map>/def.<name>:<value>) (id:<name>) (speed:<value>/instantly) (delay:<value>)

Short Description

Runs a script in a new queue.

Description

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...

Related Tags

<entry[saveName].created_queue> returns the queue that was started by the run command.

swift oar
#

!t queue.determinations

queen hamletBOT
#
Possible Confusion

Did you mean to search for queuetag.determination?

queen hamletBOT
swift oar
#

^ you can get the created queue's determinations

lunar silo
#

to be honest i have exactly both pages open but there is no example to understand...

swift ocean
#

Why do you need a task script to determine results?

lunar silo
#

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.

swift oar
#

!t tps

queen hamletBOT
storm ospreyBOT
lunar silo
#

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

noble hare
#

!command execute

queen hamletBOT
# noble hare !command execute
Group

server

Syntax

execute [as_player/as_op/as_npc/as_server] [<Bukkit-command>] (silent)

Short Description

Executes an arbitrary server command as if the player, NPC, or server typed it in.

Description

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...

noble hare
#

<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

lunar silo
#

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

swift oar
#

!t placeholder

queen hamletBOT
# swift oar !t placeholder

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.

Required Plugins or Platforms

Depenizen, PlaceholderAPI

Returns

ElementTag

swift oar
#

Most plugins have placeholders, which are way easier to work with than commands

lunar silo
#

ohh tats a nice feature i didn't know.. and that i can put all this into a procedure script right?

swift oar
#

Yeah

lunar silo
#

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..

swift oar
#

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

lunar silo
#

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..

swift oar
#

E.g. /questcli check player <quest> would be <placeholder[questcli_check_player_<quest>]> or whatever

lunar silo
#

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?

shadow fulcrum
# queen hamlet

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

lunar silo
#

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

shadow fulcrum
#

!t queue.determination

queen hamletBOT
swift oar
#

Feel free to ask if you need any more help, otherwise -

limber steepleBOT
#
Thread Closing Reminder

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

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?
lethal swan
#

well, double lists often compile themselves away

#

but if not, just stick a .first on there

lunar silo
#

that fixed it, thanks!

limber steepleBOT
#
Resolved

Thread closed as resolved.