Muito bom me ajudou mto pena que to sem rep hoje ![]()
- Fórum
- OTServ
- Tutoriais
- Tutoriais de Scripting
- [8.54] Itens Para Players Premium (Testado Em Poketibia)
[8.54] Itens Para Players Premium (Testado Em Poketibia)
Por Lawliett, 18 de ago. de 2012 em Tutoriais de Scripting
info
Grupo: Campones
Registrado: 31/07/12
Posts: 8
Reputação: 0
Char no Tibia: Demonyaco

info
Grupo: Herói
Registrado: 28/11/10
Posts: 3.4k
Reputação: +585
Gênero: Masculino

Otimo Cara.... Perfeito!
Vou Utilisar No Meu Servidor, So Que Com a Moto e Carro..
Abraço
info
Grupo: Herói
Registrado: 05/11/07
Posts: 544
Reputação: +70

Seu tutorial foi aprovado, estará sendo movido para a seção correta.
Atenciosamente, Critical.
info
Grupo: Campones
Registrado: 12/08/12
Posts: 7
Reputação: +9
Char no Tibia: No have

.....
Editado Agosto 23 por Lawliett
info
Grupo: Herói
Registrado: 12/06/12
Posts: 2.2k
Reputação: +739
Gênero: Masculino
Char no Tibia: Supreme Player

Boa Manow REP++ se Vc Puder se pode me passar um System Fly VIP e tambem o Teleport!?
info
Grupo: Campones
Registrado: 12/08/12
Posts: 7
Reputação: +9
Char no Tibia: No have

Só Fly e Teleport?
info
Grupo: Herói
Registrado: 12/06/12
Posts: 2.2k
Reputação: +739
Gênero: Masculino
Char no Tibia: Supreme Player

Sim Preciso Só desses Se Puder fazer REP++
info
Grupo: Campones
Registrado: 28/01/12
Posts: 23
Reputação: 0
Char no Tibia: FireBlack

Tem como uza este mesmo sistema no Fly ?
info
Grupo: Campones
Registrado: 12/08/12
Posts: 7
Reputação: +9
Char no Tibia: No have

Para deixar o FLY somente para Premium:
Vá em Data>Actions>Scripts>Order
e Procure por : ----START FLYorRIDE ---------
Substitua:
--if not isPremium(cid) then
--doPlayerSendCancel(cid, "Only premium members are allowed to fly or ride.")
--return true
--end
Por:
if not isPremium(cid) then
doPlayerSendCancel(cid, "Only premium members are allowed to fly.")
return true
end
Para deixar o TELEPORT somente para Premium:
Vá em Data>Talkactions>Scripts>Tele
Procure por: premium = false
e Substitua por: premium = true
info
Grupo: Campones
Registrado: 28/01/12
Posts: 23
Reputação: 0
Char no Tibia: FireBlack

Vlw
vlw meu rep para vcPara deixar o FLY somente para Premium:
Vá em Data>Actions>Scripts>Order
e Procure por : ----START FLYorRIDE ---------
Substitua:
--if not isPremium(cid) then
--doPlayerSendCancel(cid, "Only premium members are allowed to fly or ride.")
--return true
--end
Por:
if not isPremium(cid) then
doPlayerSendCancel(cid, "Only premium members are allowed to fly.")
return true
end
Para deixar o TELEPORT somente para Premium:
Vá em Data>Talkactions>Scripts>Tele
Procure por: premium = false
e Substitua por: premium = true
info
Grupo: Herói
Registrado: 12/06/12
Posts: 2.2k
Reputação: +739
Gênero: Masculino
Char no Tibia: Supreme Player

Para deixar o FLY somente para Premium:
Vá em Data>Actions>Scripts>Order
e Procure por : ----START FLYorRIDE ---------
Substitua:
--if not isPremium(cid) then
--doPlayerSendCancel(cid, "Only premium members are allowed to fly or ride.")
--return true
--end
Por:
if not isPremium(cid) then
doPlayerSendCancel(cid, "Only premium members are allowed to fly.")
return true
end
Para deixar o TELEPORT somente para Premium:
Vá em Data>Talkactions>Scripts>Tele
Procure por: premium = false
e Substitua por: premium = true
Vlw REP++
info
Grupo: Campones
Registrado: 09/03/18
Posts: 3
Reputação: 0
Gênero: Masculino

eu queria saber como por o comando !bug e o anuncio para so os vip usar


