2.0 (obsolete) MirrorWarpback 1.3

Warp back the last place you used a mirror/cell phone, or your grave.

  1. Smelltastic

    Plugin Developer

    Joined:
    Sep 24, 2016
    Messages:
    7
    Smelltastic submitted a new resource:

    MirrorWarpback - Use a lens to return to the last place you used a mirror/cell phone.

    Read more about this resource...
     
    • Like Like x 1
  2. Smelltastic

    Plugin Developer

    Joined:
    Sep 24, 2016
    Messages:
    7
  3. TeamFluff

    TeamFluff Level 0

    Joined:
    Dec 28, 2013
    Messages:
    3
    Thanks for this, Smelltastic. I did a bit of a hack job to support using Recall Potions as the warpback item. You can find the changes here if you're interested: I'd post a URL with the changes, but I'm getting blocked by the spam filter.
     
    • Like Like x 1
  4. Smelltastic

    Plugin Developer

    Joined:
    Sep 24, 2016
    Messages:
    7
    That's cool, and I had the same problem when I tried to submit a github link before. Let's see if it works for me: https://github.com/levi-middleton/TShock_MirrorWarpback

    It looks like the main change was setting it up so it warps you to the right place right after the recall potion warps you to spawn through OnPlayerSpawn, which is a great idea; I didn't even realize that was raised when you warp; I was trying to figure out an elegant way to handle it and thought you'd need a delay, but that looks like it'd work perfectly. Although it looks like for some reason you just call Set instead of actually teleporting, which isn't going to do anything but set the state to Available?

    I think you might've forked from an earlier version though - yours looks like it removes grave warpback, item consumption, etc.

    Okay, I've now updated mine so it can handle recall potions properly. It can also accept multiple item types for warpback. Since it works properly with just using the mirror to bounce back and forth I've changed the config so the mirror-type items are now also the warpback items. I've also added 'reset' items, which will remove your warpback position. The default items to do this are coins (copper, silver, gold or plat).

    I'm not quite done yet, I want to add slash commands to it, and I think it'd be really cool to interact with regions, specifically make it so if your spawn is in a particular region your warpback position will reset if you step out of it, or maybe if you get a certain distance away from it.. hmmmm.

    Oh! Maybe just make it so warpback only happens within a certain distance of your spawn, once you're outside that distance it acts as though you don't have one set. Yes that'd be perfect!
     
  5. Smelltastic

    Plugin Developer

    Joined:
    Sep 24, 2016
    Messages:
    7
  6. TeamFluff

    TeamFluff Level 0

    Joined:
    Dec 28, 2013
    Messages:
    3
    Yeah, I did remove a fair amount of stuff that I knew we wouldn't be using on our server. Make sure you're looking at the server-dev branch; that's the one I build our server plugin from. Item consumption was removed because the recall potion itself had to be consumed to produce the PlayerSpawn event; otherwise I'd get double potion consumption. Other things that look like they're missing are just features I removed that I knew our server wouldn't use to simplify the code.

    That's right. I Set when they use the potion, then I wait for the PlayerSpawn event to signify that the recall potion is finished doing its thing. During PlayerSpawn, if the warpback is available, then I do the teleport. I found that if I did the teleport first, the recall potion would just warp them back to spawn. I know my solution isn't very general-purpose, but it served the needs of my server.
     
  7. tanpro260196

    tanpro260196 Level 5

    Joined:
    Oct 30, 2015
    Messages:
    108
    Can you add an option to allow user warp back to the place where they left the server?
     
  8. NAGU

    NAGU Level 4

    Joined:
    Mar 1, 2014
    Messages:
    98
    try change "RememberLeavePos": false, >> "RememberLeavePos": true, in the tshock config file.
     
  9. tanpro260196

    tanpro260196 Level 5

    Joined:
    Oct 30, 2015
    Messages:
    108
    I knew about that but I want to have a cost everytime player wamt to use it.
    Because if not some players on my server is starting to abuse it. Whenever there are too many mobs around, they will just leave and join again so the mobs will despawn.
     
    • Agree Agree x 1
  10. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    626
    May I ask for an update for this plugin? I couldn't find any updated fork on Github, and the latest commits predate Terraria's big chat/localization update, so it most likely won't work well with just a tick.
     
  11. Zaicon

    Zaicon Spam Cleaner 9000
    TShock Mod Plugin Developer

    Joined:
    Feb 15, 2014
    Messages:
    799
    • Like Like x 1
  12. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    626
  13. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    626
    Tried both mirror and wormhole warping. No issues; everything appears to be working as intended.
    Thanks again.
     
  14. YungMewz

    YungMewz Level 1

    Joined:
    May 31, 2016
    Messages:
    7
    Can I get an update for this?
     
  15. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    626
    Kindly take a look 3 posts above yours.
     
  16. YungMewz

    YungMewz Level 1

    Joined:
    May 31, 2016
    Messages:
    7
    The github link is dead
     
  17. YungMewz

    YungMewz Level 1

    Joined:
    May 31, 2016
    Messages:
    7
    I tried decompiling it back into a Visual Studio project, but Im missing too much context to fix the errors.
     
  18. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    626
    Oh, no idea why it was deleted. I can send you my version via PM, but I'm not sure if I translated it to spanish or just used the config file for that; I do not have the source files either.
     
  19. YungMewz

    YungMewz Level 1

    Joined:
    May 31, 2016
    Messages:
    7
    How did you translate it to spanish without the source files?
     
  20. Kojiro_S

    Kojiro_S Level 11

    Joined:
    Feb 16, 2014
    Messages:
    626
    I just edited my previous message lol, but either I deleted them for some reason (unlikely) or just used the config to translate the plugin messages, in which case you should be fine.