Pokemon Server Archive

PvP Server => Plugins => Topic started by: Shane on July 28, 2012, 09:46:05 am

Title: [Na.]Escape Rope
Post by: Shane on July 28, 2012, 09:46:05 am
So, Since the server went down I started to code an escape rope plugin, im not amazing at java but I can do a bit! :)
The idea I had in hand was:
-Shane, enjoy !
Title: Re: [Coding]Escape Rope
Post by: Tenebrae on July 28, 2012, 09:49:38 am
This




seems like it could work. Although will trainers be able to use /home escaperope without the string? I'm not too sure on the permissions there.
Title: Re: [Coding]Escape Rope
Post by: Rigby on July 28, 2012, 09:56:47 am
I love the whole idea of the plugin, so I'm still trying to decide if I love your signature or your plugin more.
Title: Re: [Coding]Escape Rope
Post by: Shane on July 28, 2012, 09:57:51 am
I love the whole idea of the plugin, so I'm still trying to decide if I love your signature or your plugin more.
<3
Title: Re: [Coding]Escape Rope
Post by: Tenebrae on July 28, 2012, 10:02:11 am
I love the whole idea of the plugin, so I'm still trying to decide if I love your signature or your plugin more.



(https://www.pokemonserver.net/forum/proxy.php?request=http%3A%2F%2Fi50.tinypic.com%2Fek46yo.gif&hash=cc98a019e62011562e7d9e8589f014da)
тєηє αη∂ xєηνz ^^

:3

Is it possible to add negative permissions for a specific sethome in essentials?
e.g. -essentials.home.escaperope
Would that work?
Title: Re: [Coding]Escape Rope
Post by: ~Ali~ on July 28, 2012, 10:37:02 am
Add me to your signature ImJustBauss. :DDD
Title: Re: [Coding]Escape Rope
Post by: Shane on July 28, 2012, 10:45:46 am
Haha,  you need to beh noticed by me :3 and beh nice to meh :)
Title: Re: [Coding]Escape Rope
Post by: 1cec0ld on July 28, 2012, 03:11:40 pm
So, Since the server went down I started to code an escape rope plugin, im not amazing at java but I can do a bit! :)
The idea I had in hand was:
  • "/escape" to use the escape rope.
  • You would need 10 string.
  • When you type the command it will take 10 string from you and bring you back to the start of the cave?
  • How would this work? Well script block, before you enter the cave the sb command will do this:
  • ./sbwalkcreate @bypass /sethome escaperope
  • Then when the player walks into the cave it will set there home there. This is a bypass so they shouldn't be able to reset that home.
  • Then when the player is stuck in the cave then will do /escape and the command will run taking away 10 string and tping them to the start of the cave!
  • Other info: /spawn, /tpa, /tpahere, /tp, and other tp commands should be disabled in the caves! Or else there is no point of this plugin.
  • I have started coding this plugin and it might take time so bare with me :)
-Shane, enjoy !


