Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --[[
- ###########################
- # Author: VegaS #
- # Date: 2017.04.20 #
- # Quest: Choose the item #
- ###########################
- ]]
- quest select_item_quest begin
- state start begin
- when login with pc.get_level() == 1 begin
- send_letter("Choose the item")
- end
- when button or info begin
- say_title(string.format("Welcome to our server %s!", pc.get_name()))
- say("For start, we give you the opportunity")
- say("to choose a item with bonus.")
- say("I hope you choose wise!")
- say("")
- local SETTINGS_DICT = {
- [WARRIOR] = {
- ['type_weapon'] = {"Fms"},
- ['vnum'] = {299, 3219}
- },
- [ASSASSIN] = {
- ['type_weapon'] = {"Pumnal", "Arc"},
- ['vnum'] = {1179, 2199}
- },
- [SURA] = {
- ['type_weapon'] = {"Fms"},
- ['vnum'] = {299}
- },
- [SHAMAN] = {
- ['type_weapon'] = {"Clopot", "Evantai"},
- ['vnum'] = {5119, 7169}
- },
- }
- local jobIndex = pc.get_job()
- local dict = SETTINGS_DICT[jobIndex]['type_weapon']
- table.insert(dict, "Exit")
- local key = select_table(dict);
- if (key == table.getn(dict)) then
- send_letter("Choose the item")
- return
- end
- pc.give_item2_select(SETTINGS_DICT[jobIndex]['vnum'][key])
- item.set_value(0, 72, 55)
- set_state(__COMPLETE__)
- end
- end
- state __COMPLETE__ begin end
- end
Add Comment
Please, Sign In to add comment