[Talkaction] Promotion Para Vips - Systems [Kydrai, Storage, Premium, Mock]

Leoxtibia
em Actions e Talkactions

Leoxtibia

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 22/06/08Posts: 489Gênero: Masculino

É o meu primeiro script aqui (na verdade já atendi alguns pedidos), mas postando nessa seção é meu primeiro. São sistemas que dependem do seu sistema de vip e que dará uma segunda promotion ao usar o comando !promote.

 

(Para todos os Sistemas) Vá até a pasta talkactions>scripts e crie um arquivo chamado promotion.lua (ou qualquer nome de sua preferência) e cole isto dentro:

 

Para VIP System by Account [Kydrai] -- Link

 

 

 

-- Script [Promotion por Talkaction] by Leoxtibia --

 

local table = {

[5] = {price = 10, minlevel = 10}, --- [vocação] / preço da moeda / level minimo para usar o comando

[6] = {price = 10, minlevel = 100},

[7] = {price = 10, minlevel = 100},

[8] = {price = 10, minlevel = 100}

}

 

local moeda = 2160 -- id da moeda (2160 é crystal coin)

 

function onSay(cid, words, param)

if table[getPlayerVocation(cid)] then

if getPlayerLevel(cid) >= table[getPlayerVocation(cid)].minlevel then

if isVip(cid) == TRUE then

if doPlayerRemoveItem(cid, moeda, table[getPlayerVocation(cid)].price) == TRUE then

setPlayerPromotionLevel(cid, 2)

doSendMagicEffect(getCreaturePosition(cid),13)

doCreatureSay(cid, "Voce foi promovido!", TALKTYPE_ORANGE_1)

else

doPlayerSendTextMessage(cid, 24, "Você não tem ".. table[getPlayerVocation(cid)].price .." ".. getItemNameById(moeda) ..".")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você não é VIP.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você deve ter level ".. table[getPlayerVocation(cid)].minlevel .." ou mais para usar o comando.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você deve ter a primeira promotion antes de conseguir a segunda.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

end

 

 

 

Para VIP System por storage

 

 

 

-- Script [Promotion por Talkaction] by Leoxtibia --

 

local table = {

[5] = {price = 10, minlevel = 100}, -- [vocação] -- preço da promotion (em crystal coins) e minimo de level para usar o comando

[6] = {price = 10, minlevel = 100},

[7] = {price = 10, minlevel = 100},

[8] = {price = 10, minlevel = 100}

}

local stor = 4532 -- storage da sua vip account

local moeda = 2160 -- id da moeda (2160 é crystal coin)

 

function onSay(cid, words, param)

if table[getPlayerVocation(cid)] then

if getPlayerLevel(cid) >= table[getPlayerVocation(cid)].minlevel then

if getPlayerStorageValue(cid, stor) >= 1 then

if doPlayerRemoveItem(cid, moeda, table[getPlayerVocation(cid)].price) == TRUE then

setPlayerPromotionLevel(cid, 2)

doSendMagicEffect(getCreaturePosition(cid),13)

doCreatureSay(cid, "Voce foi promovido!", TALKTYPE_ORANGE_1)

else

doPlayerSendTextMessage(cid, 24, "Você não tem ".. table[getPlayerVocation(cid)].price .." ".. getItemNameById(moeda) ..".")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você não é VIP Account.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você deve ter level ".. table[getPlayerVocation(cid)].minlevel .." ou mais para usar o comando.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você deve ter a primeira promotion antes de conseguir a segunda.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

end

 

 

 

Para VIP System por Premium

 

 

 

-- Script [Promotion por Talkaction] by Leoxtibia --

 

local table = {

[5] = {price = 10, minlevel = 10},

[6] = {price = 10, minlevel = 100},

[7] = {price = 10, minlevel = 100},

[8] = {price = 10, minlevel = 100}

}

 

local moeda = 2160 -- id da moeda (2160 é crystal coin)

 

function onSay(cid, words, param)

if table[getPlayerVocation(cid)] then

if getPlayerLevel(cid) >= table[getPlayerVocation(cid)].minlevel then

if isPremium(cid) == TRUE then

if doPlayerRemoveItem(cid, moeda, table[getPlayerVocation(cid)].price) == TRUE then

setPlayerPromotionLevel(cid, 2)

doSendMagicEffect(getCreaturePosition(cid),13)

doCreatureSay(cid, "Voce foi promovido!", TALKTYPE_ORANGE_1)

else

doPlayerSendTextMessage(cid, 24, "Você não tem ".. table[getPlayerVocation(cid)].price .." ".. getItemNameById(moeda) ..".")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você não é premium.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você deve ter level ".. table[getPlayerVocation(cid)].minlevel .." ou mais para usar o comando.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você deve ter a primeira promotion antes de conseguir a segunda.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

end

 

 

 

Para VIP System by Mock

 

 

 

-- Script [Promotion por Talkaction] by Leoxtibia --

 

local table = {

[5] = {price = 10, minlevel = 100}, -- [vocação] -- preço da promotion (em crystal coins) e minimo de level para usar o comando

[6] = {price = 10, minlevel = 100},

[7] = {price = 10, minlevel = 100},

[8] = {price = 10, minlevel = 100}

}

 

local moeda = 2160 -- id da moeda (2160 é crystal coin)

 

function onSay(cid, words, param)

if table[getPlayerVocation(cid)] then

if getPlayerLevel(cid) >= table[getPlayerVocation(cid)].minlevel then

if vip.hasVip(cid) == TRUE then

if doPlayerRemoveItem(cid, moeda, table[getPlayerVocation(cid)].price) == TRUE then

setPlayerPromotionLevel(cid, 2)

doSendMagicEffect(getCreaturePosition(cid),13)

doCreatureSay(cid, "Você foi promovido!", TALKTYPE_ORANGE_1)

else

doPlayerSendTextMessage(cid, 24, "Você não tem ".. table[getPlayerVocation(cid)].price .." ".. getItemNameById(moeda) ..".")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você não é VIP Account.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você deve ter level ".. table[getPlayerVocation(cid)].minlevel .." ou mais para usar o comando.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

else

doPlayerSendTextMessage(cid, 24, "Você deve ter a primeira promotion antes de conseguir a segunda.")

doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)

end

end

 

 

 

(Para todos os Tipos) Agora em em creaturescripts>scripts no arquivo login.lua adicione o script abaixo, antes do return true para a vocação voltar ao normal assim que a vip acabar:

 

Para VIP System by Account -- [Kydrai]

 

 

 

