[QUEST] [Eveniment] - Vanatoarea de comori
Scris: 08 Iun 2020, 20:52
Dupa ce activatul questul jucătorii trebuie sa dea relog sa sa se teleporteze pentru a apărea misiunea Vânătoarea de Comori a inceput . O sa apara o ghicitoare ( trebuie sa o scrieți voi cu imaginația voastra ). Trebuie sa omorâți 3 șefi si dupa fiecare șef omorât o sa apara un indiciu pentru următorul șef si dupa ce ati colectat indiciile o sa ajungeți la un NPC ascuns . Dupa ce ati dus toate indiciile la NPC o sa primiți o harta unde va dezvăluie coordonatele comorii . Comoara are forma unei broaște aurii si va da doar liderului de grup ( aveți nevoie de o grupa ). Comoara depinde de cati membri sunt in grupa si este de datoria liderului sa o împartă in mod egal.
Quest 1 :
Quest 2 :
Quest 1 :
Cod: Selectaţi tot
--** Modificare tutti i value che troverete con quelli che si vuole
--** mettere il numero 18 nella colonna type degli item che s'intende utilizzare
quest caccia_al_tesoro begin
state start begin
function GetScriptData(data)
local settings = {['mob'] = {101, 102, 103},
['indizi'] = {30120, 30121, 30122, 27988},
['tesoro'] = {71051},
['yang'] = {1000000},
['coord_mappa'] = {819, 315}}
return rawget(settings, data)
end
function TitleCacciaTesoro()
say_title("Caccia al Tesoro")
say("")
end
when letter with game.get_event_flag("EventoCacciaTesoro") == 1 begin
send_letter("Caccia al Tesoro - Inizio")
end
--** SCRIVETE L'INDOVINELLO INIZIALE, SARA' QUELLO CHE I PLAYER LEGGERANNO QUANDO APRIRANNO LA QUEST
when button or info begin
caccia_al_tesoro.TitleCacciaTesoro()
say("Scrivete l'indovinello e cambiate")
say("i value dei mob e degli item.")
say("dovete essere in gruppo!")
end
--** MOB CHE DROPPA IL PRIMO INDIZIO E SUCCESSIVO UTILIZZO DEL PRIMO INDIZIO ITEM
--** DEVE COMPRENDERE UNA SECONDA PARTE DI INDOVINELLO PER ARRIVARE AL SECONDO INDIZIO
when 101.kill begin
if game.get_event_flag("EventoCacciaTesoro") == 1 and party.is_party() then
game.drop_item_with_ownership(caccia_al_tesoro.GetScriptData('indizi')[1])
notice_all("Il primo indizio e' stato trovato!")
end
end
when 30120.use begin
if game.get_event_flag("EventoCacciaTesoro") == 1 and party.is_party() then
caccia_al_tesoro.TitleCacciaTesoro()
say("Seconda parte dell'indovinello con relativo")
say("indizio per trovare il terzo[ENTER]")
end
end
--** MOB CHE DROPPA IL SECONDO INDIZIO E SUCCESSIVO UTILIZZO DEL SECONDO INDIZIO ITEM
--** DEVE COMPRENDERE UNA TERZA PARTE DI INDOVINELLO PER ARRIVARE AL TERZO INDIZIO
when 102.kill with game.get_event_flag("EventoCacciaTesoro") == 1 and party.is_party() begin
game.drop_item_with_ownership(caccia_al_tesoro.GetScriptData('indizi')[2])
notice_all("Il secondo indizio e' stato trovato!")
end
when 30121.use with game.get_event_flag("EventoCacciaTesoro") == 1 and party.is_party() begin
caccia_al_tesoro.TitleCacciaTesoro()
say("Terza parte dell'indovinello con relativo")
say("indizio per trovare il quarto[ENTER]")
end
--** MOB CHE DROPPA IL TERZO INDIZIO E SUCCESSIVO UTILIZZO DEL TERZO INDIZIO ITEM
--** DEVE COMPRENDERE UNA QUARTA PARTE DI INDOVINELLO PER ARRIVARE AL QUARTO E ULTIMO INDIZIO
when 103.kill with game.get_event_flag("EventoCacciaTesoro") == 1 and party.is_party() begin
game.drop_item_with_ownership(caccia_al_tesoro.GetScriptData('indizi')[3])
notice_all("Il terzo indizio e' stato trovato!")
end
when 30122.use with game.get_event_flag("EventoCacciaTesoro") == 1 and party.is_party() begin
caccia_al_tesoro.TitleCacciaTesoro()
say("Quarta parte dell'indovinello con relativo")
say("indizio per trovare l'NPC [ENTER]")
end
when 20095.chat."Caccia al Tesoro" with game.get_event_flag("EventoCacciaTesoro") == 1 and party.is_party() begin
caccia_al_tesoro.TitleCacciaTesoro()
say("Sei pronto per scoprire dove si trova il tesoro ?")
say("Devi possedere tutti gli indizi, li hai ?[ENTER]")
local siono = select ("Si", "No")
if siono == 1 then
if pc.count_item(caccia_al_tesoro.GetScriptData('indizi')[1]) < 1 and
pc.count_item(caccia_al_tesoro.GetScriptData('indizi')[2]) < 1 and
pc.count_item(caccia_al_tesoro.GetScriptData('indizi')[3]) < 1 then
caccia_al_tesoro.TitleCacciaTesoro()
say_red("Mi dispiace ma non possiedi tutti gli indizi!")
say_red("Torna quando li avrai.[ENTER]")
elseif not party.is_party() then
caccia_al_tesoro.TitleCacciaTesoro()
say_red("Devi essere in gruppo per ottenere la mappa.")
say_red("Ritorna con un gruppo[ENTER]")
elseif not party.is_leader() then
say_red("Solo il capo gruppo puo' richiedere la mappa[ENTER]")
else
caccia_al_tesoro.TitleCacciaTesoro()
say("Bene, dato che possiedi tutti gli indizi ti daro'")
say("la mappa per arrivare al tesoro![ENTER]")
pc.remove_item(caccia_al_tesoro.GetScriptData('indizi')[1], pc.count_item(caccia_al_tesoro.GetScriptData('indizi')[1]))
pc.remove_item(caccia_al_tesoro.GetScriptData('indizi')[2], pc.count_item(caccia_al_tesoro.GetScriptData('indizi')[2]))
pc.remove_item(caccia_al_tesoro.GetScriptData('indizi')[3], pc.count_item(caccia_al_tesoro.GetScriptData('indizi')[3]))
pc.give_item2(caccia_al_tesoro.GetScriptData('indizi')[4], 1)
end
end
end
when 27988.use with game.get_event_flag("EventoCacciaTesoro") == 1 and party.is_party() begin
if not party.is_leader() then
caccia_al_tesoro.TitleCacciaTesoro()
say("Mi dispiace ma solo il capogruppo")
say("puo' leggere la mappa!")
return
end
caccia_al_tesoro.TitleCacciaTesoro()
say("Questa mappa ti rivelera' la posizione")
say("del tesoro, sei sicuro di volerla sapere ?[ENTER]")
local siono = select ("Si", "No")
if siono == 1 then
caccia_al_tesoro.TitleCacciaTesoro()
--** Settare nelle impostazioni le coordinate della minimappa
say("Coordinate tesoro: 819, 315[ENTER]")
end
end
when 11505.take with item.get_vnum() == caccia_al_tesoro.GetScriptData('indizi')[4] and party.is_leader() begin
nome_leader = pc.get_name()
notice_all("Il gruppo di "..nome_leader.." ha scovato il tesoro!")
notice_all("L'evento Caccia al Tesoro e' terminato.")
game.set_event_flag("EventoCacciaTesoro", 0)
pc.change_money(caccia_al_tesoro.GetScriptData('yang')[1] * party.get_near_count())
pc.give_item2(caccia_al_tesoro.GetScriptData('tesoro')[1], party.get_near_count())
party.chat("Il capo gruppo possiede il tesoro!")
party.chat("Dividetevelo in parti uguali tra tutti i membri del gruppo.")
npc.purge()
item.remove()
end
end
endCod: Selectaţi tot
quest caccia_al_tesoro_evento begin
state start begin
when letter with pc.is_gm() begin
send_letter("Evento Caccia al Tesoro")
end
when button or info begin
say_title("Caccia al Tesoro")
say("")
say("Stato evento:")
if game.get_event_flag("EventoCacciaTesoro") == 0 then
say_red("Disattivo")
elseif game.get_event_flag("EventoCacciaTesoro") == 1 then
say_green("Attivo")
end
local scelta = select ("Attiva", "Disattiva", "Chiudi")
if scelta == 1 then
say_title("Caccia al Tesoro")
say("")
say_green("Evento attivato!")
notice_all("L'evento Caccia al Tesoro e' stato attivato.")
notice_all("Riloggate per visualizzare la quest iniziale!")
game.set_event_flag("EventoCacciaTesoro", 1)
elseif scelta == 2 then
say_title("Caccia al Tesoro")
say("")
say_red("Evento disattivato!")
notice_all("L'evento Caccia al Tesoro e' terminato.")
game.set_event_flag("EventoCacciaTesoro", 0)
end
end
end
end