Solved /do commad

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

The77Gamer

Member
Aug 16, 2022
10
0
1
20
What im trying to do is something like this. If I did "/do enchant player's tool with sharpness 5" it would enchant my tool with sharpness 5
Code:
command /do [<text>]:
    trigger:
        %arg-1%
 
Then you make another command in your script. /do will execute everything in your trigger.
You cannot have /do do two completely different things because they are different data types.
 
with Skcrew addon or SkQuery addon or SkJade addon:
Code:
command /do <text>:
  trigger:
    evaluate arg-1

with Skript-reflect addon:
Code:
import:
  ch.njol.skript.lang.parser.ParserInstance
  ch.njol.skript.lang.Effect
effect evaluate %text%:
  trigger:
    set {_parser} to ParserInstance.get()
    {_parser}.setCurrentEvent(event.getEventName(), event.getClass())
    Effect.parse(expr-1, null).run(event)
    {_parser}.deleteCurrentEvent()

command /do <text>:
  trigger:
    evaluate arg-1
 
Last edited: