Advertisement
Guest User

Untitled

a guest
Apr 20th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. SPELLS = {
  2. --Nivel --Expe
  3. [70101] = {70201},
  4.  
  5. }
  6.  
  7. local spell = SPELLS[getPlayerStorageValue]
  8.  
  9. function getSpellLevel(cid,spell) --- te dice el nivel de tu spell
  10. if(getPlayerStorageValue(cid,spell) >= 1)then
  11. return getPlayerStorageValue(cid,spell)
  12. else
  13. return 0
  14. end
  15. end
  16.  
  17. function getSpell(cid,spell) --- te comprueba si tienes la spell
  18. if(getSpellLevel(cid,spell) >= 1) then
  19. return true
  20. else
  21. return false
  22. end
  23. end
  24.  
  25. function getSpellExp(cid,spell) --- te dice la exp que tienes de la spell
  26. if(getPlayerStorageValue(cid,spell[1]) >= 0) then
  27. return getPlayerStorageValue(cid,spell[1])
  28. else
  29. return -1
  30. end
  31. end
  32.  
  33. function addExpSpell(cid,spell) ---- te añade un punto a tu experiencia de spell
  34. if (getSpellExp(cid,spell) >= 0) then --- si tienes la experiencia te la sube
  35. setPlayerStorageValue(cid,spell,getSpellExp(cid,spell[1]) + 1)
  36. else
  37. setPlayerStorageValue(cid,spell[1],0) --- si no lo tienes entonces te la asigna a 0
  38. end
  39. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement