shadowm

Untitled

Jun 13th, 2012
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.23 KB | None | 0 0
  1. function safe_random(arg)
  2.     wesnoth.fire("set_variable", {
  3.         name = "temp_ats_lua_random",
  4.         rand = arg,
  5.     })
  6.  
  7.     local r = wesnoth.get_variable("temp_ats_lua_random")
  8.     wesnoth.set_variable("temp_ats_lua_random")
  9.  
  10.     return r
  11. end
Advertisement
Add Comment
Please, Sign In to add comment