BlackTibia

No estás conectado. Conéctate o registrate

 » Open Tibia » Pedido de Scripts » 

[Pedido] Premium Points Trade

[Pedido] Premium Points Trade

#1 [Pedido] Premium Points Trade el Vie Ago 01, 2014 8:07 pm

Yoiker


Miembro
Hola Invitado, si lees este post es por que necesito ayuda con un script.

Consiste en vender puntos premium de player a player ( Trade ) ejemplo: !sellpoints name, cantidad de puntos -- A otro jugador con la ventana de trade, es posible? como mínimo a tradear 1 punto máximo 1000 o más



Última edición por Yoiker el Sáb Ago 02, 2014 10:20 am, editado 1 vez

#2 Re: [Pedido] Premium Points Trade el Sáb Ago 02, 2014 10:05 am

Yoiker


Miembro
Bump

#3 Re: [Pedido] Premium Points Trade el Sáb Ago 02, 2014 10:48 am

Black Prada


Miembro
es posible pero se necesitan modificar muchsas cosas como sourcers , bariables ya que en trade si te da cuenta no marca los premium_points que tiene el jugador si no que marca los gold coints que tiene es demaciado dificil esto

#4 Re: [Pedido] Premium Points Trade el Sáb Ago 02, 2014 8:15 pm

GOD Kimber


Miembro
._. realmente me impresiona como wtfs saben que voy a ver este tema xD -
- respecto al tema pera ya te respondo xD

#5 Re: [Pedido] Premium Points Trade el Sáb Ago 02, 2014 8:17 pm

Yoiker


Miembro
@Black Prada
Ok pero aún no compilo mi ot, será en un tiempo más adelante..

#6 Re: [Pedido] Premium Points Trade el Sáb Ago 02, 2014 8:32 pm

Dantarrix


Miembro
@God Kimber: espero que tu primer comentario haya sido irónico... Solo para que no se rían todos de ti, di que sí jaja

www.blacktibia.org: Dirección del foro
www.blacktibia.org : Dirección del foro con enlace
BlackTibia : Nombre del Foro
BlackTibia : Nombre del foro con enlace
: Descripción del sitio
Jue Jun 03, 2010 3:58 pm : Fecha de inicio del Foro
2375 : Días que lleva el foro desde que inicio
112 : Numero de foros/categorías
37996 : Cantidad de mensajes
213328 : Cantidad de envíos
20762 : Cantidad de usuarios
250 : Numero del récord de usuarios conectados
Miér Ago 14, 2013 11:14 pm : Fecha del récord de usuarios conectados
drekios2693 : Ultimo usuario registrado
drekios2693 : Ultimo usuario registrado con enlace
Invitado : Nombre de usuario
Invitado : Nombre de usuario con enlace al perfil
0 : Fecha de nacimiento del usuario
0 : Edad del usuario
: Fecha de registro
: Ultima visita del usuario
0 : Cantidad de mensajes

Son BBCodes

#7 Re: [Pedido] Premium Points Trade el Sáb Ago 02, 2014 8:49 pm

Yoiker


Miembro
@Dantarrix
Lee mp

#8 Re: [Pedido] Premium Points Trade el Dom Ago 03, 2014 11:37 am

GOD Kimber


Miembro
si fue ironico haha,losiento por no responderte yoiker ,tenia un script como ese pero no se tradeaba ,solo era
!transfer,(nombre) ,y puntos que decees enviar
nose donde esta :c estuve buscando en otland pero consegui uno que es Npc's pero no suben el script :/

#9 Re: [Pedido] Premium Points Trade el Dom Ago 03, 2014 12:42 pm

Black Prada


Miembro
@GOD Kimber respondere por el pero si estoi mal que me corrija

Código:
el lo que quiere es que al decir !trasnfer GOD Kimber
-se te abra la ventana de shopmodul(trade) ati mismo sinq ue tu te lo esperes o ( ya bien te lo pudiste aver esperado ) algo asi como decir hi, trade
-ya habierta la ventana de trade tu (GOD Kimber) podras venderle puntos que seguramenet tu deves de tener por ejemplo si tienes 1500 premium_points le apareceran en la ventana de trade & el te os podra comprar por dienro ccs

