clar de luna
ok iti multumesc astept raspunssanducatalin1 scrie: ↑29 Aug 2019, 19:56Ți-l fac eu mâine când ajung acasa și îți dau mesaj cu el, vezi ca ai nevoie de functia : npc.get_level()
[ Postat de pe iPhone ]![]()
poftim:
Dupa ce instalezi quest-ul il deschizi si il "administrezi" iti recomand sa bagi o rata intre 5-10 nu mai mare.
P.S: daca vrei sa adaugi alta mapa in care vrei sa aiba drop cufere clar de luna modifici o linie ca si asta:
acel m_ind inseamna map_index si 105 index-ul la mapa, iar "<= 99" este nivelul maxim la care se pot dropa cuferele clar de luna in mapele respective. sper ca ai inteles. Succes
Cod: Selectaţi tot
quest cufere_clar_de_luna begin
state start begin
when login begin
set_state(cufere_luna)
end
end
state cufere_luna begin
when letter with pc.is_gm() begin
send_letter("Administrare cufere clar de lunã ")
end
when info or button with pc.is_gm() begin
local s = select("Activare/Dezactivare Eveniment", "Setare drop")
if s == 1 then
say_title("Evenimet cufere clar de lunã:")
say("")
say("Ce doreºti sã faci ?")
local opt = select("Activare", "Dezactivare", "Nimic")
if opt == 1 then
game.set_event_flag("eveniment_cufere_clar_de_luna", 1)
--notice_all("Eveniment: Evenimentul cufere clar de lunã a început.")
syschat("Eveniment: Evenimentul cufere clar de lunã a început.")
elseif opt == 2 then
game.set_event_flag("eveniment_cufere_clar_de_luna", 0)
--notice_all("Eveniment: Evenimentul cufere clar de lunã s-a terminat.")
syschat("Eveniment: Evenimentul cufere clar de lunã s-a terminat.")
end
else
say_title("Evenimet cufere clar de lunã:")
say("")
say("Introdu ºansa de drop pentru,")
say("cufere clar de lunã între 1 ºi 100")
local sansa = tonumber(input())
if sansa < 0 or sansa > 100 then
say_title("Evenimet cufere clar de lunã:")
say("")
say("Valoarea introdusã nu este corectã.")
say("Poþi introduce o ºansã cuprinsã între 1 ºi 100")
else
say_title("Evenimet cufere clar de lunã:")
say("")
say("ªansa de a primi cufere clar de lunã,")
say("a fost setatã la "..sansa.."%.")
game.set_event_flag("sansa_cufere_clar_de_luna", sansa)
end
end
end
when kill begin
local m_ind = pc.get_map_index()
if npc.is_pc() then
else
if m_ind == 1 or m_ind == 21 or m_ind == 41 and pc.get_level() <= 15 then
if game.get_event_flag("eveniment_cufere_clar_de_luna") == 1 then
local sansa = number(1, 100)
local sansa_max = game.get_event_flag("sansa_cufere_clar_de_luna")
if sansa <= sansa_max then
pc.give_item2("50011", 1)
-- game.drop_item_with_ownership(50011, 1)
else
end
else
end
elseif m_ind == 3 or m_ind == 23 or m_ind == 43 and pc.get_level() <= 45 then
if game.get_event_flag("eveniment_cufere_clar_de_luna") == 1 then
local sansa = number(1, 100)
local sansa_max = game.get_event_flag("sansa_cufere_clar_de_luna")
if sansa <= sansa_max then
pc.give_item2("50011", 1)
-- game.drop_item_with_ownership(50011, 1)
else
end
else
end
elseif m_ind == 63 or m_ind == 64 and pc.get_level() <= 55 then
if game.get_event_flag("eveniment_cufere_clar_de_luna") == 1 then
local sansa = number(1, 100)
local sansa_max = game.get_event_flag("sansa_cufere_clar_de_luna")
if sansa <= sansa_max then
pc.give_item2("50011", 1)
-- game.drop_item_with_ownership(50011, 1)
else
end
else
end
elseif m_ind == 65 or m_ind == 61 and pc.get_level() <= 65 then
if game.get_event_flag("eveniment_cufere_clar_de_luna") == 1 then
local sansa = number(1, 100)
local sansa_max = game.get_event_flag("sansa_cufere_clar_de_luna")
if sansa <= sansa_max then
pc.give_item2("50011", 1)
-- game.drop_item_with_ownership(50011, 1)
else
end
else
end
elseif m_ind == 62 or m_ind == 71 or m_ind == 104 or m_ind == 67 and pc.get_level() <= 75 then
if game.get_event_flag("eveniment_cufere_clar_de_luna") == 1 then
local sansa = number(1, 100)
local sansa_max = game.get_event_flag("sansa_cufere_clar_de_luna")
if sansa <= sansa_max then
pc.give_item2("50011", 1)
-- game.drop_item_with_ownership(50011, 1)
else
end
else
end
elseif m_ind == 68 or m_ind == 72 or m_ind == 73 or m_ind == 66 and pc.get_level() <= 95 then
if game.get_event_flag("eveniment_cufere_clar_de_luna") == 1 then
local sansa = number(1, 100)
local sansa_max = game.get_event_flag("sansa_cufere_clar_de_luna")
if sansa <= sansa_max then
pc.give_item2("50011", 1)
-- game.drop_item_with_ownership(50011, 1)
else
end
else
end
elseif m_ind == 105 or m_ind == 70 or m_imd == 69 and pc.get_level() <= 99 then
if game.get_event_flag("eveniment_cufere_clar_de_luna") == 1 then
local sansa = number(1, 100)
local sansa_max = game.get_event_flag("sansa_cufere_clar_de_luna")
if sansa <= sansa_max then
pc.give_item2("50011", 1)
-- game.drop_item_with_ownership(50011, 1)
else
end
else
end
end
end
end
end
endP.S: daca vrei sa adaugi alta mapa in care vrei sa aiba drop cufere clar de luna modifici o linie ca si asta:
Cod: Selectaţi tot
elseif m_ind == 105 or m_ind == 70 or m_imd == 69 and pc.get_level() <= 99 thenquest cufere_clar_luna begin
state start begin
when login begin
if game.get_event_flag("mondlicht_event") == 1 then
notice("[Eveniment]Cuf?r Clar de Lun?: Activ")
end
end
when kill with not npc.is_pc() and game.get_event_flag("mondlicht_event") == 1 begin
if (npc.get_level() - 5 <= pc.get_level()) and (pc.get_level() <= npc.get_level() + 5) then
local rate = game.get_event_flag("mond_drop_chance")
local drop = number(1,100)
if drop <= rate then
game.drop_item_with_ownership(50011, 1)
end
end
end
when 9004.chat."<GM> Eveniment Cufere" with pc.is_gm() begin
if game.get_event_flag("mondlicht_event") == 1 then
say_title("Administrare Eveniment:")
say("")
say("[Eveniment]Cuf?r Clar de Lun?: Activ")
say("")
say_reward("Opreste Eventul?")
local s=select("Da", "Nu")
if s==1 then
say_title("Administrare Eveniment:")
say("")
say("Evenimentul a luat sfârsit .")
say("~ Pe data viitoare !")
game.set_event_flag("mondlicht_event", 0)
notice_all("[Eveniment]Cuf?r Clar de Lun?: Terminat")
elseif s==2 then
say_title("Administrare Eveniment:")
say("")
say("~ Pe curând !")
end
else
say_title("Administrare Eveniment:")
say("")
say("Cuf?r Clar De Lun? : ~ Închis ")
say("")
say_reward("Start Eveniment?")
local s=select("Da", "Nu")
if s==1 then
say_title("Administrare Eveniment:")
say("")
say("[Eveniment]Cuf?r Clar de Lun?: A inceput")
game.set_event_flag("mondlicht_event", 1)
notice_all("[Eveniment]Cuf?r Clar de Lun?: A inceput!")
elseif s==2 then
say_title("Administrare Eveniment:")
say("")
say("~ Pe curând !")
end
end
end
when 9004.chat."<GM> Dropul Cuferelor" with pc.is_gm() begin
say_title("Administrare Eveniment:")
say("")
say("Cat de mult s? fie dropul acestora ?")
say("")
say_reward("Între 1-100")
say("")
local new_chance = tonumber(input())
if new_chance < 0 or new_chance > 100 then
say_title("Administrare Eveniment:")
say("")
say("Introducere incorect? ~")
else
game.set_event_flag("mond_drop_chance", new_chance)
say_title("Administrare Eveniment:")
say("")
say("Dropul actual " ..new_chance.. " setat.")
say("~ Pe curând !")
end
end
end
end
state start begin
when login begin
if game.get_event_flag("mondlicht_event") == 1 then
notice("[Eveniment]Cuf?r Clar de Lun?: Activ")
end
end
when kill with not npc.is_pc() and game.get_event_flag("mondlicht_event") == 1 begin
if (npc.get_level() - 5 <= pc.get_level()) and (pc.get_level() <= npc.get_level() + 5) then
local rate = game.get_event_flag("mond_drop_chance")
local drop = number(1,100)
if drop <= rate then
game.drop_item_with_ownership(50011, 1)
end
end
end
when 9004.chat."<GM> Eveniment Cufere" with pc.is_gm() begin
if game.get_event_flag("mondlicht_event") == 1 then
say_title("Administrare Eveniment:")
say("")
say("[Eveniment]Cuf?r Clar de Lun?: Activ")
say("")
say_reward("Opreste Eventul?")
local s=select("Da", "Nu")
if s==1 then
say_title("Administrare Eveniment:")
say("")
say("Evenimentul a luat sfârsit .")
say("~ Pe data viitoare !")
game.set_event_flag("mondlicht_event", 0)
notice_all("[Eveniment]Cuf?r Clar de Lun?: Terminat")
elseif s==2 then
say_title("Administrare Eveniment:")
say("")
say("~ Pe curând !")
end
else
say_title("Administrare Eveniment:")
say("")
say("Cuf?r Clar De Lun? : ~ Închis ")
say("")
say_reward("Start Eveniment?")
local s=select("Da", "Nu")
if s==1 then
say_title("Administrare Eveniment:")
say("")
say("[Eveniment]Cuf?r Clar de Lun?: A inceput")
game.set_event_flag("mondlicht_event", 1)
notice_all("[Eveniment]Cuf?r Clar de Lun?: A inceput!")
elseif s==2 then
say_title("Administrare Eveniment:")
say("")
say("~ Pe curând !")
end
end
end
when 9004.chat."<GM> Dropul Cuferelor" with pc.is_gm() begin
say_title("Administrare Eveniment:")
say("")
say("Cat de mult s? fie dropul acestora ?")
say("")
say_reward("Între 1-100")
say("")
local new_chance = tonumber(input())
if new_chance < 0 or new_chance > 100 then
say_title("Administrare Eveniment:")
say("")
say("Introducere incorect? ~")
else
game.set_event_flag("mond_drop_chance", new_chance)
say_title("Administrare Eveniment:")
say("")
say("Dropul actual " ..new_chance.. " setat.")
say("~ Pe curând !")
end
end
end
end
Subiect inactiv ! Arhivat !
-
- Informaţie
-
Cine este conectat
Utilizatori ce ce navighează pe acest forum: Google [Bot] și 18 vizitatori




