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

account begins with three days vip

fera holy kina

Ubuntu 10.04
Joined
Jan 27, 2009
Messages
192
Reaction score
5
anyone have any script that begins with three days in each VIP account using the query vipdays

or you can create one for me?

I think it's the script that creates that creaturescripts

#yes and a VIP trial so very much wanted a script
 
Last edited:
creaturescripts/scripts vipdays.xml
Code:
function onLogin(cid) 
 
local days = 3
local id = 10070
local config = { 
msg = "Você acaba de ganhar 3 dias de VIP!", 
}  
if (getPlayerStorageValue(cid, id == 1)) then
	return true
else  
	doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, config.msg) 
	doAddVipDays(cid, days)
	doPlayerSetStorageValue(cid, id, 1) 
end
end

on login.lua add this
Code:
registerCreatureEvent(cid, "VipDays")

on creaturescripts.xml add this
Code:
<event type="login" name="VipDays" script="vipdays.lua"/>

remember check if u has the function on 050-function.lua on lib folder

Code:
function doAddVipDays(cid, days)
    db.query("UPDATE `accounts` SET `vip_time` = `vip_time` + " .. days .. " WHERE `id` = " .. getPlayerAccountId(cid) .. ";")
end

see if you has vip_time or vipdays on table accounts
 
Thank! you discovered a simpler way

instead of
ALTER TABLE `accounts` ADD `vipdays` int(11) NOT NULL DEFAULT 0;
this place that has the "3" instead of "0"
ALTER TABLE `accounts` ADD `vipdays` int(11) NOT NULL DEFAULT 3;

so more work to care for the first time "I think"
 
in config.php (if use gesior) there is a
XML:
newplayer_premdays
write how many vip days u want and use this SQL command
Code:
UPDATE accounts SET premdays = 1000;
or how many prem days you want
 
Last edited:
Back
Top