Guest User

dae

a guest
Mar 18th, 2013
27
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.05 KB | None | 0 0
  1. -- Defesa Extra - extradefense [00]
  2. -- Dano Extra - extraattack [00]
  3. -- Dano - attack [00]
  4. -- Defesa - defense [00]
  5. -- Nome - name [""]
  6. -- Descrição - description [""]
  7. -- Artículo (you see a xxx - a=artículo) - article [""]
  8.  
  9. local me = {
  10.     {att="defense",valor=30,id=2376},
  11.     {att="extradefense",valor=15,id=2377},
  12.     {att="name",valor="Machado divinu +5",id=2378},
  13.     {att="article",valor="um",id=1967}
  14.     }
  15.  
  16. function onUse(cid, item, frompos, item2, topos)
  17.     local possibleitems = {}
  18.     for x,i in pairs(me) do
  19.         table.insert(possibleitems,i.id)
  20.     end
  21.    
  22.     if isInArray(possibleitems,item2.itemid) then
  23.         for x,i in pairs(me) do
  24.             if i.id == item2.itemid then
  25.                 doItemSetAttribute(item2.uid,i.att,i.valor)
  26.                 doItemSetAttribute(item2.uid,"description",(getItemAttribute(item2.uid,"description") ~= nil and getItemAttribute(item2.uid,"description") or "Este item foi forjado por "..getPlayerName(cid).."."))
  27.                 doSendMagicEffect(topos,12)
  28.             end
  29.         end
  30.     else
  31.         doPlayerSendCancel(cid,"O martelo não tem efeito neste item.")
  32.     end
  33.     return true
  34. end
Advertisement
Add Comment
Please, Sign In to add comment