Skip to content

Instantly share code, notes, and snippets.

View slawkens's full-sized avatar

Slawomir Boczek slawkens

View GitHub Profile
@slawkens
slawkens / powergamers.php
Created January 17, 2025 21:34
Powergamers from Gesior for MyAAC 0.8 and 1.0
<?php
defined('MYAAC') or die('Direct access not allowed!');
$limit = 50;
$type = $_REQUEST['type'] ?? '';
function coloured_value($valuein)
{
$value = '';
$value2 = $valuein;
while(strlen($value2) > 3)
@slawkens
slawkens / onlinetime.php
Created January 17, 2025 21:33
OnlineTime from Gesior for MyAAC 0.8 and 1.0
<?php
defined('MYAAC') or die('Direct access not allowed!');
$limit = 50;
$type = $_REQUEST['type'] ?? '';
function hours_and_minutes($value, $color = 1)
{
$hours = floor($value / 3600);
$value = $value - $hours * 3600;
$minutes = floor($value / 60);
@slawkens
slawkens / import_menus.php
Last active December 20, 2024 19:18
Import odin menus to MyAAC
<?php
/**
* Paste this into system/pages/import_menus.php
*
* Then visit http://localhost/?import_menus
* The menus will be created.
**/
$menus = [
@slawkens
slawkens / generator.php
Last active October 14, 2023 10:41
Generate random X players in MyAAC, may be used for performance testing. Save in system/pages, then go to http://localhost/?p=generator It may take a while to load. You may also want to adjust account id
<?php
for ($i = 0; $i <= 5500; $i++) {
$player = new OTS_Player();
$player->setName(generateRandomString(10));
$player->setAccountId(1);
$player->setGroupId(1);
$player->save();
}
@slawkens
slawkens / events.php
Last active May 25, 2023 20:25
MyAAC Events Box (For tibiacom template)
<?php
/**
* Installation:
* 1) place this file into "templates/tibiacom/boxes/"
* 2) place events.png that can be found below this script, into "templates/tibiacom/images/themeboxes"
* 3) edit config.ini in tibiacom folder and add "events" into "boxes", so it looks like this:
* boxes = "highscores,newcomer,gallery,networks,poll,events"
*
* Original author: Rusherzin
* Found on: https://tibiaking.com/forums/topic/76526-widget-upcoming-events-para-tfs-12/?do=findComment&comment=429655
@slawkens
slawkens / auction.php
Last active October 25, 2024 10:15
Character Auction for MyAAC
<?PHP
#################################################
### Scripted by Shadow_ ###
### All rights reserverd ###
### Do not use/distribute without permission! ###
### Contact: Discord: Carcoo#2914 ###
### [email protected] ###
#################################################
/*
In MySQL: