Advertisement
Skymagnum

Untitled

Apr 28th, 2013
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. function onUse(cid, item, fromPosition, itemEx, toPosition)
  2.  
  3. local parchs = {
  4.     [7702] = {storage = 18000, spells = {"Berserk", "Death Strike"}},
  5. }
  6.  
  7.     local parch = parchs[item.itemid]
  8.     local learn = "You learn this spells:/n/n"
  9.  
  10.     if parch.storage < 1 then
  11.        for _, spell in ipairs(parch.spells) do
  12.           doPlayerLearnInstantSpell(cid, spell)
  13.           learn = learn .. spell .. "/n"
  14.        end
  15.  
  16.        doShowTextDialog(cid, 2160, learn)
  17.        setPlayerStorageValue(cid, parch.storage, 1)
  18.     end
  19.  
  20.     return true
  21. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement