DE
pedido

Remove redskull/blackskull

Por delalana, 28 de abr. de 2013 em Scripts

remove
skull
resolvido
script
otserv
5
1.3k
delalanaD
28 de abril de 2013 às 12:45

Olá,

 

No meu Otserver, possuo um script que, quando o player digita !removeskull, ele tira a skull, mas só que não reseta os frags. assim, quando o player matar outra pessoa, ele vai pegar skull denovo

 

Gostaria que meu script resetasse os frags também, por isso, segue abaixo para vocês analisarem e tentarem colocar para resetar os frags !

 

--- skull remover by kakilo - quinto script

 

function onSay(cid, words, param, channel)

 

if (getCreatureSkullType(cid) == SKULL_BLACK) then

if doPlayerRemoveMoney(cid, 20000000) then

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.")

else

doPlayerSendTextMessage(cid, 22, "Voce precisa de 20kk para remover a sua black skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_RED) then

if doPlayerRemoveMoney(cid, 20000000) then

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")

else

doPlayerSendTextMessage(cid, 22, "Voce precisa de 20kk para remover a sua red skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_NONE) then

doPlayerSendTextMessage(cid, 22, "Sua Skull foi retirada com Sucesso!")

end

 

return TRUE

end

PsyMcKenzieP
28 de abril de 2013 às 14:11

Testa ai:

--- skull remover by kakilo - quinto script

 

function onSay(cid, words, param, channel)

 

if (getCreatureSkullType(cid) == SKULL_BLACK) then

if doPlayerRemoveMoney(cid, 20000000) 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)

doPlayerSendTextMessage(cid, 22, "Black Skull Retirada.")

else

doPlayerSendTextMessage(cid, 22, "Voce precisa de 20kk para remover a sua black skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_RED) then

if doPlayerRemoveMoney(cid, 20000000) then

doCreatureSetSkullType(cid, SKULL_NONE)

doPlayerSendTextMessage(cid, 22, "Red Skull Retirada.")

else

doPlayerSendTextMessage(cid, 22, "Voce precisa de 20kk para remover a sua red skull")

end

end

 

if (getCreatureSkullType(cid) == SKULL_NONE) then

doPlayerSendTextMessage(cid, 22, "Sua Skull foi retirada com Sucesso!")

end

 

return TRUE

end

VodkartV
28 de abril de 2013 às 15:13

/\

 

ah do red skull n vai remover os frags

Editado Abril 28 por Vodkart

delalanaD
28 de abril de 2013 às 18:22

Não limpou os frag do player.. Vodkart ajuda aí, vc é o mestre dos scripts ';D

 

@Edit: Estava observando os scripts, e vi que o red skull tava diferente da do black skull, então adicionei esta linha no redskull -

db.executeQuery("UPDATE `killers` SET `unjustified` = 0 WHERE `id` IN (SELECT `kill_id` FROM `player_killers` WHERE `player_id` = " .. getPlayerGUID(cid) .. ")")
E acabou dando certo ! I

 

Duvida sanada, reportado para que movam.

Editado Abril 28 por delalana

RoksasR
28 de abril de 2013 às 18:33

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