PRCC Custom Commands Source Code (Project Rainbow RSPS)

PRCC Custom Commands Source Code (Project Rainbow RSPS)

// alias.js
// Use the handleAlias() function to create your own custom,
// user-defined "commands" or aliases, which are called whenever
// a command or chat message is typed.
// made for Project Rainbow (Non-Profit Runescape Private Server)
// for an in-depth how-to made by me, visit http://projectrainbow.biz/wiki/doku.php?id=guides:scripting

importPackage(Packages);
importPackage(Packages.java.text);
importPackage(Packages.java.util);

function strrev(str) {
var len = str.length;
var chars = str.split('');
for (var i = 0; i < len / 2; i++) {
var c = chars[i];
chars[i] = chars[len - i - 1];
chars[len - i - 1] = c;
}
return chars.join('');
}

function rot13(str) {
var len = str.length;
var chars = str.split('');
for (var i = 0; i < len; i++) {
var c = str.charCodeAt(i);
if (c >= 97 && c <= 109 || c >= 65 && c <= 77) {
c += 13;
} else if (c >= 110 && c <= 122 || c >= 78 && c <= 90) {
c -= 13;
}
chars[i] = String.fromCharCode(c);
}
return chars.join('');
}


function handleAlias(cmd) {
// Use Java string functionality.
var javaCmd = new java.lang.String(cmd);

// fmt should be eq to *nix default date cmd, otherwise let me know.
if (cmd === '::date' || cmd === '::mydate') {
var timeStamp = new SimpleDateFormat('E MMM dd kk:mm:ss z yyyy').format(Calendar.getInstance().getTime());
return '::yell ' + timeStamp;
}

if (javaCmd.startsWith('::stra')) {
if (cmd.length > 0) {
return '::yell @stra@  ' + cmd.substring(0);
}
}

// rot26 is super secure.
if (javaCmd.startsWith('::rot13')) {
if (cmd.length > 8) {
return '::yell ' + rot13(cmd.substring(8));
}
}

// TODO: /me.
if (javaCmd.startsWith('::slap')) {
if (cmd.length > 7) {
return '::yell @whi@* slaps ' + cmd.substring(7) + ' around a bit with a large trout.';
}
}
return cmd;
}
function handleAlias(cmd) {
    if (cmd === '::test') {
        return '::yell Testing Testing 1...2...3...'; {
        }
    }
    return cmd;
}
function handleAlias(cmd) {
    if (cmd === '::tot') {
        return '::yell @whi@ Hi Im Tot'; {
        }
    }
    return cmd;
}
function handleAlias(cmd){
var javaCmd = new java.lang.String(cmd);
if(javaCmd.startsWith('::hurl')){
if(cmd.length > 7) {
return '::yell @whi@ hurls a large, raw fish at ' + cmd.substring(7);{
}
}
}
if(cmd === '::tot') {
return '::yell @whi@ Hi Im Tot';{
}
}
if(cmd === '::getcape'){
return '::rockgolem'; {
}
}
if(cmd.startsWith === '::pts'){
return '::checkpts ' + cmd.substring(0);{
}
}
if(cmd === '::richamb'){
return '::yell @pur@ Hi Im Richamb';{
}
}
if(cmd === '::missingno'){
return '::oasis';{
}
}
if(cmd === '::spiders'){
return '::spiderbite';{
}
}
if(cmd === '::chill'){
return '::trade';{
}
}
if(cmd === '::js'){
return '::reloadjs';{
}
}
if(cmd === '::con'){
return '::myhome';{
}
}
if(cmd === '::pvp'){
return '::zen';{
}
}
if(cmd === '::pure'){
return '::unsafepk';{
}
}
if(cmd === '::cheat'){
return '::noclip';{
}
}
if(cmd === '::max'){
return '::maxhit';{
}
}
if(cmd === '::donkey'){
return 'flash1: Oh fuck, get me real good in there! YEEE HAWWW';{
}
}
if(cmd === '::timvirgin'){
return '::yell @sha@ Hi, Im a 50 year old virgin named tim. fuck you fura.';{
}
}
if(cmd === '::fura'){
return '::yell @red@ Hi, my name is Fura, and I\'m a pussy chaser!';{
}
}
if(cmd === '::blocks'){
return '::craandor';{
}
}
if(cmd === '::tasteit'){
return 'flash2: feel the rainbow, taste the rainbow!';{
}
}
if(cmd === '::squashing'){
return '::yell @bla@ was squashed by @pur@ Meee59';{
}
}
if(cmd === '::doctorwho'){
return '::yell @sha@ Hi Im Matt Smith, the best doctor.';{
}
}
if(cmd === '::bots'){
return '::junkbots';{
}
}
if(javaCmd.startsWith ('::sha')){
if(cmd.length > 5){
return '::yell @sha@' + cmd.substring(5);{
}
}
}
if(javaCmd.startsWith ('::pts')){
if(cmd.length > 6){
return '::checkpts ' + cmd.substring(6);{
}
}
}
if(javaCmd.startsWith ('::tagplayer')){
if(cmd.length >12){
return '::yell @blu@ ' + cmd.substring(11) + ' is now tagged!';{
}
}
}
if(cmd === '::whymuted'){
return '::yell @gre@ Hi Im Why Muted, and Im part of BONER SQUAD';{
}
}
if (cmd === '::rbpc'){
return '::rbpointcommands';{
}
}
if (cmd === '::copyrighted'){
return '::yell All Code Added To The Alias File In This Pack is Copyright RichambCoding 2013-2015';{
}
}
if (cmd === '::inv' || cmd === '::b'){
return '::bank';{
}
}
if (cmd === "::devsite"){
return('::yell PRCC Dev Site: http://www.richamb.webs.com  --Version 1.2 RELEASED!');
}
if (cmd === '::h'){
return('::home');{
}
}
if (cmd === '::p'){
return ('::players');{
}
}
if(javaCmd.startsWith ('::newpass')){
if(cmd > 10){
return '::changepass ' + cmd.substring(10);{
}
}
}
if (cmd === '::pkp'){
return '::pkpoints';{
}
}
if(cmd === '::bi'){
return '::bankinv';{
}
}
if(cmd === '::szone'){
return '::smokezone';{
}
}
if(cmd === '::vr'){
return '::voterewards';{
}
}
if(cmd === '::prccdev'){
return '::yell @sha@ Richamb @bla@ is the current PRCC Dev, and the owner.';{
}
}
if(cmd === '::currentver' || cmd === '::currentversion') {
return '::yell @sha@ You are using PRCC Ver 1.2'; {
}
}
if(cmd === '::prcc'){
return 'flash2: I\'m using prcc version 1.2, so you can suck my dick mate!';{
}
}
var rps = Math.random();
if(cmd === '::rps'){
if (rps < 0.34){
return 'rock!';{
}
}
else if (rps <= 0.67){
return 'paper!';{
}
}
else {
return 'scissors!';{
}
}
}
var randomnumber = Math.floor(Math.random()*101);
if (cmd === '::rollit'){
return 'I rolled a ' + randomnumber + ' on the dice!';{
}
}
if(cmd === '::s'){
return '::save';{
}
}
if(cmd === '::philosophy'){
if(rps < 0.34){
return 'red: the man who says he is invincible, is the man who dies first.';{
}
}
else if(rps <= 0.67){
return 'white: those who cry for loved ones are those who cherish life.';{
}
}
else{
return 'flash2: god is great, beer is good, and people are crazy!';{
}
}
}
if(cmd === '::randomtele'){
if(rps < 0.34){
return '::oasis';{
}
}
 else if(rps <= 0.67){
return '::trade';{
}
 }
 else if(rps = 0.99){
return '::unsafepk';{
}
 }
 else{
return '::junkbots';{
}
 }
}
if(cmd === '::rbzone'){
return '::rainbowzone';{
}
}
if(cmd === '::uz'){
return '::ultimatezone';{
}
}
if(javaCmd.startsWith('::tele')){
if(cmd > 7){
return '::xteleto' + cmd.substring(7);{
}
}
}
var flower = Math.random()
if(cmd === '::flowergame'){
if(flower < 0.25){
return '::yell I picked a @yel@ yellow @ora@ flower!';{
}
}
else if(flower <= 0.50){
return '::yell I picked a @red@ red @ora@ flower!';{
}
}
else if(flower <= 0.75){
return '::yell I picked a @ora@ orange flower!';{
}
}
else{
return '::yell I picked a @blu@ blue @ora@ flower!';{
}
}
}
if(cmd === '::matchgame'){
if(flower < 0.66){
return 'flash1: one pair! You win half the pot!';{
}
}
else if(flower <= 0.33){
return 'flash2: two pairs! you win the entire pot!';{
}
}
else{
return 'red: no matches! you lose!';{
}
}
}
if(cmd === '::fa'){
return 'green: #teamfura!';{
}
}
if(cmd === '::smsg'){
return '::yell @sha@ Be sure to get PRCC if you haven\'t!';{
}
}
if(cmd === '::mlpfim'){
return '::yell @ran@ Ponies are cool, and Friendship is Magic!';{
}
}
if(cmd === '::killall'){
return '::yell @red@ I\'m attempting to kill everyone!';{
}
}
if(cmd === '::lowestnumber'){
return 'My number is ' + randomnumber + ', do I win?';{
}
}
if(cmd === '::ems'){
return 'flash2: Eat my shorts!';{
}
}
if(cmd === '::random'){
if(randomnumber < 25){
return 'flash2: I think tot is totally awesome, and derserves penis.';{
}
}
else if(randomnumber <= 50){
return 'green: Richamb is totally a swag fag.';{
}
}
else if(randomnumber <= 75){
return 'flash1: Report highvirus for hacking! He ate missingno!';{
}
}
else {
return 'red: you can suck my shiny metal dick you cunt.';{
}
}
}
if(javaCmd.startsWith('::y')){
if(cmd.length > 4){
return '::yell @shg@ @cya@' +cmd.substring(4);{
}
}
}
return cmd;
}



//all original lines in the first handleAlias function belong to Project Rainbow, anything under it is Copyright 2013-2036 RichambCoding

No comments:

Post a Comment