Overview

Namespaces

  • Budabot
    • Core
      • Modules
    • User
      • Modules
  • None
  • Tyrence
    • Modules

Classes

  • AccessLevel
  • Budabot\Core\AccessManager
  • Budabot\Core\AdminManager
  • Budabot\Core\AOChat
  • Budabot\Core\AOChatPacket
  • Budabot\Core\AOChatQueue
  • Budabot\Core\AOExtMsg
  • Budabot\Core\AsyncHttp
  • Budabot\Core\AutoInject
  • Budabot\Core\BotRunner
  • Budabot\Core\Budabot
  • Budabot\Core\BuddylistManager
  • Budabot\Core\CacheManager
  • Budabot\Core\CacheResult
  • Budabot\Core\ClassLoader
  • Budabot\Core\ColorSettingHandler
  • Budabot\Core\CommandAlias
  • Budabot\Core\CommandManager
  • Budabot\Core\ConfigFile
  • Budabot\Core\DB
  • Budabot\Core\DBRow
  • Budabot\Core\EventLoop
  • Budabot\Core\EventManager
  • Budabot\Core\GuildChannelCommandReply
  • Budabot\Core\GuildManager
  • Budabot\Core\HelpManager
  • Budabot\Core\Http
  • Budabot\Core\HttpRequest
  • Budabot\Core\LegacyLogger
  • Budabot\Core\LimitsController
  • Budabot\Core\LoggerWrapper
  • Budabot\Core\MMDBParser
  • Budabot\Core\Modules\AdminController
  • Budabot\Core\Modules\AliasController
  • Budabot\Core\Modules\AltInfo
  • Budabot\Core\Modules\AltsController
  • Budabot\Core\Modules\BanController
  • Budabot\Core\Modules\BuddylistController
  • Budabot\Core\Modules\ColorsController
  • Budabot\Core\Modules\CommandlistController
  • Budabot\Core\Modules\CommandSearchController
  • Budabot\Core\Modules\ConfigController
  • Budabot\Core\Modules\EventlistController
  • Budabot\Core\Modules\HelpController
  • Budabot\Core\Modules\LogsController
  • Budabot\Core\Modules\PlayerLookupController
  • Budabot\Core\Modules\ProfileCommandReply
  • Budabot\Core\Modules\ProfileController
  • Budabot\Core\Modules\SettingsController
  • Budabot\Core\Modules\SQLController
  • Budabot\Core\Modules\SystemController
  • Budabot\Core\Modules\UsageController
  • Budabot\Core\Modules\WhitelistController
  • Budabot\Core\NumberSettingHandler
  • Budabot\Core\OptionsSettingHandler
  • Budabot\Core\PlayerHistory
  • Budabot\Core\PlayerHistoryManager
  • Budabot\Core\PlayerManager
  • Budabot\Core\Preferences
  • Budabot\Core\PrivateChannelCommandReply
  • Budabot\Core\PrivateMessageCommandReply
  • Budabot\Core\Registry
  • Budabot\Core\SettingHandler
  • Budabot\Core\SettingManager
  • Budabot\Core\SettingObject
  • Budabot\Core\SocketManager
  • Budabot\Core\SocketNotifier
  • Budabot\Core\SubcommandManager
  • Budabot\Core\Text
  • Budabot\Core\TextSettingHandler
  • Budabot\Core\Timer
  • Budabot\Core\TimerEvent
  • Budabot\Core\TimeSettingHandler
  • Budabot\Core\Util
  • Budabot\Core\xml
  • Budabot\User\Modules\AlienArmorController
  • Budabot\User\Modules\AlienBioController
  • Budabot\User\Modules\AlienMiscController
  • Budabot\User\Modules\AOSpeakController
  • Budabot\User\Modules\AOUController
  • Budabot\User\Modules\AXPController
  • Budabot\User\Modules\BankController
  • Budabot\User\Modules\BosslootController
  • Budabot\User\Modules\BroadcastController
  • Budabot\User\Modules\BuffPerksController
  • Budabot\User\Modules\CacheController
  • Budabot\User\Modules\ChatAssistController
  • Budabot\User\Modules\ChatCheckController
  • Budabot\User\Modules\ChatLeaderController
  • Budabot\User\Modules\ChatRallyController
  • Budabot\User\Modules\ChatSayController
  • Budabot\User\Modules\ChatTopicController
  • Budabot\User\Modules\CityWaveController
  • Budabot\User\Modules\CloakController
  • Budabot\User\Modules\ClusterController
  • Budabot\User\Modules\CountdownController
  • Budabot\User\Modules\DevController
  • Budabot\User\Modules\DingController
  • Budabot\User\Modules\EventsController
  • Budabot\User\Modules\FightController
  • Budabot\User\Modules\FindOrgController
  • Budabot\User\Modules\FindPlayerController
  • Budabot\User\Modules\FunController
  • Budabot\User\Modules\GitController
  • Budabot\User\Modules\GuideController
  • Budabot\User\Modules\GuildController
  • Budabot\User\Modules\HelpbotController
  • Budabot\User\Modules\HtmlDecodeController
  • Budabot\User\Modules\ImplantController
  • Budabot\User\Modules\ImplantDesignerController
  • Budabot\User\Modules\InactiveMemberController
  • Budabot\User\Modules\ItemsController
  • Budabot\User\Modules\KillOnSightController
  • Budabot\User\Modules\LevelController
  • Budabot\User\Modules\LinksController
  • Budabot\User\Modules\LootListsController
  • Budabot\User\Modules\MdbController
  • Budabot\User\Modules\MessageInfoCommandReply
  • Budabot\User\Modules\MockCommandReply
  • Budabot\User\Modules\NanoController
  • Budabot\User\Modules\NewsController
  • Budabot\User\Modules\NotesController
  • Budabot\User\Modules\OnlineController
  • Budabot\User\Modules\OrgHistoryController
  • Budabot\User\Modules\OrglistController
  • Budabot\User\Modules\OrgMembersController
  • Budabot\User\Modules\OSController
  • Budabot\User\Modules\PlayerHistoryController
  • Budabot\User\Modules\PlayfieldController
  • Budabot\User\Modules\PocketbossController
  • Budabot\User\Modules\PremadeImplantController
  • Budabot\User\Modules\PrivateChannelController
  • Budabot\User\Modules\QuoteController
  • Budabot\User\Modules\RaffleController
  • Budabot\User\Modules\RaidController
  • Budabot\User\Modules\RandomController
  • Budabot\User\Modules\RecipeController
  • Budabot\User\Modules\RelayController
  • Budabot\User\Modules\ReputationController
  • Budabot\User\Modules\ResearchController
  • Budabot\User\Modules\RunAsController
  • Budabot\User\Modules\SendTellController
  • Budabot\User\Modules\ShoppingController
  • Budabot\User\Modules\SilenceController
  • Budabot\User\Modules\SkillsController
  • Budabot\User\Modules\SpiritsController
  • Budabot\User\Modules\StopwatchController
  • Budabot\User\Modules\Teamspeak3
  • Budabot\User\Modules\TeamspeakController
  • Budabot\User\Modules\TestController
  • Budabot\User\Modules\TimeController
  • Budabot\User\Modules\TimerController
  • Budabot\User\Modules\TimezoneController
  • Budabot\User\Modules\TowerController
  • Budabot\User\Modules\TrackerController
  • Budabot\User\Modules\TrickleController
  • Budabot\User\Modules\UnixtimeController
  • Budabot\User\Modules\VoteController
  • Budabot\User\Modules\WeatherController
  • Budabot\User\Modules\WhatBuffsController
  • Budabot\User\Modules\WhereisController
  • Budabot\User\Modules\WhoisController
  • Budabot\User\Modules\WhoisOrgController
  • Budabot\User\Modules\WhompahController
  • Command
  • DefaultStatus
  • DefineCommand
  • Description
  • Event
  • HandlesCommand
  • Help
  • Inject
  • Instance
  • Intoptions
  • Matches
  • Options
  • Setting
  • Setup
  • Type
  • Tyrence\Modules\DemoResponseCommandReply
  • Tyrence\Modules\SameChannelResponseController
  • Visibility