if isVip(cid) == FALSE and (isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then

doPlayerSetVocation(cid,getPlayerVocation(cid)-4)

end

 

 

 

Para VIP System por Storage

 

 

 

if getPlayerStorageValue(cid, 4532) == FALSE and (isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then

doPlayerSetVocation(cid,getPlayerVocation(cid)-4)

end

 

 

 

Lembre-se de alterar o storage aqui se alterou lá no script

 

Para VIP por Premium

 

 

 

if isPremium(cid) == FALSE and (isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then

doPlayerSetVocation(cid,getPlayerVocation(cid)-4)

end

 

 

 

Para VIP by MOCK

 

 

 

if vip.hasVip(cid) == FALSE and (isInArray({9, 10, 11, 12}, getPlayerVocation(cid))) then

doPlayerSetVocation(cid,getPlayerVocation(cid)-4)

end

 

 

 

(Para todos os Tipos) Na parte acima, aqui são os ids das novas vocações: {9, 10, 11, 12} que voltarão à vocação anterior, no nosso caso, [5];[6];[7];[8]

 

(Para todos os Tipos) Agora em talkactions.xml coloque a tag:

 

<talkaction words="!promote" event="script" value="promotion.lua"/>

 

Lembre-se que se mudou o nome do arquivo lá emcima, mude na tag também.

 

Atenção com essa parte... no vocations.xml configurem corretamente a partir de qual vocação será conseguida a vocação promote. Vejam o exemplo abaixo:

 

fromvoc="X" -- Significa "da vocação" é de qual vocação essa Supreme Sorcerer virá, se você quiser que venha do Master Sorcerer que o id é 5, você coloca 5, ficando: fromvoc="5"

 

 

Então é isso aí galera, ainda estou começando em scripting mas espero ter ajudado alguém. Abraços!

sergiped.gif

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

Se a vip dele acabar ele não vai perde a vocação, só se ele usar o comando..

Rep+ por esta ajudando bastante na área de script e essa script vai ajudar a despoluir a área de pedidos.

 

Tomei a liberdade de editar o tópico com o link do system vip, http://www.xtibia.com/forum/topic/136543-vip-system-by-account-v10/

Atenciosamente, Vilden.

GodalonexD

é Melhor
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 23/03/08Posts: 205

e Depois que acabar a vip? perde o promote?

Ajudei? da REP+

Custa nada!

Diego Rulez

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/10/06Posts: 121Gênero: Masculino

@topic

Eu testei em meu servidor e quando você reloga o char, ele volta pra antiga vocação.

Leoxtibia

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 22/06/08Posts: 489Gênero: Masculino

@Vilden

Vlw por adicionar o link.. já resolvi esse problema de ter que falar !promote para a vocação sair.

 

@Titanico xD

Agora perde, consertei isso =P

 

@Diego_o

Isso já foi consertado agora também, pode testar que vai funcionar ^^

sergiped.gif

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

Agora sim está completo, que tal criar para os outros systemas vips? De storage, premium e mock?

Atenciosamente, Vilden.

Leoxtibia

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 22/06/08Posts: 489Gênero: Masculino

Calma, ainda estou aprendendo kkk mas vou dar uma olhada nos outros sistemas, se eu conseguir coloco aqui mesmo ^^

sergiped.gif

Vilden

Loading. . .
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 09/05/08Posts: 1597

É basicamente a mesma coisa.. o que vai muda é a informação que ele pega do player [get].

 

por storage;

getPlayerStorageValue(cid,valueid) >= 1

por premium;

ispremium(cid) == true

por mock;

vip.hasVip(cid) == true

 

 

Boa sorte

Atenciosamente, Vilden.

Diego Rulez

avatar
Artesão
Artesão

INFOS

Grupo: ArtesãoRegistrado: 01/10/06Posts: 121Gênero: Masculino

Como sou um usuário antigo no Xtibia, não estou interado ainda sobre as regras atuais do fórum então não sei se estou cometendo flood por postar novamente aqui. Caso seja flood me desculpem.

 

@topic.

Realmente está tudo concertado e o script funciona. Acredito que seja o único "sistema" de terceira promote compatível com o sistema vip do Kydrai que realmente funcione. Parabéns pelo script. REP+

Leoxtibia

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 22/06/08Posts: 489Gênero: Masculino

Comando para os outros sistemas adicionado ^^

sergiped.gif

GodalonexD

é Melhor
avatar
Barão
Barão

INFOS

Grupo: BarãoRegistrado: 23/03/08Posts: 205

e pra por o site gesior para reconheçer a vocação nova? voce sabe tambem? '-'

estou tentando aqui mais num estou tendo sucesso, htdocs/config.

Ajudei? da REP+

Custa nada!

Leoxtibia

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 22/06/08Posts: 489Gênero: Masculino

Malz aí cara, eu não sei porra nenhuma nada de site =S

sergiped.gif

Subwat

GAUCHO MACHO
avatar
Infante
Infante

INFOS

Grupo: InfanteRegistrado: 27/07/09Posts: 1516Char no Tibia: Gean Riot

fiz tudo certinho e não funcionou cara, tipo ele fala "voce foi promovido" e tal ae eu do look no char e fica You are. e nao mostra a vocation ta bugado.

e eu arrumei certinho la no vocations.xml o negocio do fromvoc e tal e msm assim n ta funfando

Entrem Server online desde o dia 22/02/2013 Monster 24HORAS dedicado!

IP: monster24h.com

PROTOCOL:8.60

PORT:7171

 

RATES:

Exp: 9999x~10x

Skills:800x

Magic:200x

Loot:2x

Pvp-e Advanced: 1.1x Ao matar players de level semelhante.

 

Accounts Pelo Account Manager!

Leoxtibia

avatar
Visconde
Visconde

INFOS

Grupo: ViscondeRegistrado: 22/06/08Posts: 489Gênero: Masculino

Cara, o script é de segunda promotion, isso aconteceu aqui quando eu tinha colocado como se fosse 1ª promotion. Veja se não foi isso que aconteceu com você. Abraços.

sergiped.gif