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

Tibia Coins on start

zerghel

Tsuni
Joined
Jul 1, 2008
Messages
299
Reaction score
9
hello dear otlanders
hope someone can help me to create a simple script
how to give tibia coins on Account Creation?
 
in data/creaturescripts/scripts/login.lua
Most of these scripts have a conditional scope for first time logins where they prompt for your outfit, this is also the place to put whatever code you need to add to give them tibia coins.

Or through whichever website your using during character creation.

Edit: Or well, account creation, not character creation. I think it has to be done through the AAC.
 
Last edited:
hello dear otlanders
hope someone can help me to create a simple script
how to give tibia coins on Account Creation?

Based on which platform? Example of gesior acc, after this line in createaccount and before $reg_account->save(); :

PHP:
$number_of_points = 10;
$reg_account->set('premium_points', ($reg_account->getCustomField('premium_points')+$number_of_points));

If you want give it on player login:

Code:
local number_of_points = 10
if player:getStorageValue(9999) < 1 then
    db.query("UPDATE accounts SET premium_points = premium_points+"..(number_of_points).." WHERE id IN (SELECT account_id FROM players WHERE id='"..(player:getGuid()).."');")
    player:setStorageValue(9999, 1)
end

try it
 
Last edited:
giving it onlogin using player storage the user can just create 50 char and delete them in order to take as many coin as they want to

Giving it on anywhere the user can just create many accounts/characters to take as many coin they want lol.
To control it and give only once to the user, you would have to have a kind of intelligent system or you can manually give players some code and create a talkaction script so they can execute and receive the points.
Bt you can just use the example above, to give when user create his account on webpage.
 
Last edited:
Giving it on anywhere the user can just create many accounts/characters to take as many coin they want lol.
To control it and give only once to the user, you would have to have a kind of intelligent system or you can manually give players some code and create a talkaction script so they can execute and receive the points.
Bt you can just use the example above, to give when user create his account on webpage.
you actually just need account storage, since I don't think coins are transferable in TFS right now:
 
you actually just need account storage, since I don't think coins are transferable in TFS right now:

Account storage, but we can create many accounts, so... And the correct thing is to be able to transfer coins.
 
Based on which platform? Example of gesior acc, after this line in createaccount and before $reg_account->save(); :

PHP:
$number_of_points = 10;
$reg_account->set('premium_points', ($reg_account->getCustomField('premium_points')+$number_of_points));

If you want give it on player login:

Code:
local number_of_points = 10
if player:getStorageValue(9999) < 1 then
    db.query("UPDATE accounts SET premium_points = premium_points+"..(number_of_points).." WHERE id IN (SELECT account_id FROM players WHERE id='"..(player:getGuid()).."');")
    player:setStorageValue(9999, 1)
end

try it
im using myaac right now
 
Back
Top