Advertisement
Combreal

moni.lua

Feb 20th, 2014
593
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.16 KB | None | 0 0
  1. -- Monica welcome message --
  2. -- Unlimited rockets --
  3. -- Immune failing --
  4.  
  5. first_message = "Welcome into the Witch"
  6. second_message = "Prepare to die rat"
  7.  
  8. function GetRequiredVersion()
  9.     return 200
  10. end
  11.  
  12.  
  13. function OnScriptLoad(processid, game, persistent) end
  14.  
  15. function OnPlayerJoin(player)
  16.     privatesay(player, first_message)
  17.     privatesay(player, second_message)
  18. end
  19.  
  20. function OnPlayerSpawnEnd(player, m_objectId)
  21.     registertimer(1000, "InfiniteAmmo", player)
  22. end
  23.  
  24.  
  25. function InfiniteAmmo(id, count, player)
  26.     local m_player = getplayer(player)
  27.     if m_player then
  28.         local objId = readdword(m_player, 0x34)
  29.         local m_object = getobject(objId)
  30.         if m_object then
  31.             for i = 0,3 do
  32.                 local weapId = readdword(m_object, 0x2F8 + (i * 4))
  33.                 local m_weapon = getobject(weapId)
  34.                 if m_weapon then
  35.                     writeword(m_weapon, 0x2B6, 9999)
  36.                     writeword(m_weapon, 0x2B8, 9999)
  37.                     updateammo(weapId)
  38.                 end
  39.             end
  40.  
  41.             return true
  42.         end
  43.     end
  44.  
  45.     return false
  46. end
  47.  
  48. function OnDamageLookup(receiving, causing, mapId, tagdata)
  49.     local tag_name = gettaginfo(mapId)
  50.     if tag_name == "globals\\failing damages" then
  51.         return false
  52.     end
  53.     return true
  54. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement