Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

LiquidBounce Forum

P

Paranoid_breS

@Paranoid_breS
About
Posts
9
Topics
1
Shares
0
Groups
0
Followers
1
Following
0

Posts

Recent Best Controversial

  • Help writing a custom prison mining script
    P Paranoid_breS

    thx for the help

    ScriptAPI

  • Help writing a custom prison mining script
    P Paranoid_breS

    I figured out how to get the number of entity present using:

    mc.theWorld.loadedEntityList.length
    
    ScriptAPI

  • Help writing a custom prison mining script
    P Paranoid_breS

    How 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?

    ScriptAPI

  • Help writing a custom prison mining script
    P Paranoid_breS

    @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);
    	}
    
    ScriptAPI

  • Help writing a custom prison mining script
    P Paranoid_breS

    How 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.

    ScriptAPI

  • Help writing a custom prison mining script
    P Paranoid_breS

    I 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;
    	}	
    
    ScriptAPI

  • Help writing a custom prison mining script
    P Paranoid_breS

    The 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.

    ScriptAPI

  • Help writing a custom prison mining script
    P Paranoid_breS

    @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 ?

    ScriptAPI

  • Help writing a custom prison mining script
    P Paranoid_breS

    Is 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 repeat

    I'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.

    ScriptAPI
  • Login

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups