thx for the help
Paranoid_breS
Posts
-
Help writing a custom prison mining script -
Help writing a custom prison mining scriptI figured out how to get the number of entity present using:
mc.theWorld.loadedEntityList.length
-
Help writing a custom prison mining scriptHow do I get the number of players nearby, how do I get the names of the players nearby? And how to swing at/hit an entity nearby?
-
Help writing a custom prison mining script@czechhek Thx, I've read your inventory manager script and found how to access the inventory. I've wrote this prototype code for testing purposes, and it works as expected.
if (mc.thePlayer.inventory.getFirstEmptyStack() == -1) { if (!(mc.currentScreen instanceof GuiChest)) mc.thePlayer.sendChatMessage("/shop"); else mc.playerController.windowClick(mc.thePlayer.openContainer.windowId, 14, 0, 1, mc.thePlayer); }
-
Help writing a custom prison mining scriptHow do I interact with inventory ? I know that I can check if my inventory is full by doing :
mc.thePlayer.inventory.getFirstEmptyStack() == -1
But how do I interact with opened chest/containers ? To sell blocks/items in the game, you have to type /shop and click on the blocks that you want to sell.
-
Help writing a custom prison mining scriptI wrote the 'path finding' part of the script. The mining location isn't hard to get to from the /mine warp. So I wrote this:
if (!IsAtMineLocation) { //Todo: Destination X,Z and rotation yaw will be read from a .ini file mc.thePlayer.rotationYaw = 0; if (mc.thePlayer.posX >= -2) mc.thePlayer.moveEntityWithHeading(-0.5,0); if (mc.thePlayer.posZ <= 30) mc.thePlayer.moveEntityWithHeading(0,0.8); if (Math.round(mc.thePlayer.posZ) == 30 && Math.round(mc.thePlayer.posX) == -2) IsAtMineLocation = true; }
-
Help writing a custom prison mining scriptThe path finding doesn't have to be state of the art, most mines require you to go forward from the /mine starting point or they require you to climb up some stairs.
And for actual mining, we can use the nuker module. Or somehow implement a dead simple 'legit' mining mode which just goes forward and mines then turns left or right until it hits an unbreakable wall.
-
Help writing a custom prison mining script@commandblock2 , thanks for the info. Doesn't Minecraft have built in pathfinding ? I saw that the Minecraft java docs have methods for path finding to a x,y,z position and path finding to an entity. Isn't there a way to already use what's built into the game ?
-
Help writing a custom prison mining scriptIs there any more tutorials on the script API (other than https://liquidbounce.net/docs/ScriptAPI/Getting Started)? And the Minecraft docs (https://scriptapi.liquidbounce.net/) are a bit confusing to me, I only know how to use mc.thePlayer and that's it.
For the mining script I need:
-A way to path find from /mine to the mining location
-A 'legit' mining mode (I know how to activate modules via script so I might just use nuker)
-Check if inventory is full
-Path finding to the 'Sell' NPC or using the /store menu to sell ore and blocks
-Fix broken tools by going to another warp and interacting with an NCP
-Upgrade tools (there's a special plugin in the server for upgrading tools with custom enchants)
-Read /bal and then /rankup when possible
-Detect if players are nearby, stop and go to /cell if anyone is nearby
-Delayed /cell and logout if staff are seen online with /staff
-And repeatI'm not asking anyone to write the script, just asking if there are any resources on writing more world involved scripts. Most scripts I've seen were PVP based so I don't have much experience in custom mining scripts.