Guest User

Testespell

a guest
Jun 22nd, 2012
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.35 KB | None | 0 0
  1. local tempo = 60 * 1000 -- Tempo, nesse caso esta 60 segundos Lembrando que 1000 = 1 segundo
  2.  
  3. local ml = 5 -- quantos ira aumentar o skill de ML
  4. local skillfist = 5 -- quantos ira aumentar o skill de Fist
  5. local skillsword = 5 -- quantos ira aumentar o skill de Sword
  6. local skillaxe = 5 -- quantos ira aumentar o skill de Axe
  7. local skillclub = 5 -- quantos ira aumentar o skill de Club
  8. local skilldistance = 5 -- quantos ira aumentar o skill de Distance
  9. local skillshield = 5 -- quantos ira aumentar o skill de Shield
  10. local health = 30 -- A cada 1 segundo quantos aumentar de vida
  11. local combat = createCombatObject()
  12. setCombatParam(combat, COMBAT_PARAM_EFFECT, 30)
  13. setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
  14.  
  15. local condition = createConditionObject(CONDITION_ATTRIBUTES)
  16. setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
  17. setConditionParam(condition, CONDITION_PARAM_STAT_MAGICLEVEL, ml)
  18. setConditionParam(condition, CONDITION_PARAM_SKILL_FIST, skillfist)
  19. setConditionParam(condition, CONDITION_PARAM_SKILL_SWORD, skillsword)
  20. setConditionParam(condition, CONDITION_PARAM_SKILL_AXE, skillaxe)
  21. setConditionParam(condition, CONDITION_PARAM_SKILL_CLUB, skillclub)
  22. setConditionParam(condition, CONDITION_PARAM_SKILL_DISTANCE, skilldistance)
  23. setConditionParam(condition, CONDITION_PARAM_SKILL_SHIELD, skillshield)
  24. setConditionParam(condition, CONDITION_PARAM_OUTFIT, outfit)
  25. setCombatCondition(combat, condition)
  26.  
  27. local condition = createConditionObject(CONDITION_HASTE)
  28. setConditionParam(condition, CONDITION_PARAM_SPEED, 250)
  29. setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
  30. setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
  31. setCombatCondition(combat, condition)
  32.  
  33. local condition = createConditionObject(CONDITION_REGENERATION)
  34. setConditionParam(condition, CONDITION_PARAM_SUBID, 1)
  35. setConditionParam(condition, CONDITION_PARAM_BUFF, TRUE)
  36. setConditionParam(condition, CONDITION_PARAM_TICKS, tempo)
  37. setConditionParam(condition, CONDITION_PARAM_HEALTHGAIN, health)
  38. setConditionParam(condition, CONDITION_PARAM_HEALTHTICKS, 1000)
  39. setCombatCondition(combat, condition)
  40.  
  41.  
  42. function magicEffect2(cid)
  43. if (isCreature(cid)) then
  44.     if (isCreature(cid) and getPlayerStorageValue(cid, 102051) ~= 1) then
  45.         doSendMagicEffect(getPlayerPosition(cid), 120)
  46.  
  47.     else if (isCreature(cid) and k > 0) then
  48.             setPlayerStorageValue(cid, 102053,0)
  49.             while (k <= 59) do
  50.             k = k + 1
  51.             stopEvent(vetor2[k])
  52.             end
  53.         end
  54.     end
  55.    
  56.     if (isCreature(cid) and o == 58) then
  57.         setPlayerStorageValue(cid, 102053,0)
  58.     end
  59.     k = k + 1
  60. end  
  61.   --addEvent(print, 10, o)
  62. end
  63.  
  64.  
  65. function onCastSpell(cid, var)
  66.  
  67. if getPlayerStorageValue(cid, 102053) ~= 1 then
  68. j = 0
  69. k = 0
  70. setPlayerStorageValue(cid, 102051,0)
  71.     if isCreature(cid) and getPlayerStorageValue(cid, 102059) ~= 1 then
  72.     doCombat(cid, combat, var)
  73.  
  74.     vetor2 = {}
  75.     tempo2 = 1
  76.     while (tempo2 ~= 150000) do
  77.     vetor2[j] = addEvent(magicEffect2, tempo2, cid)
  78.     tempo2 = tempo2 + 1
  79.     j = j + 1
  80.     end
  81.  
  82.     setPlayerStorageValue(cid, 102053,1) -- storage novo, quando = 1 player esta transformado
  83.  
  84.     return true
  85.     else
  86.     setPlayerStorageValue(cid, 102051,1)  
  87.     doPlayerSendCancel(cid, "Sorry, you can not turn while flying.")
  88.     end
  89. else
  90. doPlayerSendCancel(cid, "Sorry, you are transformed.")
  91. end
  92. end
Advertisement
Add Comment
Please, Sign In to add comment