Magic

Magic

190k Downloads

External command spell?

jamesol1 opened this issue ยท 11 comments

commented

It seems that the command spell doesn't work with external commands? I'm planning on using magicspells alongside magic (i have a lot of magicspells based spells i want to use<--- most of which i cant remake in magic).
https://pastebin.com/XQtQfBLJ
Here is the spell i've made. I've tried messing around with adding self targetting, other ways of formatting the command: line etc. It just doesn't seem to work.

If one does not exist, could a external command action be made?

Many thanks.

commented

I'm not sure what you mean by an "external" command, but the Command action can run any command the player can run. Do they have permission for /magicspellcast?

It can also run commands as console if magicspells has some way to use the command on behalf of the player, so they don't need permission to run the command themselves.

commented

Hi Nathan,
The command works perfectly fine typing it in game. I'm currently OP'd so it shouldnt be a perm issue either. It's just getting the spell to play out the command. By external i just meant outside of the plugin magic and vanilla commands (i was under the impression that the command action doesn't work with other plugins' commands <--- hoping im wrong).

commented

That's exactly what this action is for, there's no reason you'd really ever want to have it use a command from Magic.

I don't know what the problem would be then. Try /mage debug 20 and then /cast Fly and see what shows up in chat.

commented

image
This is what came up. Bare in mind /cast fly actually performs the 'Magic' plugins fly spell, not the magic-spells version i made. I named the command spell fly. You probably know all this but i'm just clarifying.

commented

Maybe try it with something like /say or some other simple command. It's really pretty simple, and last I checked it worked- you could also try /cast respawn which is a builtin spell that looks almost identical to yours

respawn:
    hidden: true
    icon: compass
    category: utility
    worth: 50
    actions:
        cast:
        -  class: Command
    effects:
        cast:
        -  class: EffectSingle
           sound: block_portal_travel
           location: both
           effectlib:
             class: WarpEffect
             particle: portal
    parameters:
        command: spawn
        op: true
        target: none
        cooldown: 30000

If none of that gets you anywhere I will try to run your spell with a different command when I can, but I haven't really been actively working on this plugin in a while so it may not be right away.

commented

I've got it working! God knows what i was missing. I think it was op:true. I couldn't find a description on the sandbox or wiki for what it does. I'm certain i tried adding it in earlier. Either way thanks for the respawn spell, i used that format and it worked!
On a separate note, some in the discord have been wondering about the sandbox server. Is that going back up? It was very laggy prior to going down.

Thanks again!

commented

Well that's pretty odd, "op" means op the player to perform the command. If you were opped already it shouldn't really make a difference.

if magicspells can do like "/magicspellcast " that'd probably be safer. Otherwise, I guess whatever works, glad you got it working!

commented

Oh and the sandbox server was out of memory, I just restarted it.

commented

Thanks for restarting the sandbox servers, it's a great feature.
One more thing with the command spell. It seems to share a cooldown with others spells? I have no idea why. For instance when i cast a spell with a 3 second cooldown it suddenly adds that time to my command spell. This added cooldown as a result of casting other spells seems to cap at 10 seconds? For instance casting the default magic spell 'stun' instantly puts the command spell on a 10 second cooldown.
https://pastebin.com/92Xm19sY
I have no clue what is causing it. Above is my command spell.

commented

That's probably the mana system- remove mana from the "costs" section of the spell if you don't want it to consume mana and just use fixed cooldowns.

If you don't want mana on any spells there are some extra steps you can do to turn the system off completely so wands don't show mana in the XP bar or lore.

commented

ah gotcha! Sorry i've been using the uberwand for so long I forgot about that function and the other spells on my hotbar im guessing dont have much of a mana requirement which is why they dont go on cooldown. Thanks