potion que so player premium use

ntoserver
em Scripts

ntoserver

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/02/14Posts: 6

queria sabe como ponho pra somente player premium use a potion vo deixa aki a baixo esse scripts e do nto shippuden da pill ma queria por so pra premium usa

 

local temp = {

exhausted = 2,
storage = 2100
}
local confg = {
level = 100,
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local hp = 50000
local mp = 50000
if(getPlayerStorageValue(cid, temp.storage) > os.time() and getPlayerStorageValue(cid, temp.storage) < 100+os.time()) then
doPlayerSendTextMessage(cid, 24, "você esta exausto, espere " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' segundo' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 2 and "" or "s"))
return true
elseif getPlayerLevel(cid) < confg.level then
doPlayerSendCancel(cid, "You need to be atleast level ".. confg.level ..".")
return true
end
doCreatureAddHealth(cid, hp)
doCreatureAddMana(cid, mp)
doSendMagicEffect(getCreaturePosition(cid), 13)
doRemoveItem(item.uid,1)
setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted)
return true
end

Kluivert

:)
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 06/07/13Posts: 634Gênero: MasculinoChar no Tibia: Kayinsz

Testa ae !

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

local temp = {
exhausted = 2,
storage = 2100
}
local confg = {
level = 100,
}
 
local hp = 50000
local mp = 50000
local premium = "sim"
 
    if(getPlayerStorageValue(cid, temp.storage) > os.time() and getPlayerStorageValue(cid, temp.storage) < 100+os.time()) then
      doPlayerSendTextMessage(cid, 24, "você esta exausto, espere " .. getPlayerStorageValue(cid, temp.storage) - os.time() .. ' segundo' .. ((getPlayerStorageValue(cid, temp.storage) - os.time()) == 2 and "" or "s"))
 return true
    elseif getPlayerLevel(cid) < confg.level then
      doPlayerSendCancel(cid, "You need to be atleast level ".. confg.level ..".")
 return true
end
    if premium == "sim" and not isPremium(cid) then
       doCreatureAddHealth(cid, hp)
       doCreatureAddMana(cid, mp)
       doSendMagicEffect(getCreaturePosition(cid), 13)
       doRemoveItem(item.uid,1)
       setPlayerStorageValue(cid, temp.storage, os.time() + temp.exhausted)
   return true
end

Att,

Kluivert.

 

2lQynzLAD.png

ntoserver

avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 24/02/14Posts: 6

Flw Funciono ^^

Junior001

..................................
avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 12/06/12Posts: 1026Gênero: MasculinoChar no Tibia: Aarow

reportado para que movam.

Atenciosamente, Junior Silva

 

 

 

 

 

 

 
 

 

T67thPC.png
 
 
 
 
 
 

zipter98

avatar
Herói
Herói

INFOS

Grupo: HeróiRegistrado: 20/09/12Posts: 2553Gênero: Masculino

Tópico movido para a seção de dúvidas e pedidos resolvidos.

Não respondo PMs solicitando suporte. Já existem seções no fórum para isto.