Advertisement
Guest User

Untitled

a guest
Oct 1st, 2014
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. local condition = Condition(CONDITION_ATTRIBUTES)
  2. condition:setParameter(CONDITION_PARAM_SUBID, 123)
  3. condition:setTicks(-1)
  4.  
  5. local outfits = {
  6.     [{128, 136}] = {
  7.         key = CONDITION_PARAM_STAT_MAXHITPOINTS,
  8.         value = {
  9.             [0] = 500,
  10.             [1] = 725, -- första addon
  11.             [2] = 725, -- andra addon
  12.             [3] = 1050 -- om spelaren har båda addons
  13.         }
  14.     }
  15. }
  16.  
  17. function onLogin(cid)
  18.     local player = Player(cid)
  19.     local outfit = player:getOutfit()
  20.     for looktype, targetLooktype in pairs(outfits) do
  21.         if isInArray(looktype, outfit.lookType) then
  22.             condition:setParameter(targetLooktype.key, targetLooktype.value[outfit.lookAddons])
  23.             player:addCondition(condition)
  24.         end
  25.     end
  26.     return true
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement