This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define AUTO_TRIGGER Btn8L | |
#define AUTO_LENGTH_MS 15 * 1000 // RobotC removed the timing defines from comp template. | |
// Place this inside the task main in the | |
// Non-diabled, non-autonomous section that | |
// starts the usercontrol task. | |
// Returns true if has run auto, false otherwise. | |
bool autonomousStarter() { | |
if( vexRT[AUTO_TRIGGER] ) { | |
// This is where we clean up from any tasks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def fibSub(n, n2): | |
temp_numb = n - n2 | |
if( temp_numb < 0 ): | |
return temp_numb+10 | |
else: | |
return temp_numb | |
def fibAdd(n, n2): | |
temp_numb = n + n2 | |
if temp_numb > 10: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma config(Sensor, dgtl1, xEncoder, sensorQuadEncoder) | |
#pragma config(Sensor, dgtl3, yEncoder, sensorQuadEncoder) | |
#pragma config(Sensor, dgtl5, xLimit, sensorTouch) | |
#pragma config(Sensor, dgtl6, yLimit, sensorTouch) | |
#pragma config(Motor, port1, xMovementMotor, tmotorVex393_HBridge, openLoop) | |
#pragma config(Motor, port2, yMovementMotor, tmotorVex393_MC29, openLoop) | |
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// | |
// In this program: | |
// the axis is refered to as axis |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on death of a player: | |
# This will loop the chances untill something is chosen. | |
# Meaning it will always choose something. | |
set {_chosen} to false | |
while {_chosen} is false: | |
chance of 55%: | |
execute console command "/crate givekey %attacker% common 1" | |
send "&8[&6ShipCraft&8] &cHai ricevuto una Common Key" to attacker | |
set {_chosen} to true | |
# This will stop multiple things from happening in the continuation of the loop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
typedef enum Direction { | |
Forward, | |
Backward | |
} | |
int MotorHoldValue = 10; | |
typedef enum StopType { | |
Free, | |
Hold | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma config(I2C_Usage, I2C1, i2cSensors) | |
#pragma config(Sensor, I2C_1, , sensorQuadEncoderOnI2CPort, , AutoAssign) | |
#pragma config(Motor, port2, Motor_FW1, tmotorVex393HighSpeed_MC29, openLoop, encoderPort, I2C_1) | |
#pragma config(Motor, port3, Motor_FW2, tmotorVex393HighSpeed_MC29, openLoop, reversed) | |
#pragma config(Motor, port4, Motor_FW3, tmotorVex393HighSpeed_MC29, openLoop) | |
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*// | |
/*-----------------------------------------------------------------------------*/ | |
/* */ | |
/* Copyright (c) James Pearman */ |