• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Sample Characters

Znote

<?php echo $title; ?>
Staff member
Global Moderator
Premium User
Joined
Feb 14, 2008
Messages
7,030
Solutions
256
Reaction score
2,118
Location
Norway
GitHub
Znote
This is a very weird problem I encountered today. I think it is Modern AAC related.

All my sample vocations got
loss_containers = 10

However, when I create a character, it seem to import other values correctly, but the new character I create have
loss_containers = 100


I have also edited like loss_experience on sample characters from 1000 to 100, when creating new character, this works fine, new characters got loss_experience = 100 instead of 1000.

Any ideas why loss_containers is stuck at 100 even though samples are different? If it is not Modern AAC related, then what may be causing this?

Paxton if you want to see it yourself, I can send you scaffolding access over PM. So you can see the samples, create a character, see the difference between samples and your character yourself.

ALSO:

PHP:
/*Premdays given when creating new account.*/
$config['premDays'] = 7;

When creating account, your still free account. Dosn't seem to work.
 
Last edited:
For now fix.

Try setting in character.php controller in create_chaarcter method

$player->setLossExperience($char_to_copy->getLossExperience());
$player->setLossMana($char_to_copy->getLossMana());
$player->setLossSkills($char_to_copy->getLossSkills());
$player->setLossItems($char_to_copy->getLossItems());

change that to values so

$player->setLossExperience(10);
$player->setLossMana(10);
$player->setLossSkills(10);
$player->setLossItems(10);

didnt test it but should be working
 
For now fix.

Try setting in character.php controller in create_chaarcter method

$player->setLossExperience($char_to_copy->getLossExperience());
$player->setLossMana($char_to_copy->getLossMana());
$player->setLossSkills($char_to_copy->getLossSkills());
$player->setLossItems($char_to_copy->getLossItems());

change that to values so

$player->setLossExperience(10);
$player->setLossMana(10);
$player->setLossSkills(10);
$player->setLossItems(10);

didnt test it but should be working

Didn't notice your post until I solved the problem on my own.
By the way, I did WAY more than just that xD
But thank you so much for emergency solution. :D

LossItems on new tfs 0.4 means the backpack slot.
LossContainer means equipment.

LossContainer does not exist in your php files, most likely because part of it comes from old Gesior.

Took a while, but I got it successfully working.
// VERY proud to solve this problem on my own, cause I suck in PHP :D
// + all thanks to samples and repeated scripts for similar stuff, copy-paste and rename huahuahua
// ++ I basically just followed the existing pattern and extended it with loss_containers
The only thing I added was: Bigger compatibility for the convertion between sample characters and newly created characters.

Files are modified by Znote, originally taken from Modern AAC rev 198
OTS_Player.php
http://pastebin.ca/1917728

Character.php
http://pastebin.ca/1917727

Tested and fully working. Took me at least 2 hours. Goes pretty slow when you learn as you script. :p

What did I do?

Create function GetLossContainers
Create function SetLossContainers

Extended 4 - 6 SQL query lines with loss_containers

Created 2 cases related to lossContainers

I think the only thing I did in character.php was this:
$player->setLossContainers($char_to_copy->getLossContainers());


PremDays
I tried to investigate why I wasn't getting any prem days even though its configured. ( $config['premDays'] = 7; )

And I ended up with this:
PHP:
/**
 * @version 0.0.4
 * @param int $pacc PACC days.
 * @deprecated 0.0.3 There is no more premdays field in accounts table.
 */
    public function setPACCDays($premdays)
    {
    }

Version 0.0.4 as in TFS 0.4 I am using.

Seems to be rather empty. :p

Btw premdays does exist in tfs 0.4 accounts table.
 
Last edited:
You should commit my changes to the svn. :p
 
Forgot again? :p I havent seen it getting comitted yet.

The pastebin links will only last for about 15 days more.
 
Ahh can anyone else commit it? I'm unable to do it, I've changed my system completly, and I haven't got SVn access right now.
 
Put me in your svn dev team so I can do the small optimizations myself. Would save us all some time. :p
 
Back
Top