info
Grupo: Campones
Registrado: 12/08/12
Posts: 7
Reputação: +9
Char no Tibia: No have
• Itens Para Players Premium (Testado em Poketibia)•
• Bom Galera, Eu procurei pelo Xtibia e outro Sites, e nao achei nenhum tutorial sobre o caso,
E vi muita gente procurando como fazer, para que um item seja usado apenas para player premium!
Então vamos lá..
Vou usar como Exemplo a "Bike" que é o item mais procurado para esse tipo de Action, (Lembrando que pode ser usado em outros itens também) É bem simples!!
• Se voce ja tiver o arquivo Bike.lua em Data>Actions>Scripts, Provavelmente vai estar assim •
function onUse(cid, item, fromPosition, itemEx, toPosition)
local sBike = 2547
local t = {
[2547] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition},
}
function BikeSpeedOn(cid,nSpeed)
setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid))
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,nSpeed)
end
function BikeSpeedOff(cid)
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,getPlayerStorageValue(cid,sBike))
end
local v, r = getCreaturePosition(cid), t[item.itemid]
local s = r.s
local pos = {x = v.x, y = v.y, z = v.z}
if r then
if getPlayerStorageValue(cid, 25000) == 5 then
return
end
if getPlayerStorageValue(cid, 23000) == 5 then
return
end
if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.")
return true
end
if getPlayerStorageValue(cid, s) <= 0 then
doCreatureSay(cid, r.text, 19)
setPlayerStorageValue(cid, s, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')
BikeSpeedOn(cid,800)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
end
elseif getPlayerStorageValue(cid, s) == 1 then
doCreatureSay(cid, r.dtext, 19)
setPlayerStorageValue(cid, s, 0)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted ' .. r.article .. ' '.. r.name .. '.')
BikeSpeedOff(cid)
return doRemoveCondition(cid, CONDITION_OUTFIT)
else
return doPlayerSendCancel(cid, 'You can\'t do this.')
end
else
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.')
end
end
Embaixo de:
local t = {
[2547] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition},
}
Adicione :
Depois procure por:
function BikeSpeedOn(cid,nSpeed)
setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid))
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,nSpeed)
end
function BikeSpeedOff(cid)
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,getPlayerStorageValue(cid,sBike))
end
E adicione embaixo:
if not isPremium(cid) then
doPlayerSendCancel(cid, "Messagem enviada para os players free")
return true
end
Ficando o com o Script todo assim:
function onUse(cid, item, fromPosition, itemEx, toPosition)
local sBike = 2547
local t = {
[2547] = {article='a', name='bike', text='Mount, bike!', dtext='Demount, bike!', s=5700, condition=bikeCondition},
}
local premium = true
function BikeSpeedOn(cid,nSpeed)
setPlayerStorageValue(cid,sBike,getCreatureSpeed(cid))
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,nSpeed)
end
function BikeSpeedOff(cid)
doChangeSpeed(cid,-getCreatureSpeed(cid))
doChangeSpeed(cid,getPlayerStorageValue(cid,sBike))
end
if not isPremium(cid) then
doPlayerSendCancel(cid, "Vc nao é premium, Vaza.")
return true
end
local v, r = getCreaturePosition(cid), t[item.itemid]
local s = r.s
local pos = {x = v.x, y = v.y, z = v.z}
if r then
if getPlayerStorageValue(cid, 25000) == 5 then
return
end
if getPlayerStorageValue(cid, 23000) == 5 then
return
end
if getPlayerStorageValue(cid, 17001) == 1 or getPlayerStorageValue(cid, 63215) == 1 or getPlayerStorageValue(cid, 17000) == 1 then
doPlayerSendCancel(cid, "You can't use bike while ride/fly/surf.")
return true
end
if getPlayerStorageValue(cid, s) <= 0 then
doCreatureSay(cid, r.text, 19)
setPlayerStorageValue(cid, s, 1)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You have mounted ' .. r.article .. ' '.. r.name .. '.')
BikeSpeedOn(cid,800)
if getPlayerSex(cid) == 1 then
doSetCreatureOutfit(cid, {lookType = 1394, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
else
doSetCreatureOutfit(cid, {lookType = 1393, lookHead = 0, lookAddons = 0, lookLegs = 0, lookBody = 0, lookFeet = 0}, -1)
end
elseif getPlayerStorageValue(cid, s) == 1 then
doCreatureSay(cid, r.dtext, 19)
setPlayerStorageValue(cid, s, 0)
doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_RED, 'You haven demouted ' .. r.article .. ' '.. r.name .. '.')
BikeSpeedOff(cid)
return doRemoveCondition(cid, CONDITION_OUTFIT)
else
return doPlayerSendCancel(cid, 'You can\'t do this.')
end
else
return doPlayerSendTextMessage(cid,MESSAGE_STATUS_CONSOLE_BLUE, 'Report bugs in Bike system.')
end
end
Se ajudei, REP++?
Editado Agosto 18 por Lawliett