daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest May 21st, 2014 154 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.         on_activate = function(self, staticdata, dtime_s)
  2.                 if string.sub(staticdata, 1, string.len("return")) == "return" then
  3.                         local data = minetest.deserialize(staticdata)
  4.                         if data and type(data) == "table" then
  5.                                 self.itemstring = data.itemstring
  6.                                 self.always_collect = data.always_collect
  7.                                 print(dump(dtime_s))
  8.                                 if data.age then
  9.                                         self.age = data.age + dtime_s
  10.                                 else
  11.                                         self.age = dtime_s
  12.                                 end
  13.                         end
  14.                 else
  15.                         self.itemstring = staticdata
  16.                 end
  17.                 self.object:set_armor_groups({immortal=1})
  18.                 self.object:setvelocity({x=0, y=2, z=0})
  19.                 self.object:setacceleration({x=0, y=-10, z=0})
  20.                 self:set_item(self.itemstring)
  21.         end,
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top