Portal v1 (r842)
#1
How to use:
  1. Put .zip inside your "Plugins" folder;
  2. "Extract here";
  3. Go to your settings.ini OR use web control panel, and add "Portal";
  4. You must have "portal.create" permission
  5. To create portal exit, stand where you need it and type "/pwarp [name]"
  6. To create portal entrance, select a region with wooder sword. One leftclick and one rightclick. Then type "/penter [name]". If warp and enter have same name, they will be linked (you'll get a message).
  7. To switch off region selection mode, type "/ptoggle" (it's on by default for those who have "portal.create" permission)
  8. To use portal, stand still in entrance zone for 2 seconds (currently adjustable via plugin modification, PORTAL_ACTIVATION_TIME variable in portal_main.lua)
  9. ...
  10. PROFIT TELEPORT!!!

Features:
Horrible portal creation process, but nice-and-easy portals usage;
Fail-safe (or should be, at least...) - it will log in case you'll disable/delete world with portals in it;
Readable data storage (data's saved in *.dat files).

ToDo:
WebAdmin features, like web warp creation, based on current players coords, warps and enters deletion (currently it's only possible through .dat modification Smile), warps and enters renaming.

That's it.


Attached Files
.zip   Portal.zip (Size: 3.55 KB / Downloads: 587)
Reply
Thanks given by:
#2
I'm sorry, this version is buggy, I'm fixing it now
Fixed! Tested:
- Correct region selection and region check;
- Cross-world portals;
- Dual portals (one have exit where another have entrance and vice-versa);
- In-world portals.

Unfortunately, I can't make /Plugins/Portal/ path work( If anyone happened to know how to fix that - I'll be glad to know.
Reply
Thanks given by:
#3
(09-08-2012, 02:29 AM)Taugeshtu Wrote: Unfortunately, I can't make /Plugins/Portal/ path work( If anyone happened to know how to fix that - I'll be glad to know.

What do you mean? Is this webadmin related?
Reply
Thanks given by:
#4
Quote:What do you mean? Is this webadmin related?
No, I can't access file through lua's "io" class if I put it inside plugin's folder. It only works for MCS root folder, for some reason (I get "can't access global file" error, or something like that)

I use two files for data storage: portals_portals.dat and portals_players.dat (this one only saves admin's wooden sword mode)

Haven't touched web part yet. This will be in v2.
Reply
Thanks given by:
#5
I should create a function to get the plugin's folder address anyway, I think plugin settings should be stored in their own folders instead of the rootTongue that should keep things a lot cleaner
Reply
Thanks given by:
#6
Can't you use a regular ini file instead? So that it is user-editable, if the need arises.
Reply
Thanks given by:
#7
Quote:Can't you use a regular ini file instead? So that it is user-editable, if the need arises.
Files are user-editable already. I could add more love to them, but there isn't really much pain in understanding their structure once you had a look at plugin's code (and it's really easy) :
Code:
ToKastor~Kastor~8.8987965919576~105~1.8690593470373
ToThau~Thaumatorium~29.787251471287~73~-1.6744356516502
ToThau~Kastor~9~107~0~8~104~2
ToKastor~Thaumatorium~28~75~-2~30~72~-2
Besides, in my mind .ini is somewhat configuring, not storing data. Think world.ini and region.dat.

Quote:I should create a function to get the plugin's folder address anyway
That would be nice Smile We'll see if it works...
Reply
Thanks given by:
#8
if i use /penter (name) the server says unknown command and when i only use /penter it says you should specify the name in one word. and then it says again Unknown Command :O
Reply
Thanks given by:
#9
Quote:the server says unknown command
That's normal Smile Does it also say that enter "name" was created (and linked, in case you've already created a warp with such a name)?
Reply
Thanks given by:
#10
... i forgot to create an area with the wooden sword :S
can you also add that it transports dropped items and mobs through the portal? just like in minecraft snapshot 12w34a?
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)