• 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!

[Gesior ACC] Buy / sell characters

;( k thanks, can you make a new one for newer versions? it is useful system.
 
It's yes, but I'm not always on the host and I need to be quick to adjust some just for the website, understand?


Anyway thank you very much for your attention.
Ah I see. Anyways this release is very dated. I am sure there are better and new ones
 
If someone uses PHP 7.0, where MySQL extension has been removed, use this (changed mysql_ functions to PDO).

It also works with MyAAC.
 

Attachments

  • character-auctions-fixed.zip
    2.8 KB · Views: 101 · VirusTotal
Last edited by a moderator:
I'm clicking in submit and nothing happens, i tryed to put another thing like "@#$@ or ASDOPSAKD" to see some error but nothing happens too ...
Someone can help-me? please !
 
I'm clicking in submit and nothing happens, i tryed to put another thing like "@#$@ or ASDOPSAKD" to see some error but nothing happens too ...
Someone can help-me? please !
I am not sure if this old release works anymore =/ sry
 
I really hope people don't have this live on their servers.

These scripts do work, but they are so easy to exploit.
By 1 simple edit client side I managed to sell a a char on the main account, for 0 coins on a fresh account then buy it on it thus transferring to my new account.
You can also put a char up for sale at 10000 points, and buy it for 1 point even those it clearly said 10000 all client side on a fresh none admin account.

I wouldn't say my work is very clean but I managed to fix the selling but haven't looked into the buying yet.

replace:
PHP:
$players_from_logged_acc = $account_logged->getPlayersList();

$players_from_logged_acc->orderBy('name');
$main_content .= '<form action="" method="post"><select name="char">';
foreach($players_from_logged_acc as $player)
{
    $main_content .= '<option>'.$player->getName().'</option>';
}

with:
PHP:
        $charArray = array();
        $acct = false;
        $players_from_logged_acc = $account_logged->getPlayersList();
 
            $players_from_logged_acc->orderBy('name');
            $main_content .= '<form action="" method="post"><select name="char">';
            foreach($players_from_logged_acc as $player)
            {
                $charArray[] = $player->getName();
                $main_content .= '<option>'.$player->getName().'</option>';
            }

replace:
PHP:
if ($char && $price) {

with:
PHP:
            $tmp = str_replace("'", '', $char);  
            if (in_array($tmp, $charArray )) { $acct = true; }
           if ($char && $price && $acct) {

When it gets the playerslist, it creates an array with the list of chars on the account.
It then compares this array when the form is submitted to what was entered in $char if that char exists it flags a true Boolean which is then compared when the char is being sold.

I hope this can help help someone who is using it for now.
 
Can't edit my other post, but there is some code in here from my post Here

Limit chars sale to above a level:
Replace:
PHP:
<?PHP
    if($logged) {
        $main_content .= '<center><b>Here you can put your level character on sale!</center></b><br>';

With:
PHP:
<?PHP
    if($logged) {
        $sellLevel = 100;
        $main_content .= '<center><b>Here you can put your level '.$sellLevel .'+     character on sale!</center></b><br>';


Replace:
PHP:
foreach($players_from_logged_acc as $player)
            {
                $charArray[] = $player->getName();
                $main_content .= '<option>'.$player->getName().'</option>';
            }

With:
PHP:
foreach($players_from_logged_acc as $player)
        {
            if ($player->getLevel() > $sellLevel)  {
              $charArray[] = $player->getName();
              $main_content .= '<option>'.$player->getName()'</option>';
            }
        }

I still haven't had chance to look at the buy code yet.
But I couldn't find another way to bug out the selling of chars using the edits I had made it the previous post.
Hope this helps.
 
Nice! U can too add a block of Online Characters.
PHP:
foreach($players_from_logged_acc as $player)
        {
            if ($player->getLevel() > $sellLevel AND $player->isOnline() <> 1))  {

This will make it so if the player is online it won't generate the name in the list.
sell.png
 
But if u will use Inspect Element u still can add him.
Technically no, if you had used the code I posted previously, it checks the PHP created array to see if the character exists in it, as you are not adding the player to that list as the player is either lower than sell level or is online it shouldn't allow the code to trigger.
.
These two parts:
PHP:
$charArray[] = $player->getName();
if (in_array($tmp, $charArray )) { $acct = true; }

With the original code you can add anyone on the server including GM chars and could even buy chars for 0 coins instead of their real price as to my original post saying I hope no-one uses this live..

I just tested it on mine (slightly more modified than the original version) and i could not sell a character that was online.
 
Guys how i can add addons to buy character lists? and how i can add name change after buy character?
 
Back
Top