diff options
| author | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-28 17:03:44 +0000 |
|---|---|---|
| committer | Guillaume Melquiond <guillaume.melquiond@gmail.com> | 2007-08-28 17:03:44 +0000 |
| commit | e678c7cc1574d5739f83da2b0d493b44e3a7a42e (patch) | |
| tree | a184372b02622d82bc85a9827a835de186b0e2ed /data/test.lua | |
| parent | c4a2cd54d72f776d6e37eae7a8c67caa81269f4f (diff) | |
Implemented quest variables.
Diffstat (limited to 'data/test.lua')
| -rw-r--r-- | data/test.lua | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/data/test.lua b/data/test.lua index 6254225..47b0651 100644 --- a/data/test.lua +++ b/data/test.lua @@ -36,6 +36,11 @@ function my_npc1(npc, ch) elseif v == 5 then if tmw.chr_money_change(ch, -100) then do_message(npc, ch, string.format("Thank you for you patronage! You are left with %d gil.", tmw.chr_money(ch))) + local g = tonumber(get_quest_var(npc, ch, "001_donation")) + if not g then g = 0 end + g = g + 100 + tmw.chr_set_quest(ch, "001_donation", g) + do_message(npc, ch, string.format("As of today, you have donated %d gil.", g)) else do_message(npc, ch, "I would feel bad taking money from someone that poor.") end |
