beeki

Transform script

Jun 6th, 2012
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.08 KB | None | 0 0
  1. local config = {
  2. --[vocation id] = { level, nova voc, looktype, efeito}
  3. [9] = { 25, 10, 66, 53}, --9 é a vocação que pede, 25 é o level que pede, 10 é a nova vocação, 66 é o looktype que vai setar, 53 é o efeito que vai sair.
  4. [10] = { 50, 11, 91, 53},
  5. [11] = { 75, 12, 18, 53},
  6. [12] = { 100, 13, 31, 53},
  7. [13] = { 125, 14, 92, 53},
  8. [14] = { 150, 15, 77, 53},
  9. [15] = { 175, 16, 49, 66},
  10. [16] = { 200, 17, 25, 54},
  11. [17] = { 250, 18, 179, 66}
  12.  
  13. }
  14.  
  15. function onSay(cid, words, param, channel)
  16. doPlayerSay(cid, "transformar")
  17.  
  18.     local voc = config[getPlayerVocation(cid)]
  19.     if voc then
  20.         if getPlayerLevel(cid) >= voc[1] then
  21.             doPlayerSetVocation(cid, voc[2])
  22.             doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "Você se Transformou!")
  23.             local outfit = {lookType = voc[3]}
  24.             doCreatureChangeOutfit(cid, outfit)
  25.             doSendMagicEffect(getCreaturePosition(cid), voc[4])
  26.         else
  27.             doPlayerSendTextMessage(cid, MESSAGE_STATUS_WARNING, "You need Level " .. voc[1] .. " to Transform.")
  28.         end
  29.     else
  30.         doPlayerSendCancel(cid, "You can not Transform!")
  31.     end
  32.  
  33. return true
  34. end
Advertisement
Add Comment
Please, Sign In to add comment