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

Lua help with shop

matthew123456

New Member
Joined
Aug 24, 2013
Messages
121
Reaction score
3
how to make the ingmae store load premium points instead of coins so that when people buy premium points they can be used with ingame store thanks in advance
 
You need to post more information if you're going to ask for help
TFS Version, script, etc
No one knows what your ingame store is.
 
Are you talking about the Store (that currently isn't in TFS) or the NPC shop trade window?

If you're talking about the Store, first you will have to implement the logic for the Store then you can just use your "premium points" instead of Tibia coins as the value that is sent to the client. If you're talking about the NPC shop trade window, you can use your "premium points" instead of money here: https://github.com/otland/forgottenserver/blob/master/src/protocolgame.cpp#L1486
Then you will have to change the NPC shop logic to remove "premium points" instead of money.
 
I have no idea if this will help.

shopadmin.php
Code:
$player_data = $SQL->query("SELECT * FROM `players` WHERE `name` = '".$player."';")->fetch();
        $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '".$points."' WHERE `id` = '".$player_data['account_id']."'");
        $main_content .= '<b><center>'.$points.' Premium Points added to the account of <i>'.$player.'</i> !</b></center><br>
Code:
$player_data = $SQL->query("SELECT * FROM `players` WHERE `name` = '".$player."';")->fetch();
        $SQL->query("UPDATE `accounts` SET `coins` = `coins` + '".$points."' WHERE `id` = '".$player_data['account_id']."'");
        $main_content .= '<b><center>'.$points.' Coins added to the account of <i>'.$player.'</i> !</b></center><br>
 
Back
Top Bottom