Shoot down an idea?
(https://www.pokemonserver.net/forum/proxy.php?request=http%3A%2F%2Ffarm8.staticflickr.com%2F7070%2F6874536089_532509b3ab.jpg&hash=d49b1fe01421d494e2341cfc0bccef74)

    which opening, some have more than 3
    we have scriptblock, no plugin coding needed
    overriding the original player home, or throwing an error because they can't set more than X (rank dependant) No one would enter a cave for fear of losing their bank, their base, their house, etc
    @bypass simply says "do this without regard for permissions when the @player runs the command. it has no effect on their ability to use a command afterwards.
    I could do this with ModDamage.
    there may be if they want to go to the start of the cave and not a warp or a different sethome

Because we do already have ScriptBlock, the only "coding" any plugin would need to do is an alias for /escape (which, again, I could have done with ModDamage, and I didn't already due to the flaws in the /home section)

So whats the rating? Did I break enough hearts this time? Was I c0ld enough?
Now.........
Now if you mean make the plugin, then I'd say hook into worldguard and check the region name. If the region name is one with preset location(s) then when the rope is used, tp that player to the nearest location defined for that region name. If the player isnt in a rope-location-defined region, do nothing. Sure the admins would have to
/escaperope set unioncave1 unioncave
/escaperope set [location] [cave/forest regionName]
for every cave entrance, and for every cave, but if it gets the idea to work, I like it.
Title: Re: [Coding]Escape Rope
Post by: Paradox on July 28, 2012, 04:14:47 pm
I could make the plugin with worldguard but the API really sucks.
Title: Re: [Coding]Escape Rope
Post by: Shane on July 28, 2012, 04:17:55 pm
How about this:
Title: Re: [Coding]Escape Rope
Post by: Shane on July 28, 2012, 04:18:35 pm
So, I guess ./thead. :(
Title: Re: [Coding]Escape Rope
Post by: Prodigy39 on July 28, 2012, 04:19:35 pm
Right click string: Check W/G Regions
Title: Re: [Coding]Escape Rope
Post by: 1cec0ld on July 28, 2012, 05:25:47 pm
I could make the plugin with worldguard but the API really sucks.

You don't have to use WorldGuard, if you know a predefined way to check

If loc < ymax and loc > ymin and loc < xmax and etc etc etc for an area that we can add...
Title: Re: [Coding]Escape Rope
Post by: Jotr123 on July 30, 2012, 02:14:14 am
I love the whole idea of the plugin, so I'm still trying to decide if I love your signature or your plugin more.
ikr.
Title: Re: [Coding]Escape Rope
Post by: Paradox on August 08, 2012, 09:45:55 am
You don't have to use WorldGuard, if you know a predefined way to check

If loc < ymax and loc > ymin and loc < xmax and etc etc etc for an area that we can add...


Haha, that's so cheap.
Title: Re: [Na.]Escape Rope
Post by: liquidfired on August 08, 2012, 10:09:54 am
I was thinking for this plugin, it would use the WorldGuard API as Para said to find the region, then have different certain warp points for different regions.


We could have one method for the process of the teleportation. However with the WorldGuard regions, we would either have to list out all the cave regions in an ArrayList, and have one "if" statement like
Code: [Select]
ArrayList <String> region <String> = new ArrayList (forgot Syntax, too lazy to get it back up)
ArrayList <String> teleportspot <String> = new ArrayList


[Still dont know WG Api]
if (player's location == get.region[x])(x could be any of the cave regions in the ArrayList){
// if statement with the command (didnt learn bukkit api) then teleportspot[x]
}
Still never learned Bukkit API yet, don't know if it could work. We could use Hashmaps with the Regions as Keys, and Coords of Teleportation Spots as the values. Still very scratchy and confusing, I should go learn Bukkit Api now.
Title: Re: [Na.]Escape Rope
Post by: Paradox on August 08, 2012, 10:40:22 am
Code: [Select]
ArrayList <String> region <String> = new ArrayList (forgot Syntax, too lazy to get it back up)
ArrayList <String> teleportspot <String> = new ArrayList


I know you don't know the correct syntax but honestly, without correct syntax, I have no idea what you're doing with these arraylists.


[Still dont know WG Api]
if (player's location == get.region[x])(x could be any of the cave regions in the ArrayList){
// if statement with the command (didnt learn bukkit api) then teleportspot[x]
}


This was the original plan in "simpler terms". I'm pretty sure there's a way to check if a player is inside a certain "Domain". It's doable, but it requires knowing every single region we plan to use and then having to edit the plugin based on new regions. You could also edit all the regions to have a certain flag that we don't use and have the plugin check for that flag instead but then you need to set all the flags and upkeep with new regions. All is possible.



In any case, we can do it. It's not a problem of being too difficult/possible, just a problem of knowing exactly what we want it to do. For example, like 1ce mentioned, some caves have more than one entrance. Which does it bring you to? The nearest one? One predefined one? Even these facts could be thought out later though. So why wasn't this developed earlier? Simply because 1ce said he could do it in moddamge so why develop an entire plugin for something a different plugin can do?


BTW:
There's already a method for teleportation.
Title: Re: [Na.]Escape Rope
Post by: 1cec0ld on August 08, 2012, 03:40:21 pm
So why wasn't this developed earlier? Simply because 1ce said he could do it in moddamge so why develop an entire plugin for something a different plugin can do?
Actually I didnt think I could until we talked today, so thats not why.
Title: Re: [Na.]Escape Rope
Post by: Paradox on August 08, 2012, 04:24:28 pm
Oh lol. So you want to team up on this and do it together? Or you want to fly solo?
Title: Re: [Na.]Escape Rope
Post by: 1cec0ld on August 08, 2012, 08:30:16 pm
I work better alone, I'll ask if I get stuck though.
After I'm done reinstalling windows again.
(windows updates why u spam me and my illegal version)
Title: Re: [Na.]Escape Rope
Post by: Rigby on August 08, 2012, 08:45:07 pm
I work better alone, I'll ask if I get stuck though.
After I'm done reinstalling windows again.
(windows updates why u spam me and my illegal version)
I wonder if I can send you my re-installation CD and key xD
Title: Re: [Na.]Escape Rope
Post by: liquidfired on August 08, 2012, 09:04:49 pm
The Internet: Pirates, Bad Grammar Children, and Trolls
Title: Re: [Na.]Escape Rope
Post by: Mariofighter3 on August 08, 2012, 09:14:47 pm
The Internet: Pirates, Bad Grammar Children, and Trolls


Don't forget the Porn addictsRigby!
Title: Re: [Na.]Escape Rope
Post by: 1cec0ld on August 09, 2012, 12:13:06 am
I wonder if I can send you my re-installation CD and key xD

Don't worry, my brother lent me his copy of Win7Ultimatex64 that doesn't ask for a key.
I just have to coonfigure WindowsUpdates NOT to download that particular check this time.
Title: Re: [Na.]Escape Rope
Post by: 1cec0ld on August 09, 2012, 01:21:08 am
Alright, lets make this a reality. I need some grunt workers to help me. I need coordinates for a veritable fuckton of locations. If one person wants to volunteer, please post it here. If someone wants to double check that person, just post your own versions with only the changed parts please. If you don't know where the spot is, keep it blank so others know that it needs to be found. I  know there are other entrances to certain places (union cave) but im avoiding them for simplicity, and because no one who uses an escape rope wants to go BACK to the ruins of alph. Here's the list, if you want a location added, let me know. The Y coordinate is important. Round up all decimals, but try to avoid them if you can.

Code: [Select]
Diglets cave
  - N Entrance
    - X:
    - Y:
    - Z:
  - S Entrance
    - X:
    - Y:
    - Z:
MtMoon
  - W Entrance
    - X:
    - Y:
    - Z:
  - E Entrance
    - X:
    - Y:
    - Z:
Rock Tunnel
  - N Entrance
    - X:
    - Y:
    - Z:
  - S Entrance
    - X:
    - Y:
    - Z:
Sea Foam
  - SE Entrance (to Fuchsia)
    - X:
    - Y:
    - Z:
  - NW Entrance (to Cinnabar)
    - X:
    - Y:
    - Z:
Dark Cave
  - W Entrance
    - X:
    - Y:
    - Z:
  - NE Entrance
    - X:
    - Y:
    - Z:
  - SE Entrance
    - X:
    - Y:
    - Z:
Union Cave
  - N Entrance
    - X:
    - Y:
    - Z:
  - S Entrance
    - X:
    - Y:
    - Z:
Mt Mortar
  - W Entrance
    - X:
    - Y:
    - Z:
  - Mid Entrance
    - X:
    - Y:
    - Z:
  - E Entrance
    - X:
    - Y:
    - Z:
Whirl Islands
  - NE Island
    - X:
    - Y:
    - Z:
  - NW Island
    - X:
    - Y:
    - Z:
  - SE Island
    - X:
    - Y:
    - Z:
  - SW Island
    - X:
    - Y:
    - Z:
Ice Cave
  - W Entrance
    - X:
    - Y:
    - Z:
  - E Entrance
    - X:
    - Y:
    - Z:
Mt Silver
  - S Entrance
    - X:
    - Y:
    - Z:

I thank you in advance if you help. I will even show you all the shtuff I have to write just in case you feel like I am not doing enough to make this work.
Title: Re: [Na.]Escape Rope
Post by: Tactic on August 09, 2012, 07:42:10 am
Sure, I'll begin tomorrow.
Title: Re: [Na.]Escape Rope
Post by: Okieskinny on August 09, 2012, 07:44:36 am
I can get online, but it lags bad, so I'll help with this since it's easier on my internet.
Title: Re: [Na.]Escape Rope
Post by: Anonymouslyanon on August 12, 2012, 06:18:04 pm
Diglett's cave
  - N Entrance
    - X: 122
    - Y: 65
   - Z: 1184
  - S Entrance
    - X: 355
    - Y: 67
    - Z: 717
MtMoon
  - W Entrance
    - X: 5
    - Y: 66
    - Z: 1006
  - E Entrance
    - X: 28
    - Y: 67
    - Z: 978
Rock Tunnel
  - N Entrance
    - X: 58
    - Y: 68
    - Z: 570
  - S Entrance
    - X: 134
    - Y: 68
   - Z: 572
Sea Foam
  - SE Entrance (to Fuchsia)
    - X: 680
    - Y: 68
    - Z: 1064
  - NW Entrance (to Cinnabar)
    - X: 692
    - Y: 68
    - Z: 1040
Dark Cave
  - W Entrance
    - X: 254
    - Y: 66
    - Z: 2073
  - NE Entrance
    - X: 61
    - Y: 65
    - Z: 1940
  - SE Entrance
    - X: 323
    - Y: 56
    - Z: 1985
Union Cave
  - N Entrance
    - X: 576
    - Y: 66
    - Z: 2270
  - S Entrance
    - X: 682
    - Y: 65
    - Z: 2270
Mt Mortar
  - W Entrance
    - X:-33
    - Y: 66
    - Z: 2359
  - Mid Entrance
    - X: -24
    - Y: 66
    - Z: 2303
  - E Entrance
    - X: -32
    - Y: 66
    - Z: 2244
Whirl Islands
  - NE Island
    - X: 302
    - Y: 64
    - Z: 2780
  - NW Island
    - X: 304
    - Y: 64
    - Z: 2838
  - SE Island
    - X: 366
    - Y: 64
    - Z: 2772
  - SW Island
    - X: 362
    - Y: 64
    - Z: 2833
Ice Cave
  - W Entrance
    - X: -35
    - Y: 66
    - Z: 1964
  - E Entrance
    - X: -65
    - Y: 66
    - Z: 1867
Mt Silver
  - S Entrance
    - X: 274
    - Y: 70
    - Z:1577


Tell me if I got anything wrong.
Title: Re: [Na.]Escape Rope
Post by: Tenebrae on November 22, 2012, 06:20:20 am
Now I'm curious as to whether we'll ever have escape ropes now...