HE
talkaction

[TalkAction] Removedor De Skulls

Por Henrique Moura, 07 de dez. de 2009 em Actions e Talkactions

script
20
5.2k
Henrique MouraH
07 de dezembro de 2009 às 19:23

Skull remover

 

 

Dentro da pasta data/talkactions/scripts copie algum arquivo, cole, renomei-o para skullclean.lua e abra-o. Apague tudo o que estiver dentro e cole o seguinte:

 

--- skull remover by kakilo - quinto script

 

function onSay(cid, words, param, channel)

 

if (getCreatureSkullType(cid) == SKULL_BLACK) then

if doPlayerRemoveMoney(cid, 200000) then

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned.")

else

doPlayerSendTextMessage(cid, 22, "You need 200.000 gold pieces to remove the black skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_RED) then

if doPlayerRemoveMoney(cid, 100000) then

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned.")

else

doPlayerSendTextMessage(cid, 22, "You need 100.000 gold pieces to remove the red skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_WHITE) then

if doPlayerRemoveMoney(cid, 10000) then

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned.")

else

doPlayerSendTextMessage(cid, 22, "You need 10.000 gold pieces to remove the white skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_NONE) then

doPlayerSendTextMessage(cid, 22, "Your soul clean like water!")

end

 

return TRUE

end

 

Explicação:

Vermelho - Mensagem que o jogador receberá quando limpar alguma skull, configure cada uma correspondendo à skull que será removida.

Verde - Valor para remover a skull, se souber pode configurar cada uma por cada skull, se não deixe do jeito que estiver

Azul - Mensagem que o jogador receberá se não tiver dinheiro suficiente

 

Colocando o script original os preços ficam assim:

200k = Black Skull

100k = Red Skull

10k = White Skull

 

Entre na pasta data/talkactions e abra um arquivo chamado talkactions.xml, cole isto abaixo de alguma linha:

QUOTE

<talkaction words="!removerpk" script="skullclean.lua"/>

Explicação:

Laranja - O que será dito pelo jogador para que as skulls sejam removidas.

 

Qualquer erro poste no tópico

 

 

Abração!

 

Créditos : KaKilo

Editado Fevereiro 14 por Henrique Moura

\Mattheus ~*\
07 de dezembro de 2009 às 19:28

Esta excelente, nunca tinha visto algo do tipo aqui no XTibia, parabéns por trazer novos conteúdos ao XTibia, parece que você vai ser uns dos inovadores por aqui.

 

Abraços.

KilluaK
07 de dezembro de 2009 às 19:49

Nossa! Parece que vc ta realmente aprendendo a mecher em scripts :D

Tenta faze ele só funciona pra premmium pra mi ae xD PS: Encare como um exercício!

 

O que mais me impreciona é a sua criatividade, eu jamais pensaria em fazer algo do tipo! Continue assim, tá de parabéns.

 

 

---->Edit<----

Ele nao está funcionando aqui =/

Editado Dezembro 7 por amoeba13

rockstar96R
07 de dezembro de 2009 às 19:58

mano usando tabelas diminuia E

identa isso q fica l0ko

Henrique MouraH
07 de dezembro de 2009 às 20:04

#Amoeba

--- skull remover by kakilo - quinto script

 

function onSay(cid, words, param, channel)

 

if (getCreatureSkullType(cid) == SKULL_BLACK) then

if getPlayerPremiumDays(cid) >= 1 then

doPlayerRemoveMoney(cid, 200000)

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned.")

else

doPlayerSendTextMessage(cid, 22, "You need 200.000 gold pieces to remove the black skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_RED) then

if getPlayerPremiumDays(cid) >= 1 then

doPlayerRemoveMoney(cid, 100000)

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned.")

else

doPlayerSendTextMessage(cid, 22, "You need 100.000 gold pieces to remove the red skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_WHITE) then

if getPlayerPremiumDays(cid) >= 1 then

doPlayerRemoveMoney(cid, 10000)

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned")

else

doPlayerSendTextMessage(cid, 22, "You need 10.000 gold pieces to remove the white skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_NONE) then

doPlayerSendTextMessage(cid, 22, "Your soul is clean like water!")

end

 

return TRUE

end

 

#Irockstar

Acho melhor assim, quem sabe mais tarde eu possa fazer com tabelas.

 

Abraços.

Editado Dezembro 8 por KaKilo

rockstar96R
07 de dezembro de 2009 às 20:06

como acha melhor assim mano

ahhh N aprendeu a mexer com tabelas ainda ta perdoado

darklightyD
07 de dezembro de 2009 às 21:20

ae, assim só pra fazer uma melhorinha no script

 

pra tira cada skull, eu acho que devia tirar soul :D

 

tipo

 

Wihte: cost 30 soul

Red: 70 soul

Black: 200 soul

 

ia fica r0x

 

mas o script tá ótimo cara, parabéns, nunca vi nada como isso aqui no xt :D

LorDzL
08 de dezembro de 2009 às 14:03

Gostei também é uma otima idéia,

pra quem usa servidor de "POINTS" também é bom.

O que o Dark falou também .-.

 

Boa sorte com seus script's cara.

 

Abraços

gkaonicx72G
08 de dezembro de 2009 às 15:51

Opa parabéns me alegro ao ver que você esta mostrando uma aprendizagem rapida e eficaz no assunto. Como venho dito você tem futuro ainda mais ao saber que vai se especializar com isso em sua carreira. Porem seu ingles deve melhorar um pouco, não sei se estou falando coisas erradas mais "You soul are clean" esta errado meu amigo.

-You é singular e "are" é usado para plural.

Alternativas:

-Your soul is clean.

-Your soul has been clean(deleted se quiser).

-Your skull has been removed

Ou senão misturar essas idéias para formular uma ao seu gosto. Qualquer outra duvida só me avisar.

 

Lembrando que se estiver errado, favor me informar.

Até mais e continue assim Kakilo.

sauvadur2S
10 de dezembro de 2009 às 19:07

Seu script nao funciona.

Se o player nao tiver grana remove do mesmo jeito.

Script adaptado:

--- skull remover by kakilo - quinto script - Adptado by XxSauvadurxX

function onSay(cid, words, param, channel)

if (getCreatureSkullType(cid) == SKULL_BLACK) then
if doPlayerRemoveMoney(cid,200000) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned.")
else
doPlayerSendTextMessage(cid, 22, "You need 200.000 gold pieces to remove the black skull")
end
end

if (getCreatureSkullType(cid) == SKULL_RED) then
if doPlayerRemoveMoney(cid, 100000) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned.")
else
doPlayerSendTextMessage(cid, 22, "You need 100.000 gold pieces to remove the red skull")
end
end

if (getCreatureSkullType(cid) == SKULL_WHITE) then
if doPlayerRemoveMoney(cid, 10000) then
doCreatureSetSkullType(cid, SKULL_NONE)
doPlayerSendTextMessage(cid, 22, "Your soul was been cleaned.")
else
doPlayerSendTextMessage(cid, 22, "You need 10.000 gold pieces to remove the white skull")
end
end

if (getCreatureSkullType(cid) == SKULL_NONE) then
doPlayerSendTextMessage(cid, 22, "Your soul clean like water!")
end

return TRUE
end

 

Abraços.

Editado Dezembro 10 por XxSauvadurxX

Henrique MouraH
10 de dezembro de 2009 às 19:18

if doPlayerRemoveMoney(cid, 10000) == TRUE then
if (getCreatureSkullType(cid) == SKULL_WHITE) then
doPlayerRemoveMoney(cid, 10000)

 

Você colocou duas vezes cara...

Kude AmpolaK
10 de dezembro de 2009 às 19:25

Bouaaa, testei aqui e funfo certin ;s

So falta agora aprende a usa tables ne pra pode diminui isso aí xD.

sauvadur2S
10 de dezembro de 2009 às 19:30

Pronto, ja concertei e ta funfando, aquela hora que eu coloquei 2 vezes foi desantençao e tinha um bug.

Agora ja removi este bug, testei as 3 skulls e ta perfeitim :smile_positivo:

 

 

Pow Cade meus creditos,

Pelo menos 10% :cry:

Editado Dezembro 10 por XxSauvadurxX

Henrique MouraH
10 de dezembro de 2009 às 19:32

Já percebi o que você fez, estou colocando manualmente no tópico.

 

Abraços e obrigado.

2 semanas depois...
24 de dezembro de 2009 às 17:15

nOssa mano Eu tava Procurando esse Sistema A mais de 1 mes

MUITO OBRIGADO :lol²: