• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

sell/buy characters on gesior acc please

Solution
In that case you have to edit the script itself aswell as classes/player.php as you wrote above.
Might have to change a couple of more things aswell, might be easier to change the store to use premium_points insted.

Let's hope that websites uses the same schemas ~ with 2.0, that would make things alot easier :p
Code
changed to PremiumPoints
I have one but have an little problem, If the account have 2 or more characters when player click on second char for sell, the script put the first char for sale (the char Which is on the top).
..


Script php:


Code:
$main_content .= '<form style="margin-bottom:-1px" role="form" action="?subtopic=accountmanagement&action=sellchar" method="post" id="sellcharform"><input type="hidden" value="'.$account_player->getID().'" name="playerid">[<a href="#" onclick="document.getElementById(\'sellcharform\').submit();">Sell</a>]</form></td></tr>';

//########### SELL CHARACTER ##########
    if($action == "sellchar")
    {
        $playerid = $_POST['playerid'];
        $player = new Player();
        $player->loadById($playerid);
        if($player->isLoaded())
        {
            $player_account = $player->getAccount();
            if($account_logged->getID() == $player_account->getID())
            {
                if($_POST['sellcharacter'] == 1)
                {
                    if($account_logged->getPremiumPoints() >= 5)
                    {
                        $price = (int) $_POST['price'];
                        if($price >= 1)
                        {
                            if(!$player->isOnline())
                            {
                                $auction = new Notification();
                                $auction->setOldAccountID($account_logged->getID());
                                $auction->setPlayerID($player->getID());
                                $auction->setPrice($price);
                                $auction->setStatus(0);
                                $auction->save();

                                $player->setAccountID(1);
                                $player->save();
                                $account_logged->addPremiumPoints(-5);
                                $account_logged->save();
                                $main_content .= '<div class="alert alert-success">'.$player->getName().' has been put on sale, you can check it by <a href="?subtopic=characterauction">clicking here</a>.</div>';
                            }
                            else{
                                $main_content .= '<div class="alert alert-danger"><center><font color="red">Character must be offline.</font></center></div>';
                            }
                        }
                        else{
                            $main_content .= '<div class="alert alert-danger">Minimum price is 1 tibia coin.</div>';
                        }
                    }
                    else
                    {
                        $main_content .= '<div class="alert alert-danger">You need 5 tibia coins to put a character on sale.</div>';
                    }
                }
                $main_content .= '
                    <div class="SmallBox">
                        <div class="MessageContainer">
                            <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);"></div>
                            <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
                            <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
                            <div class="Message">
                                <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></div>
                                <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></div>
                                <table class="HintBox">
                                    <tbody>
                                        <tr>
                                            <td><form class="form-horizontal" role="form" action="?subtopic=accountmanagement&action=sellchar" method="post">
                                            <p>By placing a character on sale, it will leave your account and go to a special account.</p><p>You will be able to remove the offer later on, and the character will come back without any cost.</p><p>Upon a sale, the character is moved to the new buyers account, and the money is added to your account.</p><p>Its cost <strong>5 tibia coins</strong> to place a character in sale, these points is not recovered whatsoever.</p>
                                                <input type="hidden" name="playerid" value="'.htmlspecialchars($player->getID()).'">
                                                <input type="hidden" name="sellcharacter" value="1">
                                                <p><b>'.htmlspecialchars($player->getName()).'</b></p>
                                           
                                                <p><input type="number"  name="price" placeholder="enter a value in premium points"></p>
                                                <p>                                           
                                                    <button type="submit">Submit</button>
                                                    <a href="?subtopic=accountmanagement">Back</a>
                                                </p>
                                                </form>
                                            </td>
                                           
                                        </tr>
                                       
                                        <tr></tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);"></div>
                            <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
                            <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
                        </div>
                    </div>
                    <br>';


            }
            else {
                $main_content .= "<div class='alert alert-danger'>Character <b>" . htmlspecialchars($player_name) . "</b> does not belong to you.</div>";
            }

        }
        else
        {
            $main_content .= "<div class='alert alert-danger'>Character could not be loaded, please contact a support.</div>";
        }

    }
 
I have one but have an little problem, If the account have 2 or more characters when player click on second char for sell, the script put the first char for sale (the char Which is on the top).
..


Script php:


Code:
$main_content .= '<form style="margin-bottom:-1px" role="form" action="?subtopic=accountmanagement&action=sellchar" method="post" id="sellcharform"><input type="hidden" value="'.$account_player->getID().'" name="playerid">[<a href="#" onclick="document.getElementById(\'sellcharform\').submit();">Sell</a>]</form></td></tr>';

//########### SELL CHARACTER ##########
    if($action == "sellchar")
    {
        $playerid = $_POST['playerid'];
        $player = new Player();
        $player->loadById($playerid);
        if($player->isLoaded())
        {
            $player_account = $player->getAccount();
            if($account_logged->getID() == $player_account->getID())
            {
                if($_POST['sellcharacter'] == 1)
                {
                    if($account_logged->getPremiumPoints() >= 5)
                    {
                        $price = (int) $_POST['price'];
                        if($price >= 1)
                        {
                            if(!$player->isOnline())
                            {
                                $auction = new Notification();
                                $auction->setOldAccountID($account_logged->getID());
                                $auction->setPlayerID($player->getID());
                                $auction->setPrice($price);
                                $auction->setStatus(0);
                                $auction->save();

                                $player->setAccountID(1);
                                $player->save();
                                $account_logged->addPremiumPoints(-5);
                                $account_logged->save();
                                $main_content .= '<div class="alert alert-success">'.$player->getName().' has been put on sale, you can check it by <a href="?subtopic=characterauction">clicking here</a>.</div>';
                            }
                            else{
                                $main_content .= '<div class="alert alert-danger"><center><font color="red">Character must be offline.</font></center></div>';
                            }
                        }
                        else{
                            $main_content .= '<div class="alert alert-danger">Minimum price is 1 tibia coin.</div>';
                        }
                    }
                    else
                    {
                        $main_content .= '<div class="alert alert-danger">You need 5 tibia coins to put a character on sale.</div>';
                    }
                }
                $main_content .= '
                    <div class="SmallBox">
                        <div class="MessageContainer">
                            <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);"></div>
                            <div class="BoxFrameEdgeLeftTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
                            <div class="BoxFrameEdgeRightTop" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
                            <div class="Message">
                                <div class="BoxFrameVerticalLeft" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></div>
                                <div class="BoxFrameVerticalRight" style="background-image:url('.$layout_name.'/images/content/box-frame-vertical.gif);"></div>
                                <table class="HintBox">
                                    <tbody>
                                        <tr>
                                            <td><form class="form-horizontal" role="form" action="?subtopic=accountmanagement&action=sellchar" method="post">
                                            <p>By placing a character on sale, it will leave your account and go to a special account.</p><p>You will be able to remove the offer later on, and the character will come back without any cost.</p><p>Upon a sale, the character is moved to the new buyers account, and the money is added to your account.</p><p>Its cost <strong>5 tibia coins</strong> to place a character in sale, these points is not recovered whatsoever.</p>
                                                <input type="hidden" name="playerid" value="'.htmlspecialchars($player->getID()).'">
                                                <input type="hidden" name="sellcharacter" value="1">
                                                <p><b>'.htmlspecialchars($player->getName()).'</b></p>
                                          
                                                <p><input type="number"  name="price" placeholder="enter a value in premium points"></p>
                                                <p>                                          
                                                    <button type="submit">Submit</button>
                                                    <a href="?subtopic=accountmanagement">Back</a>
                                                </p>
                                                </form>
                                            </td>
                                          
                                        </tr>
                                      
                                        <tr></tr>
                                    </tbody>
                                </table>
                            </div>
                            <div class="BoxFrameHorizontal" style="background-image:url('.$layout_name.'/images/content/box-frame-horizontal.gif);"></div>
                            <div class="BoxFrameEdgeRightBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
                            <div class="BoxFrameEdgeLeftBottom" style="background-image:url('.$layout_name.'/images/content/box-frame-edge.gif);"></div>
                        </div>
                    </div>
                    <br>';


            }
            else {
                $main_content .= "<div class='alert alert-danger'>Character <b>" . htmlspecialchars($player_name) . "</b> does not belong to you.</div>";
            }

        }
        else
        {
            $main_content .= "<div class='alert alert-danger'>Character could not be loaded, please contact a support.</div>";
        }

    }

Not the correct script, the script should have a class named Notification.
That seems to be a cut from your acc manag.php
 
Thats why I come here to request some script good :D

Yes and as I wrote in the first post there are scripts out there, trust me it is alot easier to get support for website stuff than finding ppl who will do it for free :p
Give them all another try and make a clean install, you should be fine with that.
 
Back
Top