si estoi mal vuelvo a decir corijanme
el pide un talkactions sii!
pero no pide un talkactions dond edigas !trasnfer God Kimber, 100, 1500

saludos

#10 Re: [Pedido] Premium Points Trade el Dom Ago 03, 2014 5:42 pm

Yoiker


Miembro
@UP
Exacto, pero lo que más quiero es que se puedan negociar de player a player!! no transferir del todo, me explico Acept o Cancel = Item por item en este caso sería Premium Point por item o viceversa

#11 Re: [Pedido] Premium Points Trade el Dom Ago 03, 2014 8:48 pm

Black Prada


Miembro
@UP

claro te entendi perfectamente & es algo complicado la verdad se manejan sourcers & muchas fucnioens mas lo que tu buscas es mas que nada un tipo market

#12 Re: [Pedido] Premium Points Trade el Dom Dic 07, 2014 6:53 pm

PsicologosHD


Novato
ni idea bro debe ser complejo hacerlo

#13 Re: [Pedido] Premium Points Trade el Lun Dic 08, 2014 3:30 pm

GOD Kimber


Miembro
se te aria mas facil q fuera un item xD porque asi creo que es dificil :$

#14 Re: [Pedido] Premium Points Trade el Miér Feb 18, 2015 7:30 pm

Godz4t4n1c


Miembro
Yo tbm ando buscando ese script bro
Necesito ese script en cual digas
!sellpoints name,cantidad y te tradee a otro player

Buen aporte haber si alguien se sabe uno ... publiquen no sean agarrados xD

#15 Re: [Pedido] Premium Points Trade el Dom Mar 15, 2015 2:14 pm

Sir Tani


Miembro
Hola!

Si que se puede hacer!

Por ejemplo: soul orbs agan lo de premium points..

Matar players puedes tener los soul orbs asin la gente puede vender...


Despues para contar lo pones el talkactions i eso es todo si te gusta mi idea mañana te lo pasare toda la script

http://Empire-war.com

#16 Re: [Pedido] Premium Points Trade el Dom Mar 15, 2015 2:44 pm

Sirakx


Moderador
mejor tradea un item que de premium point y te ahorras me mmdas



[Tienes que estar registrado y conectado para ver esa imagen]
http://celesta-global.net/

#17 Re: [Pedido] Premium Points Trade el Miér Mar 18, 2015 4:30 am

Sir Tani


Miembro
[Tienes que estar registrado y conectado para ver este vínculo] escribió:mejor tradea un item que de premium point y te ahorras me mmdas

Por esto hacer lo de soul i asi puedes trader i hacer lo que quiras.. Usarlos venderlos etc

http://Empire-war.com

#18 Re: [Pedido] Premium Points Trade el Miér Mar 18, 2015 5:32 pm

Godz4t4n1c


Miembro
@Beleforente

Ayudaa tu sabes hacerlo *-*/

#19 Re: [Pedido] Premium Points Trade el Sáb Mar 28, 2015 7:55 pm

Yoiker


Miembro
Bump

#20 Re: [Pedido] Premium Points Trade el Lun Mar 30, 2015 5:09 pm

raizacore


Novato
hola XD 
amm nose porque me lo pides a mi si yo soy un simple terrenal pero vale 
mira en experiencia personal ,primero que nada creo que nececitas el item que usaras para representar los puntos de donador vamos a hacerlo del modo facil un item que no se pueda lotear y listo ya cuando estes en god solo entras a la cuenta del tio y le dejas el item en la bp o algo asi y listo :*

eso es l mas facil otra sera crear el talk action y un lua pero de eso yo no se nada XD
asi que mejor trata por mientras con la manera facil

#21 Re: [Pedido] Premium Points Trade el Lun Mar 30, 2015 5:15 pm

Godz4t4n1c


Miembro
BUMP

#22 Re: [Pedido] Premium Points Trade el Miér Abr 08, 2015 10:34 pm

titokere


Novato
aqui esta un mod.
mod.:


