Dismiss Notice
Wynncraft, the Minecraft MMORPG. Play it now on your Minecraft client at (IP): play.wynncraft.com. No mods required! Click here for more info...

Video Wynncraft-styled Spell Casting System - Made With Commands!

Discussion in 'Your Work' started by Ravelord Nito, Oct 7, 2016.

Thread Status:
Not open for further replies.
  1. Ravelord Nito

    Ravelord Nito help

    Messages:
    242
    Likes Received:
    480
    Trophy Points:
    67
    Minecraft:
    Recently, I discovered something pretty cool to do with villagers - if you leave the trade section blank (Offers:{Recipes:[]}) in their summon command they do not open up the trade window when right clicked. This means I could use a villager to detect both right and left clicks easily, resulting in this:


    (Sorry for the terrible video, my computer is a toaster)
    (Also worth noticing the anvil sound tells me that the system has reset and spells can be cast again)

    I'm pretty pleased with how this came out (for a prototype at least). Here is how it works:

    [​IMG]

    Green = Scoreboard and teleportation stuff
    This detects when the wand is held, a right click/left click happens, teleports the villager and removes collision with the villager. The wand detection works with a scoreboard that updates when the wand is held in the mainhand slot and then the villager is teleport to them and returned once the wand is unselected. Left click works with a dummy scoreboard that updates when the villager used has been hurt ({HurtTime:10s}) and right is done with a scoreboard that uses 'stat.TalkedToVillager' which triggers when a villager is clicked, not traded.
    Grey = Trigger mechanism
    Simple enough, detects when the villager right clicked, shows a display, disables itself then enables the next module.
    Red = Reset Mechanism
    A reset mechanism that activates if a falling sand lands on it. Everytime a module activates it kills then respawns the sand in its original position. When a module is completed the comparators are removed, but if the sand lands it replaces them and deactivates any choice modules, meaning the spell has to be recast. The time it takes to reset is roughly 3 seconds (60 blocks of falling).
    Blue = Choice modules
    each module has two sides that detect left and right clicks, and is activated once the previous module has completed and set a redstone block in the middle allowing the main commands to function. After one is selected it updates the display and places the redstone block to activate the next module/cast the spell.

    Soon-ish I plan on rebuilding the mechanism with a few extra additions:
    - Less delay with clicks (current system can't be insta-casted like wynn, not sure if this is possible with commands tho)
    - Less obtrusive display (Like with Wynn I want to have the spell combo as the weapons name, I'm pretty sure it should be possible with commands)
    - Spells (Having stuff that actually happens when you cast it would be cool, yeh)
    - A mana system (I have a few ideas, shouldn't be that hard to implement, and it might even be a full blown stamina system if I have time)
     
  2. icebreaker

    icebreaker Retired YouTuber & Full Stack Web Developer Media HERO

    Messages:
    2,829
    Likes Received:
    2,974
    Trophy Points:
    184
    Minecraft:
    Now cast the spell while running lol
     
  3. Ravelord Nito

    Ravelord Nito help

    Messages:
    242
    Likes Received:
    480
    Trophy Points:
    67
    Minecraft:
    Run backwards ;)
     
    icebreaker likes this.
  4. icebreaker

    icebreaker Retired YouTuber & Full Stack Web Developer Media HERO

    Messages:
    2,829
    Likes Received:
    2,974
    Trophy Points:
    184
    Minecraft:
    u got me there xD
     
  5. Reefive

    Reefive Do you hate the assassin? VIP+

    Messages:
    341
    Likes Received:
    104
    Trophy Points:
    62
    Guild:
    Minecraft:
    How do you detect if the Villager has been hurt? Like detect with /testfor of are you using /scoreboard with a stat? Please I would love to know!
     
  6. Happy New Year

    Happy New Year Please bring the shoutbox back VIP+

    Messages:
    5,339
    Likes Received:
    4,986
    Trophy Points:
    192
    Minecraft:
    how can people be so good with command blocks ._.
     
  7. Reefive

    Reefive Do you hate the assassin? VIP+

    Messages:
    341
    Likes Received:
    104
    Trophy Points:
    62
    Guild:
    Minecraft:
    Skyreach... I kinda suck at Command Blocks. If you just watch 2,000,000,000,000 command block videos (maybe less then 2 trillion). Then you will understand :/. Or... just start watching tutorials :D!
     
Thread Status:
Not open for further replies.