Ir para conteúdo
Entre para seguir isso  
Lyu Elite

TalkAction ~ !promotion

Recommended Posts

Lyu Elite    0
Lyu Elite

Padrão de Postagem :
Autor : [url="http://otland.net/members/shawak/"]Shawak[/url]
Versão : 8.40x
Testado : TFS 0.3.3
Tipo : TalkAction
Comentario : Você fala !promotion e depois você pega promotion.

 

Vá em data/talkaction/script depois lá crie um arquivo .lua chamado promote.lua

Depois bote isso lá dentro :

 

function onSay(cid, words, param, channel)

   sorcerer = {
   cost = 200000,
   level = 20,
   text = "Promoted to Master Sorcerer",
   }
   druid = {
   cost = 200000,
   level = 20,
   text = "Promoted to Elder Druid",
   }
   paladin = {
   cost = 200000,
   level = 20,
   text = "Promoted to Royal Paladin",
   }
   knight = {
   cost = 200000,
   level = 20,
   text = "Promoted to Elite Knight",
   }

   if getPlayerVocation(cid) == 1 then
       voc = sorcerer
   elseif getPlayerVocation(cid) == 2 then
       voc = druid
   elseif getPlayerVocation(cid) == 3 then
       voc = paladin
   elseif getPlayerVocation(cid) == 4 then
       voc = knight
   else
       voc = nil
   end
   if voc ~= nil then
       if getPlayerLevel(cid) >= voc.level then
           if doPlayerRemoveMoney(cid,voc.cost) == TRUE then
               setPlayerPromotionLevel(cid, 1)
               doSendMagicEffect(getCreaturePosition(cid),14)
               doSendAnimatedText(getCreaturePosition(cid),voc.text,49)
           else
               doPlayerSendTextMessage(cid,18,"You need "..voc.cost.." to promote.")
           end
       else
           doPlayerSendTextMessage(cid,18,"You need level "..voc.level.." to promote.")
       end
   else
       doPlayerSendTextMessage(cid,18,"You already promoted.")
   end
   return TRUE
end

Depois em data/talkaction.xml bote está tag:

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

 

Vlwo galera , espero que gostem;

OBS: Não fui eu que fiz o script;

Compartilhar este post


Link para o post
Mock    32
Mock

Comentario: -

 

Aprovadoico_aprovado.png & Movidoicon_movido.giffechado22xnux7.gif

 

mock.png

Compartilhar este post


Link para o post
franfran    0
franfran

aqui em casa não funciono não ..

Compartilhar este post


Link para o post
Lyu Elite    0
Lyu Elite
aqui em casa não funciono não ..

 

Deu oquê ?

Compartilhar este post


Link para o post
Entre para seguir isso  
  • Quem Está Navegando   0 membros estão online

    Nenhum usuário registrado visualizando esta página.

×