Hello dear people, I need your help with something
My logical composition is a bit limited and I'm looking for ideas and advice.
I'm in the process of programming a Minecraftbot that can manage and set up a Minecraft server via a chat (IRC)
If you don't know what IRC is, please google it.
If necessary, this should also contain small Minecraft commands such as !explore !craft !chop !fish !mine etc...
At the moment I have a player database that is created as soon as you write !new player. It is structured as follows:
[AccountInfo]
Name=Squall
Leben=20
Hunger=20
LastPos= // Hier stehen dann die Startcords die Zufällig generiert werden..
InventarSlots=9
Passwort=[ausgeblendet]
[InventarSlot1]
Name=WOODEN_AXE
Anzahl=1
[InventarSlot2]
Name=WOODEN_HOE
Anzahl=1
[InventarSlot3]
Name=WOODEN_SHOVEL
Anzahl=1
[InventarSlot4]
Name=WOODEN_PICKAXE
Anzahl=1
[InventarSlot5]
Name=WOODEN_SWORD
Anzahl=1
[InventarSlot6]
Name=APPLE
Anzahl=6
[InventarSlot7]
Name=AIR
Anzahl=0
[InventarSlot8]
Name=AIR
Anzahl=0
[InventarSlot9]
Name=AIR
Anzahl=0
Here's an insight into the code for LastPos:
Alias LastPos {
var %maxcords 3
var %cordgen 1
while (%cordgen <= %maxcords) {
echo -ag Durchgang %cordgen
var %x $rand(1,500)
var %y $rand(1,64)
var %z $rand(1,500)
var %negate-x $rand(1,100)
var %negate-y $rand(1,100)
var %negate-z $rand(1,100)
echo -ag Negate Changen x= %negate-x y= %negate-y z= %negate-z
if (%negate-x <= 50) { var %xpos - $+ %x }
if (%negate-y <= 50) { var %ypos - $+ %y }
if (%negate-z <= 50) { var %zpos - $+ %z }
if (%negate-x >= 50) { var %xpos %x }
if (%negate-y >= 50) { var %ypos %y }
if (%negate-z >= 50) { var %zpos %z }
inc %cordgen
}
echo -ag LastPos sind: x= %xpos y= %ypos z= %zpos
set %mcposition %xpos %ypos %zpos
echo -ag ->>>> %mcposition
}
Now to my gap in thinking:
With the !Explore command, the last position is first read from the player database and saved in a variable.
So far so good. Now I have to create numerous biomes that have a certain size. These are then saved in a Biome.db.
The Biome.db would then probably look like this:
[Info]
Biomelist=Biomeid1.biomeid2.biomeid2 // etc etc.
[Bimome1]
Name= // Biome name
Desc= // Description of the biomes
Trees= // What types of trees can be found there
Blocks= // Which blocks does this biome contain?
Size= // The size of the biome (coordinates x,y,z) // I'm undecided on this
But now I don't know how I could define the size of a biome depending on the LastPos alias
Function:
So it must somehow contain a distance that defines the transition.
But how ? This is where it hangs right now.
Example:
LastPos has the following cords = 239, 46, -173 (spawn point and if necessary starting biome e.g. (Plains) from the Biomendb but how could you implement this?
When !Explore new coordinates are now generated with the LastPos alias. But how can you implement a distance from Biome1 to Biome2
Hope you understand my reasoning.
Hello dear people, I need your help with something
My logical composition is a bit limited and I'm looking for ideas and advice.
I'm in the process of programming a Minecraftbot that can manage and set up a Minecraft server via a chat (IRC)
If you don't know what IRC is, please google it.
If necessary, this should also contain small Minecraft commands such as !explore !craft !chop !fish !mine etc...
At the moment I have a player database that is created as soon as you write !new player. It is structured as follows:
Here's an insight into the code for LastPos:
Alias LastPos { var %maxcords 3 var %cordgen 1 while (%cordgen <= %maxcords) { echo -ag Durchgang %cordgen var %x $rand(1,500) var %y $rand(1,64) var %z $rand(1,500) var %negate-x $rand(1,100) var %negate-y $rand(1,100) var %negate-z $rand(1,100) echo -ag Negate Changen x= %negate-x y= %negate-y z= %negate-z if (%negate-x <= 50) { var %xpos - $+ %x } if (%negate-y <= 50) { var %ypos - $+ %y } if (%negate-z <= 50) { var %zpos - $+ %z } if (%negate-x >= 50) { var %xpos %x } if (%negate-y >= 50) { var %ypos %y } if (%negate-z >= 50) { var %zpos %z } inc %cordgen } echo -ag LastPos sind: x= %xpos y= %ypos z= %zpos set %mcposition %xpos %ypos %zpos echo -ag ->>>> %mcposition }Now to my gap in thinking:
With the !Explore command, the last position is first read from the player database and saved in a variable.
So far so good. Now I have to create numerous biomes that have a certain size. These are then saved in a Biome.db.
The Biome.db would then probably look like this:
But now I don't know how I could define the size of a biome depending on the LastPos alias
Function:
So it must somehow contain a distance that defines the transition.
But how ? This is where it hangs right now.
Example:
LastPos has the following cords = 239, 46, -173 (spawn point and if necessary starting biome e.g. (Plains) from the Biomendb but how could you implement this?
When !Explore new coordinates are now generated with the LastPos alias. But how can you implement a distance from Biome1 to Biome2
Hope you understand my reasoning.