Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- quest beransystem begin
- state start begin
- when 30122.click with pc.get_level() >= 90 begin
- if beranSystem.talk[pc.get_channel_id()] == 0 then
- beranSystem.talk[pc.get_channel_id()] = 1
- server_timer("npcTalk"..pc.get_channel_id(),90)
- if beranSystem.channel[pc.get_channel_id()] == 1 then
- say_title("Spirito Antico")
- say("Qualcun'altro sta gia' affrontando il Drago Beran")
- say("Potrai raggiungerlo inserendo la password!")
- local password = tonumber(input())
- if password == beranSystem.password[pc.get_channel_id()] then
- if pc.count_item(30179) == 0 then
- beranSystem.talk[pc.get_channel_id()] = 0
- clear_server_timer("npcTalk"..pc.get_channel_id())
- syschat("Ti serve una Chiave a Spirale")
- return
- end
- pc.remove_item(30179, 1)
- timer("warpStanza", 1)
- end
- else
- local s = select("Affronta il Drago Beran", "Chiudi")
- if s == 2 then
- beranSystem.talk[pc.get_channel_id()] = 0
- clear_server_timer("npcTalk"..pc.get_channel_id())
- return
- end
- say ("Sei pronto ad affrontare il temibile Beran?")
- say ("Ti occorre 1 Chiave a Spirale.")
- say ("Ogni membro del tuo gruppo dovra'")
- say ("avere una Chiave a Spirale per poter entrare.")
- say ("Avrai 30 minuti di tempo per sconfiggere il Drago.")
- say_item("Chiave a Spirale x1", "30179", "")
- local p = select("Si, sono pronto", "Chiudi")
- if p == 2 then
- beranSystem.talk[pc.get_channel_id()] = 0
- clear_server_timer("npcTalk"..pc.get_channel_id())
- return
- end
- if pc.count_item(30179) == 0 then
- beranSystem.talk[pc.get_channel_id()] = 0
- clear_server_timer("npcTalk"..pc.get_channel_id())
- syschat("Ti serve una Chiave a Spirale")
- return
- end
- say("Scegli la password!")
- local pwd = input()
- if not tonumber(pwd) then
- beranSystem.talk[pc.get_channel_id()] = 0
- clear_server_timer("npcTalk"..pc.get_channel_id())
- say("Inserisci Password di 9 cifre")
- return
- elseif tonumber(pwd) < 100000000 or tonumber(pwd) > 999999999 then
- say("Inserisci Password di 9 cifre")
- say("")
- beranSystem.talk[pc.get_channel_id()] = 0
- clear_server_timer("npcTalk"..pc.get_channel_id())
- return
- else
- if beranSystem.password[pc.get_channel_id()] == "" then
- pc.remove_item(30179, 1)
- beranSystem.password[pc.get_channel_id()] = tonumber(pwd)
- beranSystem.channel[pc.get_channel_id()] = 1
- beranSystem.entry[pc.get_channel_id()] = get_time()
- beranSystem.exit[pc.get_channel_id()] = get_time() + beranSystem.time[pc.get_channel_id()]
- server_timer("forceReload"..pc.get_channel_id(),beranSystem.time[pc.get_channel_id()]+120)
- timer("warpStanza", 1)
- else
- syschat("La Stanza di Cristallo e' gia occupata")
- end
- end
- end
- clear_server_timer("npcTalk"..pc.get_channel_id())
- beranSystem.talk[pc.get_channel_id()] = 0
- else
- say_title("Spirito Antico")
- say("")
- say("Un altro guerriero sta gia parlando con me!")
- say("Aspetta il tuo Turno !!")
- end
- end
- when forceReload1.server_timer begin
- beranSystem.reload(1)
- end
- when forceReload2.server_timer begin
- beranSystem.reload(2)
- end
- when npcTalk1.server_timer begin
- beranSystem.talk[1] = 0
- end
- when npcTalk2.server_timer begin
- beranSystem.talk[2] = 0
- end
- when warpStanza.timer begin
- beranSystem.player[pc.get_channel_id()][beranSystem.count[pc.get_channel_id()]] = pc.get_name()
- beranSystem.count[pc.get_channel_id()] = beranSystem.count[pc.get_channel_id()]+1
- if beranSystem.exit[pc.get_channel_id()] - get_time() < 21 then
- return
- end
- pc.warp(819200,1049600)
- end
- when login with pc.get_map_index() == 2 and pc.get_local_x() <= 250 and pc.get_local_y() <= 220 begin
- local name = pc.get_name()
- for i=0,beranSystem.count[pc.get_channel_id()],1 do
- if beranSystem.player[pc.get_channel_id()][i] == name then
- timer("exit".. pc.get_channel_id(),beranSystem.exit[pc.get_channel_id()] - get_time())
- return
- end
- end
- pc.warp(241600,1275200)
- end
- when logout with pc.get_map_index() == 2 and pc.get_local_x() <= 250 and pc.get_local_y() <= 220 begin
- for i=0,beranSystem.count[pc.get_channel_id()],1 do
- if beranSystem.player[pc.get_channel_id()][i] == name then
- beranSystem.player[pc.get_channel_id()][i] = ""
- return
- end
- end
- end
- when 2599.kill with pc.get_map_index() == 2 and pc.get_local_x()<= 250 and pc.get_local_y() <= 220 begin
- notice_all("Il Drago Beran e' stato ucciso!")
- timer("exit".. pc.get_channel_id(),20)
- server_timer("logOutSystem"..pc.get_channel_id(),30)
- end
- when logOutSystem1.server_timer begin
- clear_server_timer("forceReload1")
- beranSystem.reload(1)
- end
- when logOutSystem2.server_timer begin
- clear_server_timer("forceReload2")
- beranSystem.reload(2)
- end
- when exit1.timer with pc.get_map_index() == 2 and pc.get_local_x()<= 250 and pc.get_local_y() <= 220 begin
- if beranSystem.callReload[pc.get_channel_id()] == 1 then
- return
- end
- beranSystem.logOutSystem[pc.get_channel_id()] = 1
- beranSystem.callReload[pc.get_channel_id()] = 1
- clear_server_timer("forceReload1")
- beranSystem.exitDungeon(1)
- end
- when exit2.timer with pc.get_map_index() == 2 and pc.get_local_x()<= 250 and pc.get_local_y() <= 220 begin
- if beranSystem.callReload[pc.get_channel_id()] == 1 then
- return
- end
- beranSystem.logOutSystem[pc.get_channel_id()] = 1
- beranSystem.callReload[pc.get_channel_id()] = 1
- clear_server_timer("forceReload2")
- beranSystem.exitDungeon(2)
- end
- ----------**********
- ----------********** Entrata minimo 90
- ----------**********
- when 30122.click with pc.get_level() < 90 begin
- say_title("Spirito Antico")
- say("")
- say("Devi raggiungere il livello 90")
- say("Prima di poter entrare nella Stanza di Cristallo.")
- say("Torna quando sarai piu' forte.")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement