VegaS1234

[LUA] Get status

Apr 30th, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.70 KB | None | 0 0
  1. quest status begin
  2.     state start begin
  3.         function add_collect()
  4.             local dict = {
  5.                 [1] = { apply.MAX_HP, 99000, 439200 },
  6.                 [2] = { apply.MAX_SP, 99000, 439200 },
  7.                 [3] = { apply.INT, 99000, 439200 },
  8.                 [4] = { apply.STR, 99000, 439200 },
  9.                 [5] = { apply.DEX, 99000, 439200 }
  10.             }
  11.             affect.remove_collect()
  12.             for i = 1, table.getn(dict) do
  13.                 affect.add_collect(dict[i][1], dict[i][2], dict[i][3])
  14.             end
  15.         end
  16.    
  17.         when 40003.use begin
  18.             say_title("Permanently status")
  19.             say(string.format("Hello %s, you want to receive permanently status?[ENTER]", pc.get_name()))
  20.             if (select("Yes", "No") == 1) then
  21.                 status.add_collect()
  22.                 pc.removeitem(40003, 1)
  23.             end
  24.         end
  25.     end
  26. end
Advertisement
Add Comment
Please, Sign In to add comment