Jump to content




Xp turtle?


  • You cannot reply to this topic
5 replies to this topic

#1 jakemg

  • Members
  • 88 posts

Posted 08 April 2013 - 08:12 AM

Hi I usually make mining turtle programs but i have a good mob spawner on my world and I would like to create a turtle that could just attack (i know how to do that part) but I also would like it to turn around and go to an enchantment table and enchant(thats the part where I have no clue) I dont know how to get enchantment levels or enchant from a turtle. any ideas?

#2 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 08 April 2013 - 08:17 AM

it is not possible without peripherals installed. I believe it is MiscPeripherals that adds the XP turtle, and you craft the table with the turtle to get it.

#3 SuicidalSTDz

    Permutator of Strings

  • Members
  • 1,308 posts
  • LocationPennsylvania

Posted 08 April 2013 - 08:40 AM

View Posttheoriginalbit, on 08 April 2013 - 08:17 AM, said:

it is not possible without peripherals installed. I believe it is MiscPeripherals that adds the XP turtle, and you craft the table with the turtle to get it.
Yes, MiscPeripherals adds the XP turtle in which you can autoCollect xp, enchant items, print the amount of levels, print the amount of xp orbs, and all that good stuff.

#4 jakemg

  • Members
  • 88 posts

Posted 08 April 2013 - 08:50 AM

I am on ftb so i think its installed

#5 theoriginalbit

    Semi-Professional ComputerCrafter

  • Moderators
  • 7,332 posts
  • LocationAustralia

Posted 08 April 2013 - 09:00 AM

In that case here are all the functions you have access to with the XP turtles (taken directly from the MiscPeripherals thread), you are required to wrap the enchantment table with peripheral.wrap and call the function on the wrapped object.

View PostRichardG867, on 30 September 2012 - 01:30 PM, said:

XP Upgrade
Craft a Turtle alongside an Enchantment Table to get a XP Turtle. It is able to store XP and enchant items using the stored levels.
Exposes the following functions:
  • add(amount): Adds XP from XP bottles or monster eggs, using amount (optional, defaults to as much as possible) of the item in the current slot. Returns the amount of XP added.
  • get(): Returns the total amount of XP on the turtle.
  • getLevels(): Returns the amount of XP levels on the turtle.
  • collect(): Collects XP from XP orbs on the ground in a 2 block radius around the turtle. Returns the amount of XP collected.
  • setAutoCollect(autoCollect): If autoCollect is true, allow the turtle to automatically collect XP periodically.
  • enchant(levels): Enchants the item in the current slot using the specified levels. Returns true if successful, false if not.
  • get/getUp/getDown(): Gets XP from the following XP sources:
    • Other XP turtles
    • Furnaces, IC2 Iron Furnaces and Induction Furnaces, Thermal Expansion Powered Furnaces (sucking the item in the output slot(s))
    • Thaumcraft Brain in a Jar
    Returns the amount of XP obtained.


#6 QuantumGrav

  • Members
  • 36 posts
  • LocationUnited States

Posted 08 April 2013 - 04:31 PM

There are also a few topics very similar to this in other threads, so if you want some inspiration or guidance on how to go about doing this, the forum's search bar and google are your friends! I once built this kind of system in my FTB world (now lost to a hard drive crash), and it's really fun seeing something you've programmed work exactly how you wanted it to! Keep learning and trying and you'll get it!





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users