Guest User

a

a guest
Aug 22nd, 2013
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.03 KB | None | 0 0
  1. local spells = {
  2. ["whirlwind"] = {icone_on = 2386, icone_off = 2387, cooldown = 20, level = 30},
  3. ["Rock Tomb"] = {icone_on = 2388, icone_off = 2389, cooldown = 60, level = 55},
  4. }
  5.  
  6. function getPokemonSpells(pokename)
  7. local ret = {}
  8.  
  9. local poke_spells = {
  10. ["Rat"] = {"whirlwind", "Rock Tomb"},
  11. }
  12.  
  13. if not poke_spells[pokename] then
  14.  
  15. print("ERROR: LIB -> OROCHIELF [POKEMON NOT EXIST]")
  16. return true
  17. end
  18.  
  19. local spells = poke_spells[pokename]
  20.  
  21. for moves = 1, #spells do
  22. local add = spells[moves]
  23.  
  24. table.insert(ret, add)
  25. end
  26.  
  27. return ret
  28. end
  29.  
  30. function loadCdbar(cid)
  31. local level = 56
  32. local msg = "@$OpenAttackWindow"
  33. local value = 0
  34. local a = getPokemonSpells("Rat")
  35.  
  36. if not a then
  37. return true
  38. end
  39.  
  40. for b = 1, #a do
  41.  
  42. value = value + 1
  43. local magic = "m".. value
  44. local c = a[b]
  45. local d = spells[c]
  46.  
  47. if d.level >= level then
  48.  
  49. msg = msg .. "@" .. d.icone_on .. "@" .. d.icone_off .. "@" .. d.cooldown .. "@" .. magic
  50. end
  51. end
  52. doPlayerSendTextMessage(cid, 25, msg)
  53. end
Advertisement
Add Comment
Please, Sign In to add comment