config = {
logFile = "data/logs/points.log", -- set file name where to save logs. Leave empty do disable logs.

pointsRune = {
enabled = "yes",
points = 50,
runeId = 2294,
minLevel = 8
},

changeName = {
enabled = "yes",
points = 50,
storage = 70009,
delay = 30 * 24 * 60 * 60 -- 30 days, in seconds
},

changeSex = {
enabled = "yes",
points = 20
},

removeSkull = {
enabled = "yes",
points = 50
},

refuelStamina = {
enabled = "yes",
points = 30,
full = 42 * 60 -- full stamina in minutes
}
}
]]>




domodlib('command-points-config')

config.pointsRune.enabled = getBooleanFromString(config.pointsRune.enabled)
config.changeName.enabled = getBooleanFromString(config.changeName.enabled)
config.changeSex.enabled = getBooleanFromString(config.changeSex.enabled)

config.removeSkull.enabled = getBooleanFromString(config.removeSkull.enabled)
--config.removeSkull.frags = getBooleanFromString(config.removeSkull.frags)

config.refuelStamina.enabled = getBooleanFromString(config.refuelStamina.enabled)

function getPlayerPoints(cid)
return getAccountPoints(getPlayerAccountId(cid))
end

function doPlayerAddPoints(cid, points)
return doAccountAddPoints(getPlayerAccountId(cid), points)
end

function doPlayerRemovePoints(cid, points)
return doPlayerAddPoints(cid, -points)
end

function getAccountPoints(accountId)
local result = db.getResult('SELECT premium_points FROM accounts WHERE id = ' .. accountId)
local v = 0
if(result:getID() ~= -1) then
v = tonumber(result:getDataInt("premium_points"))
result:free()
end

return v
end

function doAccountAddPoints(accountId, points)
if(points < 0 and getAccountPoints(accountId) < math.abs(points)) then
return false
end

return db.executeQuery('UPDATE accounts SET premium_points = premium_points + ' .. points .. ' WHERE id = ' .. accountId)
end

