Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SPELLS = {
- --Nivel --Expe
- [70101] = {70201},
- }
- local spell = SPELLS[getPlayerStorageValue]
- function getSpellLevel(cid,spell) --- te dice el nivel de tu spell
- if(getPlayerStorageValue(cid,spell) >= 1)then
- return getPlayerStorageValue(cid,spell)
- else
- return 0
- end
- end
- function getSpell(cid,spell) --- te comprueba si tienes la spell
- if(getSpellLevel(cid,spell) >= 1) then
- return true
- else
- return false
- end
- end
- function getSpellExp(cid,spell) --- te dice la exp que tienes de la spell
- if(getPlayerStorageValue(cid,spell[1]) >= 0) then
- return getPlayerStorageValue(cid,spell[1])
- else
- return -1
- end
- end
- function addExpSpell(cid,spell) ---- te añade un punto a tu experiencia de spell
- if (getSpellExp(cid,spell) >= 0) then --- si tienes la experiencia te la sube
- setPlayerStorageValue(cid,spell,getSpellExp(cid,spell[1]) + 1)
- else
- setPlayerStorageValue(cid,spell[1],0) --- si no lo tienes entonces te la asigna a 0
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement