NPC cu fms
Salutare, cum as putea pune la un NPC , sa acorde o arma gen fms sau alceva cu bonusul direct pe el?
--[[
###########################
# 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
Nu este pentru npc dar este pentru cand te conectezi pe server, poti edita nivelul la care sa primesti questul
###########################
# 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
Nu este pentru npc dar este pentru cand te conectezi pe server, poti edita nivelul la care sa primesti questul
Salut, am bagat acest quest si nu a mers deloc.
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Niciun utilizator înregistrat și 52 vizitatori






