Script De Promotion

nslex
Por nslex
em Lixeira Pública

nslex

[Adm] Kyo
avatar
Campones
Campones

INFOS

Grupo: CamponesRegistrado: 18/11/10Posts: 9Char no Tibia: Druid Hellsing

Galera me ajude...

 

Presciso de um Script para quando o Player pronunciar '' !promotion''

ele virar MS,EK,RP, ou ED, de acordo com Sua vocation

 

Ajudem aii Plix', . vlws :p

23uwkee.jpg

MatheusGlad

<~~> Scripter <~~>
avatar
Conde
Conde

INFOS

Grupo: CondeRegistrado: 09/09/09Posts: 528Char no Tibia: Emekalo Makalo

Va em data/talkaction/scripts e adicione um arquivo em formato lua e nomeio de tpromote e bote isso dentro:

function onSay(cid, words, param, channel)
   local configs = {
   cost = 20000,
   level = 20
   }

   if isPremium(cid) then
       if getPlayerLevel(cid) >= configs.level then
           if getPlayerPromotionLevel(cid) < 1 then
               if configs.cost <= 0 or doPlayerRemoveMoney(cid, configs.cost) then
                   setPlayerPromotionLevel(cid, 1)
               else
                   doPlayerSendCancel(cid, "Voce nao tem o dinheiro suficiente que é " .. configs.cost .. " gold coins.")
               end
           else
               doPlayerSendCancel(cid, "Voce ja é promoted.")
           end
       else
           doPlayerSendCancel(cid, "Voce precisa ser level " .. configs.level .. " ou maior para adiquirir a promotion.")
       end
   else
       doPlayerSendCancel(cid, "Voce precisa ser premium account para adiquirir a promotion.")
   end
return TRUE
end

 

Depois va em talkaction.xml na pasta talkaction e bote essa linha:

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

 

Pronto!

Yours Mkalo :)