6226
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
//AfkBot
//This is a 'Medium' level script
//This was made by 'Alchemy'
//This script was made for 'Alchemy'
//=========================
//Functions
function afkBot()
{
%d = getRandom(1,2);
if(%d == 1)
{
afkBotForward();
}
else if(%d == 2)
{
afkBotBackward();
}
}
function afkBotForward()
{
%t = getRandom(1,3);
%j = getRandom(1,2);
moveForward(1);
if(%t == 1)
{
schedule(999,0,AfkBotForwardStop);
}
else if(%t == 2)
{
schedule(1999,0,afkBotForwardStop);
}
else if(%t == 3)
{
schedule(2999,0,afkBotForwardStop);
}
if(%j == 1);
{
afkBotJet();
}
elseIf(%j == 2);
{
return;
}
}
function afkBotForwardStop()
{
%t = getRandom(1,3);
moveForward(0);
if(%t == 1)
{
schedule(999,0,afkBotYaw);
}
if(%t == 2)
{
schedule(1999,0,afkBotYaw);
}
if(%t == 3)
{
schedule(2999,0,afkBotYaw);
}
}
function afkBotYaw()
{
%y = getRandom(1,4);
%t = getRandom(1,3);
if(%y == 1)
{
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
}
else if(%y == 2)
{
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
}
else if(%y == 3)
{
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
}
else if(%y == 4)
{
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
}
if(%t == 1)
{
schedule(999,0,afkBotYawStop);
}
else if(%t == 2)
{
schedule(1999,0,afkBotYawStop);
}
else if(%t == 3)
{
schedule(2999,0,afkBotYawStop);
}
}
function afkBotYawStop()
{
%t = getRandom(1,3);
if(%t == 1)
{
schedule(999,0,afkBot);
}
else if(%t == 2)
{
schedule(1999,0,afkBot);
}
else if(%t == 3)
{
schedule(2999,0,afkBot);
}
}
function afkBotBackward()
{
%t = getRandom(1,3);
moveBackward(1);
if(%t == 1)
{
schedule(999,0,AfkBotBackwardStop);
}
else if(%t == 2)
{
schedule(1999,0,afkBotBackwardStop);
}
else if(%t == 3)
{
schedule(2999,0,afkBotBackwardStop);
}
}
function afkBotBackwardStop()
{
%t = getRandom(1,3);
moveBackward(0);
if(%t == 1)
{
schedule(1,0,afkBotYaw);
}
if(%t == 2)
{
schedule(1001,0,afkBotYaw);
}
if(%t == 3)
{
schedule(2001,0,afkBotYaw);
}
}
function afkBotJet()
{
%t = getRandom(1,4);
jump(1);
schedule(1,0,jump,0);
jet(1);
if(%t == 1)
{
schedule(1999,0,jet,0);
}
else if(%t == 2)
{
schedule(4999,0,jet,0);
}
else if(%t == 3)
{
schedule(7999,0,jet,0);
}
else if(%t == 4)
{
schedule(10999,0,jet,0);
}
}I've added in a function in the last few lines. It makes my player jet and stops it at random durations. At the first function, AFKBotForward, i've added in a check event to see if %j == 1, if it is, then it activated AFKBotJet. But when I executed this, I got an error around line 36, and I don't know what it means.
How about combining all theCan't they are different turns.
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
's into one operation.
Idk about realism but there's a lot of ways you could make the code less messyHow :c
//AfkBot
//This is a 'Medium' level script
//This was made by 'Alchemy'
//This script was made for 'Alchemy'
//=========================
//Functions
function afkBot()
{
%d = getRandom(1,2);
if(%d == 1)
{
afkBotForward();
}
else if(%d == 2)
{
afkBotBackward();
}
}
function afkBotForward()
{
%t = getRandom(1,3);
moveForward(1);
if(%t == 1)
{
schedule(999,0,AfkBotForwardStop);
}
else if(%t == 2)
{
schedule(1999,0,afkBotForwardStop);
}
else if(%t == 3)
{
schedule(2999,0,afkBotForwardStop);
}
}
function afkBotForwardStop()
{
%t = getRandom(1,3);
moveForward(0);
if(%t == 1)
{
schedule(1,0,afkBotYaw);
}
if(%t == 2)
{
schedule(1001,0,afkBotYaw);
}
if(%t == 3)
{
schedule(2001,0,afkBotYaw);
}
}
function afkBotYaw()
{
%y = getRandom(1,4);
%t = getRandom(1,3);
if(%y == 1)
{
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
}
else if(%y == 2)
{
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
}
else if(%y == 3)
{
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
}
else if(%y == 4)
{
yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25); yaw(25);
}
if(%t == 1)
{
schedule(999,0,afkBotYawStop);
}
else if(%t == 2)
{
schedule(1999,0,afkBotYawStop);
}
else if(%t == 3)
{
schedule(2999,0,afkBotYawStop);
}
}
function afkBotYawStop()
{
%t = getRandom(1,3);
if(%t == 1)
{
schedule(999,0,afkBot);
}
else if(%t == 2)
{
schedule(1999,0,afkBot);
}
else if(%t == 3)
{
schedule(2999,0,afkBot);
}
}
function afkBotBackward()
{
%t = getRandom(1,3);
moveBackward(1);
if(%t == 1)
{
schedule(999,0,AfkBotBackwardStop);
}
else if(%t == 2)
{
schedule(1999,0,afkBotBackwardStop);
}
else if(%t == 3)
{
schedule(2999,0,afkBotBackwardStop);
}
}
function afkBotBackwardStop()
{
%t = getRandom(1,3);
moveBackward(0);
if(%t == 1)
{
schedule(1,0,afkBotYaw);
}
if(%t == 2)
{
schedule(1001,0,afkBotYaw);
}
if(%t == 3)
{
schedule(2001,0,afkBotYaw);
}
}It works perfectly fine, but I need ways to make it seem more realistic. One thing I need help with is improving the turning (yaw). When it stops moving, it jerk turns my avatar to the right. I want it to turn smoothly to the right. Any suggestions?
Why do you reject my backstory? Clearly he's an enterprising young nooblet in the the Blockland community who wants more than anything else to be loved by a family as their dog. His horrible skin defect makes his skin look like fur, so he's always played the part of 'dog' in his life.You clearly don't understand what i'm asking for here, so I will explain simpler. I want you to put in a realistic name. Not some name that you put. A realistic backstory. A nice avatar.
New name: Block McDog
New Nickname: Fido
Not an option.Wow thanks, it forces me to make more functions for this, but it works. I made a prototype of it that moves and turns at every second. Not very realistic, but I was doing this through the console, later I will do it on an add-on.
The schedule command takes milliseconds (0.001 of a second), not seconds, which was your first fault.
Your second fault was trying to use schedule(1000,0,NaN); to delay your code, it doesn't work like that.
You need to have a looping function, and have it call a different function, and that will do the moving.
Sign me upRejected, your backstory is rejected, your name is rejected, your nickname is rejected, and I am not going to fix your avatar, you do it yourself.
Name: Nube McDogerson
Nickname: Doge
Wepons: claws, biting, and noob hammer
Items: Wrench, printer
Backstory: "cn i b doge???/"
(My head looks like stuff, fix pls)
"But mom! I need to use the royal car to go to Makeout Point because PurpleMetro told me!"Go get something to eat. Maybe it will make you happier.
"No. He's probably a child enthusiast who wants to rape you. You are not going to Makeout Point. You're staying here.
Now go get something to eat."
Just great.
Now there's 2 choices left.
Jump into the abyss or get something to eat?
"You're banned from using the royal car!"2nd choice.
Yep. You're banned from using your car, and Makeout Point is all the way over the Lumpy Abyss.
You're stuck on your home island until you're unbanned.
WARNING: Choice Point
This is a choice point. A choice point is where you are limited to choices, and not made ideas.
Choices:
*Go get something to eat
*Go nag your parents to be unbanned from the car
*Jump into the Lumpy Abyss and end it all