command_points = {
config = config,

logAction = function (str)
if(command_points.config.logFile:trim() == '') then
return
end

doWriteLogFile(command_points.config.logFile, str)
end,

pointsRune = function (cid)
if(command_points.config.pointsRune.minLevel and getPlayerLevel(cid) < command_points.config.pointsRune.minLevel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need " .. command_points.config.pointsRune.minLevel .. " level to buy this rune.")
return true
end

if(getPlayerPoints(cid) < command_points.config.pointsRune.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. This rune cost " .. command_points.config.pointsRune.points .. " points.")
return true
end

local item = doCreateItemEx(command_points.config.pointsRune.runeId, 1)
local status = doPlayerAddItemEx(cid, item, false)
if(status ~= RETURNVALUE_NOERROR and status) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enought space for rune.")
return true
end

if(doPlayerRemovePoints(cid, command_points.config.pointsRune.points)) then
doSendMagicEffect(getCreaturePos(cid), 40)
doPlayerSave(cid)
command_points.logAction("pointsRune: " .. getCreatureName(cid))
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end,

changeName = function (cid)
if(not getTileInfo(getCreaturePosition(cid)).protection) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can use this command only in protection zone.")
return true
end

local lastChange = getPlayerStorageValue(cid, command_points.config.changeName.storage)
if(os.time() < lastChange + command_points.config.changeName.delay) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, this command have limited usage. You will be able to use it next time at " .. os.date("%X on %d.%m.%y", lastChange + command_points.config.changeName.delay) .. ".")
return true
end

if(getPlayerPoints(cid) < command_points.config.changeName.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. Namelock cost " .. command_points.config.changeName.points .. " points.")
return true
end

if(doPlayerRemovePoints(cid, command_points.config.changeName.points)) then
setPlayerStorageValue(cid, command_points.config.changeName.storage, os.time())
doAddPlayerBanishment(getCreatureName(cid), BAN_PLAYER, -1, ACTION_NAMELOCK)
command_points.logAction("changeName: " .. getCreatureName(cid))
doRemoveCreature(cid)
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end,

changeSex = function (cid)
if(getPlayerPoints(cid) < command_points.config.changeSex.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. Change sex cost " .. command_points.config.changeSex.points .. " points.")
return true
end

local partner = getPlayerPartner(cid)
if(partner and partner ~= 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you cannot change your sex while being married.")
return true
end

if(doPlayerRemovePoints(cid, command_points.config.changeSex.points)) then
local newSex = getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE
doPlayerSetSex(cid, newSex)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sex changed to " .. (newSex == PLAYERSEX_FEMALE and "female" or "male") .. ".")
doPlayerSave(cid)
command_points.logAction("changeSex: " .. getCreatureName(cid))
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end,

removeSkull = function (cid)
local skull = getCreatureSkullType(cid)
if(skull ~= SKULL_RED and skull ~= SKULL_BLACK) then
doPlayerSendCancel(cid, "You do not have red/black skull.")
return true
end

if(getPlayerPoints(cid) < command_points.config.removeSkull.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. Remove skull cost " .. command_points.config.removeSkull.points .. " points.")
return true
end

if(doPlayerRemovePoints(cid, command_points.config.pointsRune.points)) then
db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSetSkullEnd(cid, 0, skull)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your skull has been taken off!\nRemaining premium points: " .. getPlayerPoints(cid))
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_YELLOW_RINGS)
doPlayerSave(cid)
command_points.logAction("removeSkull: " .. getCreatureName(cid))
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end,

refuelStamina = function (cid)
if(getPlayerPoints(cid) < command_points.config.refuelStamina.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. Stamina refill cost " .. command_points.config.refuelStamina.points .. " points.")
return true
end

if(getPlayerStamina(cid) >= command_points.config.refuelStamina.full) then
doPlayerSendCancel(cid, "Your stamina is already full.")
elseif(not isPremium(cid)) then
doPlayerSendCancel(cid, "You must have a premium account.")
else
if(doPlayerRemovePoints(cid, command_points.config.refuelStamina.points)) then
doPlayerSetStamina(cid, command_points.config.refuelStamina.full)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
doPlayerSave(cid)
command_points.logAction("refuelStamina: " .. getCreatureName(cid))
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end
end
}
]]>


domodlib('command-points-lib')
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. getPlayerPoints(cid) .. " points on your account.")
return true
end

param = param:lower():trim()
if(command_points.config.changeName.enabled and isInArray({"name", "namelock", "changename"}, param)) then
command_points.changeName(cid)
elseif(command_points.config.changeSex.enabled and isInArray({"sex", "changesex", "changender", "changegender"}, param)) then
command_points.changeSex(cid)
elseif(command_points.config.pointsRune.enabled and isInArray({"rune", "pointsrune"}, param)) then
command_points.pointsRune(cid)
elseif(command_points.config.removeSkull.enabled and isInArray({"rs", "skull", "frags"}, param)) then
command_points.removeSkull(cid)
elseif(command_points.config.refuelStamina.enabled and isInArray({"stamina"}, param)) then
command_points.refuelStamina(cid)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid option.")
end
return true
end
]]>




domodlib('command-points-lib')
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(not isPlayer(itemEx.uid) or not command_points.config.pointsRune.enabled) then
return false
end

if(doRemoveItem(item.uid, 1)) then
doPlayerAddPoints(itemEx.uid, command_points.config.pointsRune.points)
doSendMagicEffect(toPosition, CONST_ME_BIGCLOUDS)
doPlayerSave(cid)
command_points.logAction("pointsRune: " .. getCreatureName(cid) .. " (used)")
else
doPlayerSendTextMessage(cid, "Points couldn't be added. Please try again later.")
end

return true
end
]]>







#23 Re: [Pedido] Premium Points Trade el Sáb Abr 11, 2015 9:22 am

Godz4t4n1c


Miembro
[Tienes que estar registrado y conectado para ver este vínculo] escribió:aqui esta un mod.
mod.:


config = {
logFile = "data/logs/points.log", -- set file name where to save logs. Leave empty do disable logs.

pointsRune = {
enabled = "yes",
points = 50,
runeId = 2294,
minLevel = 8
},

changeName = {
enabled = "yes",
points = 50,
storage = 70009,
delay = 30 * 24 * 60 * 60 -- 30 days, in seconds
},

changeSex = {
enabled = "yes",
points = 20
},

removeSkull = {
enabled = "yes",
points = 50
},

refuelStamina = {
enabled = "yes",
points = 30,
full = 42 * 60 -- full stamina in minutes
}
}
]]>




domodlib('command-points-config')

