Advertisement
Guest User

Untitled

a guest
Dec 20th, 2014
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. local p1mod = GAMESTATE:GetPlayerState(PLAYER_1):GetPlayerOptions('ModsLevel_Song')
  2. local p2mod = GAMESTATE:GetPlayerState(PLAYER_2):GetPlayerOptions('ModsLevel_Song')
  3. for i,v in pairs(mods) do
  4. --get parts of the mod
  5. local modName = string.match(v[3],'%u%a%a+') or string.match(v[3],'%No%s%u%a+') or string.match(v[3],'%C%d+') or string.match(v[3],'%d...')
  6. local modValue = string.match(v[3],'%d+%%') or string.match(v[3],'%-%d+%%')
  7. local modApproach = string.match(v[3],'%*%d+')
  8. --fix nil
  9. if modValue == nil or modValue == "?" then modValue = "100%" end
  10. if modApproach == nil then modApproach = "*1" end
  11. --rid of % and * and No
  12. modValue = string.match(modValue,'%d+') or string.match(modValue, '%-%d+')
  13. modApproach = string.match(modApproach,'%d+')
  14. if modName == string.match(v[3],'%No%s%u%a+') then
  15. modName = string.match(string.match(modName,'%s%u%a+'),'%u%a+')
  16. modValue = "0"
  17. end
  18. modValue = tonumber(modValue/100)
  19.  
  20. if rob_time >=v[1] then
  21. if (v[4] == 'len' and rob_time <=v[1]+v[2]) or (v[4] == 'end' and rob_time <=v[2]) then
  22. --if modName == string.match(v[3],'%C%d+') then
  23. -- modValue = string.match(modName,'%d+')
  24. -- p1mod:CMod(modValue,1)
  25. if modName == string.match(v[3],'%d.%d%x') then
  26. modValue = string.match(modName,'%d...')
  27. p1mod:XMod(modValue,1)
  28. else
  29. p1mod[modName](p1mod,modValue,modApproach)
  30. end
  31. end
  32. end
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement