2017 © Pedro Peláez
 

library reaper

An extension for erpk/harvester. It allow to send a message to erepublik MU Chatroom

image

scyzoryck/reaper

An extension for erpk/harvester. It allow to send a message to erepublik MU Chatroom

  • Sunday, December 28, 2014
  • by scyzoryck
  • Repository
  • 2 Watchers
  • 2 Stars
  • 14 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Reaper

Reaper is an extension for erpk/harvester. It add some new features for Harvester., (*1)

Installation

The best way to install Reaper is through Composer., (*2)

If you have installed Harvester, you have to run following command in your project directory:, (*3)

php composer.phar require scyzoryck/reaper master-dev, (*4)

Else create file composer.json file in your project directory:, (*5)

{
    "minimum-stability": "dev",
    "require": {
      "scyzoryck/reaper": "master-dev"
    }
}

And run command, (*6)

php composer.phar install, (*7)

Modules

Chat

Allows to send messages via erepublik chat., (*8)

use Scyzoryck\Reaper\Module\Chat\ChatModule;

$module = new ChatModule($client);
//set message color to blue (#45d7d7)
$module->setColor('45d7d7');
//send message "Black is white" to military unit chat
$module->sendMessage('Black is white');
//get last used color. 
echo $module->getColor();

Default colors using by erepublik chat are: 2F2F2F, 45D7D7, 4545D7, 8ED745, D745D, 8E8E8E, 407D40, 45D745, 7D4040, 40407D, 7D7D40, D7A045, 7D407D, D74545, BDBDBD, 407D7D, DC93DC and D7D745, but it's working with all hex color codes., (*9)

If you want to send message to other room you can use:, (*10)

//set other room id than MU room id
$module->setCurrentRoomId($roomId);
$module->sendMessage('blablabla');
//get current room id
echo $module->getCurrentRoomId(); // if you didn't set any roomId it will display MU room id

Military

This module is depraceted. It'll be removed in the next version of Reaper. Use MUDO Module instead of it. This module extends MilitaryModule from erpk/harvester. New features is setting MUDO., (*11)

use Scyzoryck\Reaper\Module\Military\MilitaryModule;

$module = new MilitaryModule($client);
//firstly set your military unit ID
$module->setMilitaryUnitId(12345);
//next set battle with id 654321 as MUDO
$module->setMUDO(654321);

If MUDO can't be change a CannotChangeMUDOExpection is thrown., (*12)

MUDO

This module allows to change MUDO., (*13)

use Scyzoryck\Reaper\Module\MUDO\MUDOModule;

$MUDO = new MUDOModule($client);
//firstly set your military unit ID
$MUDO->setMilitaryUnitId(12345);
//get available campaigns to set as MUDO
$MUDO->getAvailableCampaigns(); //return array
//next set battle with id 654321 as MUDO
$MUDO->setDailyOrder(654321);
//get number of changes left
$MUDO->getChangesLeft();

The Versions

28/12 2014

dev-master

9999999-dev

An extension for erpk/harvester. It allow to send a message to erepublik MU Chatroom

  Sources   Download

MIT

The Requires

 

by Avatar scyzoryck