config.pointsRune.enabled = getBooleanFromString(config.pointsRune.enabled)
config.changeName.enabled = getBooleanFromString(config.changeName.enabled)
config.changeSex.enabled = getBooleanFromString(config.changeSex.enabled)

config.removeSkull.enabled = getBooleanFromString(config.removeSkull.enabled)
--config.removeSkull.frags = getBooleanFromString(config.removeSkull.frags)

config.refuelStamina.enabled = getBooleanFromString(config.refuelStamina.enabled)

function getPlayerPoints(cid)
return getAccountPoints(getPlayerAccountId(cid))
end

function doPlayerAddPoints(cid, points)
return doAccountAddPoints(getPlayerAccountId(cid), points)
end

function doPlayerRemovePoints(cid, points)
return doPlayerAddPoints(cid, -points)
end

function getAccountPoints(accountId)
local result = db.getResult('SELECT premium_points FROM accounts WHERE id = ' .. accountId)
local v = 0
if(resultID() ~= -1) then
v = tonumber(result:getDataInt("premium_points"))
result:free()
end

return v
end

function doAccountAddPoints(accountId, points)
if(points < 0 and getAccountPoints(accountId) < math.abs(points)) then
return false
end

return db.executeQuery('UPDATE accounts SET premium_points = premium_points + ' .. points .. ' WHERE id = ' .. accountId)
end

command_points = {
config = config,

logAction = function (str)
if(command_points.config.logFile:trim() == '') then
return
end

doWriteLogFile(command_points.config.logFile, str)
end,

pointsRune = function (cid)
if(command_points.config.pointsRune.minLevel and getPlayerLevel(cid) < command_points.config.pointsRune.minLevel) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You need " .. command_points.config.pointsRune.minLevel .. " level to buy this rune.")
return true
end

if(getPlayerPoints(cid) < command_points.config.pointsRune.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. This rune cost " .. command_points.config.pointsRune.points .. " points.")
return true
end

local item = doCreateItemEx(command_points.config.pointsRune.runeId, 1)
local status = doPlayerAddItemEx(cid, item, false)
if(status ~= RETURNVALUE_NOERROR and status) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Not enought space for rune.")
return true
end

if(doPlayerRemovePoints(cid, command_points.config.pointsRune.points)) then
doSendMagicEffect(getCreaturePos(cid), 40)
doPlayerSave(cid)
command_points.logAction("pointsRune: " .. getCreatureName(cid))
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end,

changeName = function (cid)
if(not getTileInfo(getCreaturePosition(cid)).protection) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You can use this command only in protection zone.")
return true
end

local lastChange = getPlayerStorageValue(cid, command_points.config.changeName.storage)
if(os.time() < lastChange + command_points.config.changeName.delay) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, this command have limited usage. You will be able to use it next time at " .. os.date("%X on %d.%m.%y", lastChange + command_points.config.changeName.delay) .. ".")
return true
end

if(getPlayerPoints(cid) < command_points.config.changeName.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. Namelock cost " .. command_points.config.changeName.points .. " points.")
return true
end

if(doPlayerRemovePoints(cid, command_points.config.changeName.points)) then
setPlayerStorageValue(cid, command_points.config.changeName.storage, os.time())
doAddPlayerBanishment(getCreatureName(cid), BAN_PLAYER, -1, ACTION_NAMELOCK)
command_points.logAction("changeName: " .. getCreatureName(cid))
doRemoveCreature(cid)
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end,

changeSex = function (cid)
if(getPlayerPoints(cid) < command_points.config.changeSex.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. Change sex cost " .. command_points.config.changeSex.points .. " points.")
return true
end

local partner = getPlayerPartner(cid)
if(partner and partner ~= 0) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, you cannot change your sex while being married.")
return true
end

if(doPlayerRemovePoints(cid, command_points.config.changeSex.points)) then
local newSex = getPlayerSex(cid) == PLAYERSEX_FEMALE and PLAYERSEX_MALE or PLAYERSEX_FEMALE
doPlayerSetSex(cid, newSex)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Sex changed to " .. (newSex == PLAYERSEX_FEMALE and "female" or "male") .. ".")
doPlayerSave(cid)
command_points.logAction("changeSex: " .. getCreatureName(cid))
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end,

removeSkull = function (cid)
local skull = getCreatureSkullType(cid)
if(skull ~= SKULL_RED and skull ~= SKULL_BLACK) then
doPlayerSendCancel(cid, "You do not have red/black skull.")
return true
end

if(getPlayerPoints(cid) < command_points.config.removeSkull.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. Remove skull cost " .. command_points.config.removeSkull.points .. " points.")
return true
end

if(doPlayerRemovePoints(cid, command_points.config.pointsRune.points)) then
db.executeQuery("UPDATE killers SET unjustified = 0 WHERE id IN (SELECT kill_id FROM player_killers WHERE player_id = " .. getPlayerGUID(cid) .. ")")
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSetSkullEnd(cid, 0, skull)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, "Your skull has been taken off!\nRemaining premium points: " .. getPlayerPoints(cid))
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_YELLOW_RINGS)
doPlayerSave(cid)
command_points.logAction("removeSkull: " .. getCreatureName(cid))
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end,

refuelStamina = function (cid)
if(getPlayerPoints(cid) < command_points.config.refuelStamina.points) then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Sorry, not enought points on your account. Stamina refill cost " .. command_points.config.refuelStamina.points .. " points.")
return true
end

if(getPlayerStamina(cid) >= command_points.config.refuelStamina.full) then
doPlayerSendCancel(cid, "Your stamina is already full.")
elseif(not isPremium(cid)) then
doPlayerSendCancel(cid, "You must have a premium account.")
else
if(doPlayerRemovePoints(cid, command_points.config.refuelStamina.points)) then
doPlayerSetStamina(cid, command_points.config.refuelStamina.full)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_ORANGE, "Your stamina has been refilled.")
doPlayerSave(cid)
command_points.logAction("refuelStamina: " .. getCreatureName(cid))
else
doPlayerSendCancel(cid, "ERROR. Please try again later.")
end
end
end
}
]]>