Interfaces

  • Budabot\Core\CommandReply

Exceptions

  • Budabot\Core\InvalidHttpRequest
  • Budabot\Core\SQLException
  • Budabot\Core\StopExecutionException

Functions

  • Budabot\Core\isWindows
  • Budabot\Core\Modules\read_input
  • Overview
  • Namespace
  • Class
  1: <?php
  2: 
  3: namespace Budabot\User\Modules;
  4: 
  5: /**
  6:  * Authors: 
  7:  *  - Blackruby (RK2),
  8:  *  - Mdkdoc420 (RK2), 
  9:  *  - Wolfbiter (RK1), 
 10:  *  - Gatester (RK2), 
 11:  *  - Marebone (RK2)
 12:  *
 13:  * @Instance
 14:  *
 15:  * Commands this controller contains:
 16:  *  @DefineCommand(
 17:  *      command     = 'bio',
 18:  *      accessLevel = 'all', 
 19:  *      description = "Identifies Solid Clump of Kyr'Ozch Bio-Material", 
 20:  *      help        = 'bio.txt'
 21:  *  )
 22:  *  @DefineCommand(
 23:  *      command     = 'bioinfo',
 24:  *      alias       = 'biotype',
 25:  *      accessLevel = 'all', 
 26:  *      description = 'Shows info about a particular bio type', 
 27:  *      help        = 'bioinfo.txt'
 28:  *  )
 29:  */
 30: class AlienBioController {
 31: 
 32:     /**
 33:      * Name of the module.
 34:      * Set automatically by module loader.
 35:      */
 36:     public $moduleName;
 37: 
 38:     /** @Inject */
 39:     public $db;
 40: 
 41:     /** @Inject */
 42:     public $text;
 43: 
 44:     /** @Inject */
 45:     public $itemsController;
 46: 
 47:     /** @Logger */
 48:     public $logger;
 49:     
 50:     private $leArmorTypes = array('64', '295', '468', '935');
 51:     private $leWeaponTypes = array('18', '34', '687', '812');
 52:     private $aiArmorTypes = array('mutated', 'pristine');
 53:     private $aiWeaponTypes = array('1', '2', '3', '4', '5', '12', '13', '48', '76', '112', '240', '880', '992');
 54: 
 55:     /**
 56:      * This handler is called on bot startup.
 57:      * @Setup
 58:      */
 59:     public function setup() {
 60:         // load database tables from .sql-files
 61:         $this->db->loadSQLFile($this->moduleName, 'alienweapons');
 62:     }
 63: 
 64:     /**
 65:      * This command handler identifies Solid Clump of Kyr'Ozch Bio-Material.
 66:      *
 67:      * @HandlesCommand("bio")
 68:      * @Matches("/^bio (.+)$/i")
 69:      */
 70:     public function bioCommand($message, $channel, $sender, $sendto, $args) {
 71:         $bio_regex = "<a href=\"itemref://(\\d+)/(\\d+)/(\\d+)\">Solid Clump of Kyr\'Ozch Bio-Material</a>";
 72: 
 73:         if (!preg_match("|^(( *${bio_regex})+)$|i", $args[1], $arr)) {
 74:             return false;
 75:         }
 76: 
 77:         $bios = explode("*", preg_replace("/> *</", ">*<", $arr[1]));
 78:         $blob = '';
 79:         forEach ($bios as $bio) {
 80:             preg_match("|^${bio_regex}$|i", trim($bio), $arr2);
 81:             $highid = $arr2[2];
 82:             $ql = $arr2[3];
 83:             switch ($highid) {
 84:                 case 247707:
 85:                 case 247708:
 86:                     $bioinfo = "1";
 87:                     $name = "Kyr'Ozch Bio-Material - Type 1";
 88:                     break;
 89:                 case 247709:
 90:                 case 247710:
 91:                     $bioinfo = "2";
 92:                     $name = "Kyr'Ozch Bio-Material - Type 2";
 93:                     break;
 94:                 case 247717:
 95:                 case 247718:
 96:                     $bioinfo = "3";
 97:                     $name = "Kyr'Ozch Bio-Material - Type 3 ";
 98:                     break;
 99:                 case 247711:
100:                 case 247712:
101:                     $bioinfo = "4";
102:                     $name = "Kyr'Ozch Bio-Material - Type 4";
103:                     break;
104:                 case 247713:
105:                 case 247714:
106:                     $bioinfo = "5";
107:                     $name = "Kyr'Ozch Bio-Material - Type 5";
108:                     break;
109:                 case 247715:
110:                 case 247716:
111:                     $bioinfo = "12";
112:                     $name = "Kyr'Ozch Bio-Material - Type 12 ";
113:                     break;
114:                 case 247719:
115:                 case 247720:
116:                     $bioinfo = "13";
117:                     $name = "Kyr'Ozch Bio-Material - Type 13";
118:                     break;
119:                 case 288699:
120:                 case 288700:
121:                     $bioinfo = "48";
122:                     $name = "Kyr'Ozch Bio-Material - Type 48";
123:                     break;
124:                 case 247697:
125:                 case 247698:
126:                     $bioinfo = "76";
127:                     $name = "Kyr'Ozch Bio-Material - Type 76";
128:                     break;
129:                 case 247699:
130:                 case 247700:
131:                     $bioinfo = "112";
132:                     $name = "Kyr'Ozch Bio-Material - Type 112";
133:                     break;
134:                 case 247701:
135:                 case 247702:
136:                     $bioinfo = "240";
137:                     $name = "Kyr'Ozch Bio-Material - Type 240";
138:                     break;
139:                 case 247703:
140:                 case 247704:
141:                     $bioinfo = "880";
142:                     $name = "Kyr'Ozch Bio-Material - Type 880";
143:                     break;
144:                 case 247705:
145:                 case 247706:
146:                     $bioinfo = "992";
147:                     $name = "Kyr'Ozch Bio-Material - Type 992";
148:                     break;
149:                 case 247102:
150:                 case 247103:
151:                     $bioinfo = "pristine";
152:                     $name = "Pristine Kyr'Ozch Bio-Material";
153:                     break;
154:                 case 247104:
155:                 case 247105:
156:                     $bioinfo = "mutated";
157:                     $name = "Mutated Kyr'Ozch Bio-Material";
158:                     break;
159:                 case 247764:
160:                 case 254804:
161:                     $bioinfo = "serum";
162:                     $name = "Kyr'Ozch Viral Serum";
163:                     break;
164:                 default:
165:                     $bioinfo = "";
166:                     $name = "Unknown Bio-Material";
167:                     continue;
168:             }
169: 
170:             $biotypeLink = $this->text->makeChatcmd($name, "/tell <myname> bioinfo $bioinfo $ql");
171:             $blob .= $biotypeLink . "\n\n";
172:         }
173: 
174:         if (count($bios) == 1) {
175:             // if there is only one bio, show detailed info by calling !bioinfo command handler directly
176:             $this->bioinfoCommand("", $channel, $sender, $sendto, array("bioinfo $bioinfo $ql", $bioinfo, $ql));
177:         } else {
178:             $msg = $this->text->makeBlob("Identified Bio-Materials", $blob);
179:             $sendto->reply($msg);
180:         }
181:     }
182:     
183:     /**
184:      * @HandlesCommand("bioinfo")
185:      * @Matches("/^bioinfo$/i")
186:      */
187:     public function bioinfoListCommand($message, $channel, $sender, $sendto, $args) {
188:         $blob .= "<header2>OFAB Armor Types<end>\n";
189:         $blob .= $this->getTypeBlob($this->leArmorTypes);
190:         
191:         $blob .= "\n<header2>OFAB Weapon Types<end>\n";
192:         $blob .= $this->getTypeBlob($this->leWeaponTypes);
193:         
194:         $blob .= "\n<header2>AI Armor Types<end>\n";
195:         $blob .= $this->getTypeBlob($this->aiArmorTypes);
196:         
197:         $blob .= "\n<header2>AI Weapon Types<end>\n";
198:         $blob .= $this->getTypeBlob($this->aiWeaponTypes);
199:         
200:         $msg = $this->text->makeBlob("Bio-Material Types", $blob);
201:         $sendto->reply($msg);
202:     }
203:     
204:     public function getTypeBlob($types) {
205:         $blob = '';
206:         forEach ($types as $type) {
207:             $blob .= $this->text->makeChatcmd($type, "/tell <myname> bioinfo $type") . "\n";
208:         }
209:         return $blob;
210:     }
211: 
212:     /**
213:      * This command handler shows info about a particular bio type.
214:      * @HandlesCommand("bioinfo")
215:      * @Matches("/^bioinfo (.+) (\d+)$/i")
216:      * @Matches("/^bioinfo (.+)$/i")
217:      */
218:     public function bioinfoCommand($message, $channel, $sender, $sendto, $args) {
219:         $bio = strtolower($args[1]);
220:         $ql = 300;
221:         if ($args[2]) {
222:             $ql = $args[2];
223:         }
224:         if ($ql < 1) {
225:             $ql = 1;
226:         } else if ($ql > 300) {
227:             $ql = 300;
228:         }
229: 
230:         if (in_array($bio, $this->leArmorTypes)) {
231:             $msg = $this->ofabArmorBio($ql, $bio);
232:         } else if (in_array($bio, $this->leWeaponTypes)) {
233:             $msg = $this->ofabWeaponBio($ql, $bio);
234:         } else if (in_array($bio, $this->aiArmorTypes)) {
235:             $msg = $this->alienArmorBio($ql, $bio);
236:         } else if (in_array($bio, $this->aiWeaponTypes)) {
237:             $msg = $this->alienWeaponBio($ql, $bio);
238:         } else if ($bio == 'serum') {
239:             $msg = $this->serumBio($ql, $bio);
240:         } else {
241:             $msg = "Unknown Bio-Material";
242:         }
243: 
244:         $sendto->reply($msg);
245:     }
246:     
247:     /**
248:      * Returns information of how much weapon of given $ql requires skills
249:      * to upgrade it.
250:      */
251:     private function getWeaponInfo($ql) {
252:         $ts_wep = floor($ql * 6);
253:         $text .= "\n\n<highlight>QL $ql<end> is the highest weapon this type will combine into.";
254:         if ($ql != 300) {
255:             $text .= "\nNote: <highlight>The weapon can bump several QL's.<end>";
256:         }
257:         $text .= "\n\nIt will take <highlight>$ts_wep<end> ME & WS (<highlight>6 * QL<end>) to combine with a <highlight>QL $ql<end> Kyr'ozch Weapon.";
258: 
259:         return $text;
260:     }
261: 
262:     /**
263:      * Returns list of professions (in a blob) whose ofab armor given $type
264:      * will upgrade.
265:      */
266:     private function ofabArmorBio($ql, $type) {
267:         $name = "Kyr'Ozch Bio-Material - Type $type";
268:         $item = $this->itemsController->getItem($name, $ql);
269: 
270:         $data = $this->db->query("SELECT * FROM ofabarmortype WHERE type = ?", $type);
271: 
272:         $blob = $item . "\n\n";
273:         $blob .= "<highlight>Upgrades Ofab armor for:<end>\n";
274:         forEach ($data as $row) {
275:             $blob .= $this->text->makeChatcmd($row->profession, "/tell <myname> ofabarmor {$row->profession}") . "\n";
276:         }
277: 
278:         return $this->text->makeBlob("$name (QL $ql)", $blob);
279:     }
280: 
281:     /**
282:      * Returns list of professions (in a blob) whose ofab weapon given $type
283:      * will upgrade.
284:      */
285:     private function ofabWeaponBio($ql, $type) {
286:         $name = "Kyr'Ozch Bio-Material - Type $type";
287:         $item = $this->itemsController->getItem($name, $ql);
288: 
289:         $data = $this->db->query("SELECT * FROM ofabweapons WHERE type = ?", $type);
290: 
291:         $blob = $item . "\n\n";
292:         $blob .= "<highlight>Upgrades Ofab weapons:<end>\n";
293:         forEach ($data as $row) {
294:             $blob .= $this->text->makeChatcmd("Ofab {$row->name} Mk 1", "/tell <myname> ofabweapons {$row->name}") . "\n";
295:         }
296: 
297:         return $this->text->makeBlob("$name (QL $ql)", $blob);
298:     }
299: 
300:     /**
301:      * Returns what special attacks given bio type adds to each ofab weapon and
302:      * tells how much skills analyzing the clump requires and how much skills
303:      * is needed to upgrade the weapon.
304:      */
305:     private function alienWeaponBio($ql, $type) {
306:         $name = "Kyr'Ozch Bio-Material - Type $type";
307:         $item = $this->itemsController->getItem($name, $ql);
308: 
309:         // Ensures that the maximum AI weapon that combines into doesn't go over QL 300 when the user presents a QL 271+ bio-material
310:         $maxaitype = floor($ql / 0.9);
311:         if ($maxaitype > 300 || $maxaitype < 1) {
312:             $maxaitype = 300;
313:         }
314: 
315:         $ts_bio = floor($ql * 4.5);
316: 
317:         $row = $this->db->queryRow("SELECT specials FROM alienweaponspecials WHERE type = ?", $type);
318:         $specials = $row->specials;
319: 
320:         $data = $this->db->query("SELECT * FROM alienweapons WHERE type = ?", $type);
321: 
322:         $blob = $item . "\n\n";
323:         $blob .= "It will take <highlight>$ts_bio<end> EE & CL (<highlight>4.5 * QL<end>) to analyze the Bio-Material.\n\n";
324: 
325:         $blob .= "<highlight>Adds {$specials} to:<end>\n";
326:         forEach ($data as $row) {
327:             $blob .= $this->itemsController->getItem($row->name, $maxaitype) . "\n";
328:         }
329: 
330:         $blob .= $this->getWeaponInfo($maxaitype);
331:         $blob .= "\n\n<yellow>Tradeskilling info added by Mdkdoc420 (RK2)<end>";
332: 
333:         return $this->text->makeBlob("$name (QL $ql)", $blob);
334:     }
335: 
336:     /**
337:      * Returns what skills and how much is required for analyzing the bio
338:      * material and building alien armor of it.
339:      */
340:     private function alienArmorBio($ql, $type) {
341:         // All the min/max QL and tradeskill calcs for the mutated/pristine process
342:         $min_ql = floor($ql * 0.8);
343:         if ($min_ql < 1) {
344:             $min_ql = 1;
345:         }
346:         if ($ql >= 1 && $ql <= 240) {
347:             $max_ql = floor($ql / 0.8);
348:         } else {
349:             $max_ql = 300;
350:         }
351: 
352:         $cl = floor($min_ql * 4.5);
353:         $pharma = floor($ql * 6);
354:         $np = floor($min_ql * 6);
355:         $psyco = floor($ql * 6);
356:         $max_psyco = floor($max_ql * 6);
357:         $ts_bio = floor($ql * 4.5);
358:         if (strtolower($type) == "mutated") {
359:             $name = "Mutated Kyr'Ozch Bio-Material";
360:             $chem = floor($ql * 7);
361:             $chem_msg = "7 * QL";
362:         } else if (strtolower($type) == "pristine") {
363:             $name = "Pristine Kyr'Ozch Bio-Material";
364:             $chem = floor($ql * 4.5);
365:             $chem_msg = "4.5 * QL";
366:             $extraInfo = "(<highlight>less tradeskill requirements then mutated.<end>)";
367:         } else {
368:             $name = "UNKNOWN";
369:         }
370:         //End of tradeskill processes
371: 
372:         $item = $this->itemsController->getItem($name, $ql);
373: 
374:         $blob = $item . "\n\n";
375:         $blob .= "It will take <highlight>$ts_bio<end> EE & CL (<highlight>4.5 * QL<end>) to analyze the Bio-Material.\n\n";
376: 
377:         $blob .= "Used to build Alien Armor $extraInfo\n\n" .
378:             "<highlight>The following tradeskill amounts are required to make<end> QL $ql<highlight>\n" .
379:             "strong/arithmetic/enduring/spiritual/supple/observant armor:<end>\n\n" .
380:             "Computer Literacy - <highlight>$cl<end> (<highlight>4.5 * QL<end>)\n" .
381:             "Chemistry - <highlight>$chem<end> (<highlight>$chem_msg<end>)\n" .
382:             "Nano Programming - <highlight>$np<end> (<highlight>6 * QL<end>)\n" .
383:             "Pharma Tech - <highlight>$pharma<end> (<highlight>6 * QL<end>)\n" .
384:             "Psychology - <highlight>$psyco<end> (<highlight>6 * QL<end>)\n\n" .
385:             "Note:<highlight> Tradeskill requirements are based off the lowest QL items needed throughout the entire process.<end>";
386: 
387:         $blob .= "\n\nFor Supple, Arithmetic, or Enduring:\n\n" .
388:             "<highlight>When completed, the armor piece can have as low as<end> QL $min_ql <highlight>combined into it, depending on available tradeskill options.\n\n" .
389:             "Does not change QL's, therefore takes<end> $psyco <highlight>Psychology for available combinations.<end>\n\n" .
390:             "For Spiritual, Strong, or Observant:\n\n" .
391:             "<highlight>When completed, the armor piece can combine upto<end> QL $max_ql<highlight>, depending on available tradeskill options.\n\n" .
392:             "Changes QL depending on targets QL. The max combination is: (<end>QL $max_ql<highlight>) (<end>$max_psyco Psychology required for this combination<highlight>)<end>";
393: 
394:         $blob .= "\n\n<yellow>Tradeskilling info added by Mdkdoc420 (RK2)<end>";
395: 
396:         return $this->text->makeBlob("$name (QL $ql)", $blob);
397:     }
398: 
399:     /**
400:      * Tells how much skills is required to analyze serum bio material and how
401:      * much skills are needed to to build buildings from it.
402:      */
403:     private function serumBio($ql, $type) {
404:         $name = "Kyr'Ozch Viral Serum";
405:         $item = $this->itemsController->getItem($name, $ql);
406: 
407:         $pharma_ts = floor($ql * 3.5);
408:         $chem_me_ts = floor($ql * 4);
409:         $ee_ts = floor($ql * 4.5);
410:         $cl_ts = floor($ql * 5);
411:         $ts_bio = floor($ql * 4.5);
412: 
413:         $blob = $item . "\n\n";
414:         $blob .= "It will take <highlight>$ts_bio<end> EE & CL (<highlight>4.5 * QL<end>) to analyze the Bio-Material.\n\n";
415: 
416:         $blob .= "<highlight>Used to build city buildings<end>\n\n" .
417:             "<highlight>The following are the required skills throughout the process of making a building:<end>\n\n" .
418:             "Quantum FT - <highlight>400<end> (<highlight>Static<end>)\nPharma Tech - ";
419: 
420:         //Used to change dialog between minimum and actual requirements, for requirements that go under 400
421:         if ($pharma_ts < 400) {
422:             $blob .= "<highlight>400<end>";
423:         } else {
424:             $blob .= "<highlight>$pharma_ts<end>";
425:         }
426: 
427:         $blob .= " (<highlight>3.5 * QL<end>) 400 is minimum requirement\nChemistry - ";
428: 
429:         if ($chem_me_ts < 400) {
430:             $blob .= "<highlight>400<end>";
431:         } else {
432:             $blob .= "<highlight>$chem_me_ts<end>";
433:         }
434: 
435:         $blob .= " (<highlight>4 * QL<end>) 400 is minimum requirement\n" .
436:             "Mechanical Engineering - <highlight>$chem_me_ts<end> (<highlight>4 * QL<end>)\n" .
437:             "Electrical Engineering - <highlight>$ee_ts<end> (<highlight>4.5 * QL<end>)\n" .
438:             "Comp Liter - <highlight>$cl_ts<end> (<highlight>5 * QL<end>)";
439: 
440:         $blob .= "\n\n<yellow>Tradeskilling info added by Mdkdoc420 (RK2)<end>";
441: 
442:         return $this->text->makeBlob("$name (QL $ql)", $blob);
443:     }
444: }
445: 
Budabot 4 Docs API documentation generated by ApiGen