Functions to invoke wish and add custom wishing.
local Wish = ELONA.require("core.Wish")
wish () | Wish something you want. |
wish (wish) | Wish wish . |
match (input, match_type, i18n_key_to_word_list, english_words) | Check whether input matches particular words. |
add (hook_type, callback) | Add custom wishing. |
Wish something you want.
Returns:
Wish wish
.
Parameters:
Check whether input
matches particular words.
Parameters:
Add custom wishing.
Parameters:
-- Add custom wish, 'enormous_money'.
Wish.add('First', function(input)
if Wish.match(
input,
'Include',
'mod_name.wish.enormous_money',
{'enormous money'}) then
Item.create(Chara.player().position, 'core.gold_piece', 1000 * 1000 * 1000)
GUI.txt(I18N.get('mod_name.wish.get_money'))
return true
else
return false
end
end)