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

Tutorial Best Vip System! Full!

Gracias por la ayuda amigo... el sistema ta muy bien
ahora he implementado lo siguiente en el mio
Que cuando se acabe la Vip lo mande a thais y la exp. 50% adicional
para eso he hecho esto
En Creaturescript.xml
Code:
<event type="login" name="vip" event="script" value="vip.lua"/>
<event type="login" name="exp" event="script" value="exp.lua"/>

y en login .lua agregue esto
Code:
registerCreatureEvent(cid, "Mail")
registerCreatureEvent(cid, "GuildEvents")
registerCreatureEvent(cid, "vip")
registerCreatureEvent(cid, "exp")
registerCreatureEvent(cid, "Idle")

en Vip.lua he puesto
Code:
function onLogin(cid)
if isPremium(cid) == TRUE then
if getPlayerStorageValue(cid, 30002) == -1 then
setPlayerStorageValue(cid, 30002, 1)
end
elseif isPremium(cid) == FALSE then
if getPlayerStorageValue(cid, 30002) == 1 then
setPlayerStorageValue(cid, 30002, -1)
doPlayerSetTown(cid, 1)
doTeleportThing(cid, {x = 32369, y = 32239, z = 7, stackpos = 1}, TRUE)
end
end
return TRUE
end
y exp.lua
Code:
local ex = getPlayerRates(cid)[SKILL__LEVEL]
function onLogin(cid)
if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 12345) == 0 then
setPlayerStorageValue(cid, 12345, 1)
doPlayerSetRate(cid, SKILL__LEVEL, (ex+0.05))

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
doPlayerSetRate(cid, SKILL__LEVEL, (ex-0.05))
setPlayerStorageValue(cid, 12345, 0)
end

return TRUE
end

y al final este es mi problema... esto me sale en consola
Code:
[18/11/2012 16:54:24] [Error - Test Interface] 
[18/11/2012 16:54:24] data/creaturescripts/scripts/exp.lua
[18/11/2012 16:54:24] Description: 
[18/11/2012 16:54:24] (LuaInterface::luaGetPlayerRates) Player not found

[18/11/2012 16:54:24] [Error - Test Interface] 
[18/11/2012 16:54:24] data/creaturescripts/scripts/exp.lua
[18/11/2012 16:54:24] Description: 
[18/11/2012 16:54:24] data/creaturescripts/scripts/exp.lua:1: attempt to index a boolean value
[18/11/2012 16:54:24] [Error - Event::checkScript] Cannot load script (data/creaturescripts/scripts/exp.lua)

Adicionalmente los Player estando en la Ciudad VIP no son regresados a Thais...

Gracias por la ayuda que pueas dar
 
@up:
exp.lua
Code:
local ex = getPlayerRates(cid)[SKILL__LEVEL]
cambia por
Code:
local ex = getPlayerRates(cid, SKILL__LEVEL)
 
Gracias amigo =( pero no funciona aun...
Code:
[Error - Test Interface] 
[18/11/2012 17:59:11] data/creaturescripts/scripts/exp.lua
[18/11/2012 17:59:11] Description: 
[18/11/2012 17:59:11] (LuaInterface::luaGetPlayerRates) Player not found

[18/11/2012 17:59:11] [Error - CreatureScript Interface] 
[18/11/2012 17:59:11] data/creaturescripts/scripts/exp.lua
[18/11/2012 17:59:11] Description: 
[18/11/2012 17:59:11] (LuaInterface::luaGetPlayerRates) Player not found
 
Prueba así:
Code:
local ex = getPlayerRates(cid)[SKILL__LEVEL]
function onLogin(cid)
if isPlayer(cid) then
if isPremium(cid) == TRUE and getPlayerStorageValue(cid, 12345) == 0 then
setPlayerStorageValue(cid, 12345, 1)
doPlayerSetRate(cid, SKILL__LEVEL, (ex+0.05))

elseif isPremium(cid) == FALSE and getPlayerStorageValue(cid, 12345) == 1 then
doPlayerSetRate(cid, SKILL__LEVEL, (ex-0.05))
setPlayerStorageValue(cid, 12345, 0)
end
end
return TRUE
end
 
Creo que postee una cosa para que diera mas exp, comparalo y coje la funcion hay.
 
Mmmm elexonic no crees que sera mejor poner todas las funciones en un unico script y luego irlas llamando? Lo veo mas practico para los que usen tu vip system
 
Jonas : No lo habia visto :p , nah [ bueno si..] pero asi cojen y usan la que quieran..
samuelsami: donde dice... los dias que se agregaran.. ponle 999 ...
 
Me da error en los addons!!!
Los outfits.xml ya borre la parte de premium y los outfits funcionan pero los addons no :S
En mi config.lua no sale nada de addons para premium true ni false ni nada
Ayuda plis
 
Heyy Una Ayuda Como Agregar el Script Vip En El Nombre [Vip] En Mi Servidor Ayuda Soy Nuevo

Osea Este Script

function onLogin(cid)
if isPremium(cid) == TRUE then
db.executeQuery("UPDATE `players` SET `name` = '[VIP]" .. getCreatureName(cid) .. "' WHERE `id` = " .. getPlayerGUID(cid))
elseif isPremium(cid) == FALSE then
db.executeQuery("UPDATE `players` SET `name` = " .. getCreatureName(cid) .. " WHERE `id` = " .. getPlayerGUID(cid))
end

return true
end


Gracias Y Saludos
 
function onLogin(cid)
if isPremium(cid) == TRUE then
if getPlayerStorageValue(cid, 30002) == -1 then
setPlayerStorageValue(cid, 30002, 1)
end
elseif isPremium(cid) == FALSE then
if getPlayerStorageValue(cid, 30002) == 1 then
setPlayerStorageValue(cid, 30002, -1)
doPlayerSetTown(cid, 1)
doTeleportThing(cid, {x = 381, y = 602, z = 7, stackpos = 1}, TRUE)
end
end
return TRUE
end


Amigos Utilize este Script y no me funciona ni este ni los otros de end vip aca una imagen , el resto funciona bien lo que es agregar los dias por item, el piso premium tambien funciona, pero el de endvip no funciona, Error:; Unexpected symbol near 'N' anexo imagen.
 

Attachments

Last edited:
oie como impolementarias esto en Canary server 12.86

function onLogin(cid)
if not isPremium(cid) then
doTeleportThing(cid, getTownTemplePosition(1))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Your vip has ended.")
end
return true
end

me gusta esto de que cuando se te acabe la premium regrese al templo
 
algun sistema vip que no sea con premium, ejemplo yo tengo la premium time gratis en mi servidor pero tengo islas vip que me gustaria configurar solo para vips
 
Back
Top