domodlib('command-points-lib')
function onSay(cid, words, param, channel)
if(param == '') then
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You have " .. getPlayerPoints(cid) .. " points on your account.")
return true
end

param = param:lower():trim()
if(command_points.config.changeName.enabled and isInArray({"name", "namelock", "changename"}, param)) then
command_points.changeName(cid)
elseif(command_points.config.changeSex.enabled and isInArray({"sex", "changesex", "changender", "changegender"}, param)) then
command_points.changeSex(cid)
elseif(command_points.config.pointsRune.enabled and isInArray({"rune", "pointsrune"}, param)) then
command_points.pointsRune(cid)
elseif(command_points.config.removeSkull.enabled and isInArray({"rs", "skull", "frags"}, param)) then
command_points.removeSkull(cid)
elseif(command_points.config.refuelStamina.enabled and isInArray({"stamina"}, param)) then
command_points.refuelStamina(cid)
else
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Invalid option.")
end
return true
end
]]>




domodlib('command-points-lib')
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(not isPlayer(itemEx.uid) or not command_points.config.pointsRune.enabled) then
return false
end

if(doRemoveItem(item.uid, 1)) then
doPlayerAddPoints(itemEx.uid, command_points.config.pointsRune.points)
doSendMagicEffect(toPosition, CONST_ME_BIGCLOUDS)
doPlayerSave(cid)
command_points.logAction("pointsRune: " .. getCreatureName(cid) .. " (used)")
else
doPlayerSendTextMessage(cid, "Points couldn't be added. Please try again later.")
end

return true
end
]]>








Ese mods sirve para el premiun trade ???

#24 Re: [Pedido] Premium Points Trade Hoy a las 4:12 am

Contenido patrocinado


Ver el tema anterior Ver el tema siguiente Volver arriba  Mensaje [Página 1 de 1.]

Permisos de este foro:
No puedes responder a temas en este foro.

 

¿Quién está en línea?

En total hay 0 usuarios en línea: 0 Registrados, 0 Ocultos y 0 Invitado

Usuarios navegando en este foro: Ninguno

Forum Statistics

Nuestros miembros han públicado un total de posts en temas.
Actualmente hay miembros registrados.
Démosle la bienvenida al miembro más reciente,
La mayor cantidad de usuarios en línea ha sido de .