Tipologie server:
*Resursă folosită:
*ServerFiles utilizat:
*Syserr:
Poză:
*Detalii suplimentare:
Acesta este questul :
define gemstone 30270
define alchemist 20001
define reward_box 50255
define gemstone_need_count 10
define gemstone_trade_max_per_day 10
define dragon_soul_can_use_level 30
define drop_flag "ds_drop"
quest dragon_soul begin
state start begin
when levelup or letter with pc.level >= dragon_soul_can_use_level begin
send_letter("Sosire Cioburilor Piatra Dragon")
local v = find_npc_by_vnum(alchemist)
if 0 != v then
target.vid("__TARGET__", v, mob_name(alchemist))
end
end
when info or button begin
say("Alchimistul te cauta urgent.")
say("Du-te cat de repede poti la el!")
end
when alchemist.chat."Cioburi Piatra Dragon?!" with pc.level >= dragon_soul_can_use_level begin
target.delete("__TARGET__")
say_title(mob_name(alchemist))
say("Ah, tu esti! Am descoperit ceva uimitor:")
say("ciobul unei pietre dragon! O Piatra Dragon")
say("este un cristal foarte rar si pretios cu")
say("o putere surprinzator de mare. Se spune")
say("ca aceasta ar fi sufletul unui Dragon!")
say("Iti voi da puterea ochiului de dragon,")
say("pentru a putea gasi cioburile. Adumi 10")
say("cioburi in total. Acestea le voi transmuta")
say("intr-o piatra dragon.")
set_state(state_learning)
end
end
state state_learning begin
when letter begin
send_letter("Aduna Cioburi Piatra Dragon")
end
when info or button begin
say("Du-i Alchimistului 10 Cioburi Piatra Dragon")
end
when kill begin
if npc.is_pc() then
return
end
if pc.count_item(gemstone) < gemstone_need_count then
if drop_gamble_with_flag(drop_flag) then
game.drop_item_with_ownership(gemstone, 1, 300)
end
end
end
when alchemist.chat."Aduna Cioburi Piatra Dragon" begin
say_title(mob_name(alchemist))
if pc.count_item(gemstone) >= gemstone_need_count then
say(gameforge.dragon_soul._1070_say)
pc.remove_item(gemstone, gemstone_need_count)
ds.give_qualification()
char_log(pc.get_player_id(), 'DS_QUALIFICATION', 'SUCCESS')
pc.give_item2(reward_box)
local today = math.floor(get_global_time() / 86400)
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 9)
set_state(state_farming)
else
say("Hei, nu mai pierde timp! Mai bine")
say("du-te si aduna Cioburi Piatra Dragon!")
end
end
end
state state_farming begin
when letter begin
send_letter("Putere ochiului de dragon")
end
when info or button begin
say(string.format(gameforge.dragon_soul._1100_say, pc.getf("dragon_soul", "eye_left")))
end
when kill begin
if npc.is_pc() then
return
end
if drop_gamble_with_flag(drop_flag) then
local eye_left = pc.getf("dragon_soul", "eye_left")
local haved_gemstone_number = pc.count_item(gemstone)
if eye_left > haved_gemstone_number / gemstone_need_count then
game.drop_item_with_ownership(gemstone, 1, 300)
end
end
end
when gemstone.pick begin
local eye_left = pc.getf("dragon_soul", "eye_left")
if eye_left <= 0 then
return
end
if pc.count_item(gemstone) >= gemstone_need_count then
pc.setf("dragon_soul", "eye_left", eye_left - 1)
pc.remove_item(gemstone, gemstone_need_count)
pc.give_item2(reward_box)
if 1 == eye_left then
notice("Nu mai sunt cioburi Piatra Dragon.")
set_state(state_closed_season)
end
end
end
when alchemist.chat."Da-mi puterea ochiului de dragon" begin
say_title(mob_name(alchemist))
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say("Salutare! Astazi ai primit deja puterea ochiului de dragon.")
say("Acest proces ma slabeste foarte tare de aceea te pot ajuta")
say("doar o data pe zi. Revino maine din nou!")
else
say("Salutare! Pun pariu ca ai venit sa ceri puterea")
say("ochiului de dragon. Corect? Bine atunci, poftim")
say("puterea. Mult noroc la cautat! Sper sa gasesti")
say("destule cioburi pentru 10 pietre dragon!")
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 10)
end
end
end
state state_closed_season begin
when letter begin
send_letter("Puterea ochiului de dragon lipseste")
end
when info or button begin
say("Putere ochiului de dragon te-a parasit.")
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say("Du-te maine din nou la Alchimist pentru a-ti")
say("lua puterea ochiului de dragon din nou!")
else
say("Du-te la Alchimist pentru a-ti lua puterea ochiului de dragon!")
end
end
when alchemist.chat."Putere ochiului de dragon" begin
say_title(mob_name(alchemist))
local today = math.floor(get_global_time() / 86400)
if today == pc.getf("dragon_soul", "eye_timestamp") then
say("Salutare! Astazi ai primit deja puterea ochiului de dragon.")
say("Acest proces ma slabeste foarte tare de aceea te pot ajuta")
say("doar o data pe zi. Revino maine din nou!")
else
say("Salutare! Pun pariu ca ai venit sa ceri puterea")
say("ochiului de dragon. Corect? Bine atunci, poftim")
say("puterea. Mult noroc la cautat! Sper sa gasesti")
say("destule cioburi pentru 10 pietre dragon!")
pc.setf("dragon_soul", "eye_timestamp", today)
pc.setf("dragon_soul", "eye_left", 10)
set_state(state_farming)
end
end
end
state state_1 begin
when login begin
set_state(state_learning)
end
end
state state_2 begin
when login begin
set_state(state_learning)
end
end
state state_3 begin
when login begin
set_state(state_closed_season)
end
end
end



