Hello everyone. I have an idea for a script to my server but now I am blocked in one place and do not know how to continue the quest. The idea is: Unlock the function of collecting flowers to level 30 and receive a letter that warns the deblocking. (Already written) Use the target vid to indicate where the flower garden. (Already written) Use the target vid whenever you can pick some flowers (so when the timer above) (To Do) When gathering flowers, the player will receive an item (that will bag of flowers and I'll put id) (To Do) Insert a timer when gathering flowers. (To do)
Can someone please help me?
quest fiori begin
state start begin
when login or levelup with pc.get_level() >= 30 begin
set_state("flowers")
end
end
state raccoglifiori begin
when letter begin
local v = find_npc_by_vnum(20358)
if v !=0 then
target.vid("flowers", v, "Flowers Garden")
end
send_letter("Flowers garden")
end
when button or info begin
say_title("Flowers garden")
say("Good Soldiers, now you are level 30")
say("Now you can drop flowers from the Flowers Garden")
say("When you get level 40 you can get more random flowers!")
say_reward("Go to Flowers garden for drop some flowers!")
end
when flowers.target.click or 20358.chat."Raccolta fiori" begin
if pc.getqf("flowers") == 0 then
target.delete("flowers")
say_title("Flowers Garden")
say(" ".. pc . get_name() .. " : Mmh some flowers.. ")
wait()
say_reward("I found some flowers!")
timer("fiori, 20")
--- put 20 second on timer just for try the script fast
pc.setqf("flowers", 1 )
elseif pc.getqf("flowers") == 1 then
say(" ".. pc . get_name() .. " : Mmh.. some flowers ")
wait()
say_reward("I didn't find some flowers.. Try again more late.")
end
end
when flowers.timer with pc.getqf("flowers") == 1 begin
send_letter("Flowers avaiable")
elseif
send_letter("Flowers unavaiable")
return
end