When marking an area, it records the chunk and block positions; the block positions being locations within the chunk. I am trying to record the same using the player as the center point for marking out a land claim without using the marking event. The player object doesn't have information about chunk position. Is the player position from getPlayerPosition a world position or a block position relative to a chunk, and how would I get the chunk that the player is currently in?
Posts by Absalom
The next update will be available on Wednesday, December 18, in the early evening (GMT+1).
This update will not yet replace the Java version, instead it is the actual content update. We'll provide more information about the transition together with the update.
-
-
Not yet. Won't be for probably another week.
-
Sweet now I don't have to figure out how to write a script for that.
-
-
Well I admit that I have been slacking a bit. Some stuff came up and I kinda put this on the back burner, and then I got too into a game I like. I am going to work on this some more today. The decompile helps a heck of a lot. There aren't any comments in the decompile, but the code is fairly easy to figure out, even with the obfuscation. My biggest hangup is knowing when to convert to world coordinates. I take the players position and run it through the same functions to get the world coordinate, like the original areaprotection script, record the position, but then when I highlight it, it is nowhere to be found. I did get the label to appear showing that I was standing in the area though. So there is a bit to figure out today. I think it will be one of those moments where it slams me in the face like a Mack truck and I say "AH HA!" Just waiting for that moment. lol!
-
Hey @red51, you guys left your names in the default server.properties file as admins.
-
-
I am happy you got it sorted out. I didn't think about that. I had to do the same thing because I was having disconnect issues like crazy last week. Not sure why I didn't think about that. I guess because you said your friends could connect and you were hosting on the same PC that you were playing on. My mind immediately went to a DNS issue on the local machine. Sorry about that. Maybe that will help the OP out.
-
@voicesdark, regarding "I've actually been having the same problem". Are you running your own server on the same PC you are playing on? That is the situation described by the OP. If so, and if you are connecting to localhost or 127.0.0.1 then router settings are irrelevant (unless you want others to connect to your PC). If you are running Windows 7 then ensure your DNS client service is running. The firewall may be relevant but usually not when connecting to the loopback 127.0.0.1 (again, unless you want other to connect to you as well). If you are running on the same PC as the client, then you won't see the server in the server list if your proper ports aren't being forwarded. AVG may be an issue since it is not only an anti-virus but an internet suite (includes more protection and probably a firewall).
The first thing to do is check the server console output. In order to capture all of the output, edit the win_startscript.bat and make the existing line look like this:java -jar server.jar > log.txt 2>&1
the "> log.txt 2>$1" will cause all stdout and all errors to go to log.txt. This way you can view the whole thing and save it, post it, etc.
Oh! And make sure that there isn't another instance of the server running in the background. If your client is running, and the server is running, you should only see 2 instances of java.exe in the task list.
Look for errors there.
-
I have decided that instead of allowing a player to manually draw an area to protect, I will treat it like other games as a land claim. The following functions are modifications of the areaProtection script. I have created a separate landClaim script. The lands claim size and land claim buffer is configurable by the server admin. The land claim size is xyz and the land claim buffer is the amount of space required between each claim. For now this is set to 1 block just to keep the claims spaced apart to avoid overlap bugs. At the moment, until this script becomes more sophisticated, the player will stand at the center of the proposed claim and attempt /createclaim [claimName]. If they are overlapping someone's claim, they will be prompted to move and retry. In the future, there will be some sort of drawn selector like in the areaprotection script.
/createclaim [claimName]. The function will check to see if the player has exceeded the max number of allowed claims. Then it will ensure the claim won't overlap another claim. If everything is fine, the claim is created.
/removeclaim [claimName]. This function will remove the player's claim.
/showclaims. The function will highlight all of the player's claims (only the claims owned by the player).
/hideclaims. The function will remove highlighting of all of the player's claims (only the claims owned by the player)./addclaimfriend [playerName] and /rmclaimfriend [playerClaim]. These functions will add and remove friends from claims. Added friends will be able to visit the claim but not build or manipulate terrain.
/giverights [claimName] [group] [playerName]. This function will give the player the rights of a rights group for the area name given.
/rmrights [claimName] [group] [playerName]. This function will remove the given player from the rights group for the area name given.
If rights to modify the land are given, the player is also automatically added to the guest rights group if the player doesn't already have those rights.
So far I am as far as recording the claim bounds in the database. Now I am working on confirming that the coordinates are correct. Once that is done I can work on the rights and player kickFromArea functions, etc.
-
This may or may not help too if it is an internal DNS issue. It appears that if you are running Windows 7 and up, you need to check to see if the DNS client service is running via the control panel->admin tools->services (looks for DNS Client): http://superuser.com/questions…ws-8-1-but-127-0-0-1-does
If you are running XP (and maybe this is true in Vista) look in the C:\Windows\System32\Drivers\etc\hosts file and see if localhost is defined in there. -
Oh, you said on your PC. So at home on the same PC you are playing on. Try connecting to 127.0.0.1 or localhost? Of course you did. The hosts file is located in the C:\Windows\System32\Drivers\etc\ directory. It says that the DNS resolutions for localhost are handled in the DNS (Windows 8). So make sure the DNS client service is running. Also what OS are you running?
-
In order for any of us to help, you need to post some more info. Where is the server hosted? Is it in your home or at a datacenter? If the game is running at home, is it on the same machine you are playing on, and if so, what IP or URL are you connecting to in that case? Are you running a strict firewall at your location that might be blocking your outbound connections? (connections you are making from your PC to the outside world). Is there an extremely intrusive anti-virus running on your system? What is the anti-virus product? Usually anti-virus shouldn't interfere with any game (except maybe the installer), but you never know.
-
That is an odd situation. I would try allowing outbound ports appropriate to that server. Usually you shouldn't have to enable ports on the client, but that really depends on the firewall you are using. Also, make sure your client is up to date.
-
The area protection is a bit screwed up. For whatever reason, players have to be re-added to their area upon server reboot. Not sure why that happens unless SQLite doesn't perform a commit by default and changes are rolled back when an unexpected reboot happens. Not sure. I don't think SQLite is that sophisticated, but I could be wrong.
-
@Carlzilla is also an admin on that server. If you see him, maybe he would be nice enough to protect your area too. I think he plays more than I do.
-
this is why i flew as far as i could away from spawn....also we have a "report players" thread for the deadlands server at:
DEADLANDSThis will make it somewhat easier for Absalon to nab these d*ckheads
***TIP: When someone asks "hey,where are you?"..........don't tell them...
i'll bet @red51 is happy he didn't need to fall off his chair lmaoWe don't have a forums rating system, so +1 @Turbo614
-
I haven't allowed the area protection without admin access yet because without area limits and the ability to overlap areas, I was afraid players would abuse it. I still have to modify it to limit area selection, and not allow overlaps. I might put a deadzone in there too where you can't define areas within 1 block of other areas.
-
Exactly what @Bogus said. You need to create INBOUND rules (I think both TCP and UDP) in you firewall for your game port -1 through your game port +4. For example, if you are using 4255 as your game port, then you must create INBOUND firewall rule for ports 4254 through 4259.
Usually antivirus isn't an issue.
-
I ran into a snafu with the GlobalFunctions class. It may take me until Friday to get this together. There were a lot more changes to the Lua related classes than I thought.