thank you for answer
I tried to add it, but I can't: /
Code
- quest main_quest_lv4 begin
- state run begin
- when login or levelup or enter with pc.get_level() >= 4 begin
- set_state ( gotopomoc )
- end
- when 20354.chat.gameforge.main_quest_lv4._10_npcChat begin
- say_title(gameforge.main_quest_lv1._60_sayTitle)
- say(gameforge.main_quest_lv4._20_say)
- end
- end
- state gotopomoc begin
- when letter begin
- send_letter_ex(gameforge.main_quest_lv4._30_sendLetter, "green,blink,ex", "scroll_open_green.tga")
- local v=find_npc_by_vnum(20354)
- if 0==v then
- else
- target.vid("__TARGET__", v, gameforge.main_quest_lv2._40_targetVid)
- end
- end
- when button or info begin
- say_title(gameforge.main_quest_lv4._30_sendLetter)
- say(gameforge.main_quest_lv4._40_sayReward)
- end
- when __TARGET__.target.click begin
- target.delete("__TARGET__")
- say_title(gameforge.main_quest_lv1._60_sayTitle)
- say(gameforge.main_quest_lv4._50_say)
- wait()
- pc.give_item2( 27105 ,3 )
- set_state ( gotostarenka )
- end
- end
- state gotostarenka begin
- when letter begin
- local v=find_npc_by_vnum(9006)
- if 0==v then
- else
- target.vid("__TARGET__", v, gameforge.main_quest_lv4._70_targetVid)
- end
- end
- when letter begin
- send_letter_ex(gameforge.main_quest_lv4._80_sendLetter, "green,blink,ex", "scroll_open_green.tga")
- end
- when button or info begin
- say_title(gameforge.main_quest_lv4._80_sendLetter)
- say_reward(gameforge.main_quest_lv4._90_sayReward)
- end
- when 9006.take.target.click begin
- if item.vnum == 20354 then
- target.delete("__TARGET__")
- say_title("sdfdsf")
- say("xccvb")
- set_quest_state("main_quest_lv4","run")
- end
- end
- end
- end