Advertisement
poxipox

Untitled

Oct 27th, 2023
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.49 KB | None | 0 0
  1.  
  2. local blockAttack = {
  3.     ['monsteName'] = {storageValue = 9990, needValue = 4},
  4.  
  5. }
  6.  
  7. function onStatsChange(cid, attacker, type, combat, value, spellType)
  8.     if not attacker or isMonster(attacker) then
  9.         return false
  10.     end
  11.  
  12.     local name = getCreatureName(cid)
  13.     if not name then
  14.         return false
  15.     end
  16.  
  17.    
  18.     if blockAttack[name] then
  19.         if getPlayerStorageValue(attacker, blockAttack[name].storageValue) ~= blockAttack[name].needValue  then
  20.             return false
  21.         end
  22.     end
  23.  
  24.     return true
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement