Intrebare Quest Razboi Regate

Totalitatea subiectelor care nu respectă regulamentul impus in sectiunea "Probleme şi Întrebări" vor fi stocate aici.
Avatar utilizator
DragonA7X
Nivel 3

Nivel 3
Mesaje: 434
Membru din: 06 Apr 2017, 10:41
Aprecieri: 100  
Mulţumiri: 3  
Medalii

*Problemă/Întrebare: Am incercat 2 variante de questuri pt razboi regate, niciunul functionabil.
Tipologie server: PvP PvM
*Resursă folosită:
*ServerFiles utilizat:Happiness
*Syserr:
Poză:
*Detalii suplimentare:Ma intrebam daca poate si vrea cineva sa creeze un quest razboi al regatelor care s-ar desfasura in felul urmator:
Toti jucatorii teleportati intr-o harta aleasa si la inceperea evenimentului, fiecare jucator ucis sa fie scos din harta pana cand ramane un singur jucator care sa reprezinte regatul sau. (Daca asa ar fi functionat celelalte questuri si m-am repetat, imi pare rau.)

[ Postat de pe Android ] Imagine
Avatar utilizator
Ene
Nivel 8

Nivel 8
Mesaje: 1659
Membru din: 09 Sep 2016, 01:00
Server: Clasic
Regat: Jinno
Aprecieri: 274  
Mulţumiri: 603  
  Rezolvări prob.: 2
Discord: Copiază ID
Medalii

poi ce nu functioneaza nu poti instala questu primesti eroare sau ce?

=============
dacă răspunsul meu te-a ajutat nu uita butonul LIKE



Imagine
Afișează semnătura
Avatar utilizator
DragonA7X
Nivel 3

Nivel 3
Mesaje: 434
Membru din: 06 Apr 2017, 10:41
Aprecieri: 100  
Mulţumiri: 3  
Medalii

Imi lipsesc functii, cu toate ca eu le-am adaugat in lista, dar nu si detaliile functiilor. Diseara am sa revin cu un edit despre functiile lipsa.
In legatura cu questul, nu prea am inteles cum functioneaza si cum se desfasoara. Daca ar dori cineva sa imi explice as fi recunoscator.

Edit:

Cod: Selectaţi tot

quest forked_road begin
    state start begin
        when login with forked.isforkedmapindex( pc.get_map_index() ) == true begin
            if game.get_event_flag("threeway_war") == 0 then
                warp_to_village()
            else
                local noticeShow = false

                if forked.is_registered_user() == false then
                    forked.register_user()
                    forked.setdeadcount()
                    pc.remove_item(50089)
                    noticeShow = true
                end

                if forked.getdeadcount() <= 0 then
                    warp_to_village()
                elseif true == noticeShow then
                    if forked.issungzimapindex( pc.get_map_index() ) == true then
                        say( locale.forked_condition2 )
                        say( locale.NOTICE_COLOR..locale.forked_rule_sungzi )
                    else
                        say( locale.forked_condition )
                        say( locale.NOTICE_COLOR..locale.forked_rule )
                        say_item_vnum(50089)
                                end
                        end
                end
        end
        when 11001.chat.locale.forked_man_chat or 11003.chat.locale.forked_man_chat or 11005.chat.locale.forked_man_chat begin
            if game.get_event_flag("threeway_war") == 0 then
                        say(locale.forked_man_say_cant)
            else
                        say(locale.forked_man_say)
                        local s = select(locale.forked_enter,locale.forked_no_enter)
                        if s == 1 then
                    local limit = math.min(game.get_event_flag("threeway_war_level"), 30)

                    if pc.get_level() < limit then
                        say("In order to join three way war, your level must be over "..limit.."")    
                        return
                    end

                    local canJoin = false

                    if (pc.getempire() == 1 and game.get_event_flag("threeway_war_open_gate1" ) != 0) or
                        (pc.getempire() == 2 and game.get_event_flag("threeway_war_open_gate2" ) != 0) or
                        (pc.getempire() == 3 and game.get_event_flag("threeway_war_open_gate3" ) != 0) then
                        canJoin = true
                    else
                        say( locale.forked_man_say_you_cant2 )
                    end

                    if true == canJoin then
                        pc.warp( forked.get_pass_start_pos() )
                    else
                        say("You cannot join after gate to holy land is opened!")
                        say("Pray for our kingdom to conquer Holy land !!")
                        end
                        end
                end
        end
        
        when 1306.kill with forked.isforkedmapindex(pc.get_map_index()) == true begin
            game.drop_item(50089, 1)
        ----"12345678901234567890123456789012345678901234567890"|
                say("If the Stone of Hermetic Seal is opened with the")
                say("Stone of Dismantling ,All users will be")
                say("brought onto the street.")
                say("Nobody will be able to go back to the holy ground.")
                say("")
        end

        when 1902.kill with forked.issungzimapindex(pc.get_map_index()) == true begin
            if 0 == game.get_event_flag("threeway_war") then
                return
            end

            local remainBossCount = game.get_event_flag("threeway_war_boss_count") - 1

            game.set_event_flag("threeway_war_boss_count", remainBossCount)

            if remainBossCount > 1 then
                return
        end

            game.set_event_flag("threeway_war", 0)
            local nation = { "Pandemonia","Asmodia","Elgoria" }
            notice_all("The winner of three way war is "..nation[pc.getempire()])

            warp_all_to_village(forked.getsungzimapindex(), 30)
            warp_all_to_village(forked.getpassmapindexbyempire(1), 30)
            warp_all_to_village(forked.getpassmapindexbyempire(2), 30)
            warp_all_to_village(forked.getpassmapindexbyempire(3), 30)
        end

        when 20081.take with item.vnum == 50089 begin
            say_in_map(pc.get_map_index(), locale.forked_open_gate)
                npc.purge()
                item.remove()

                forked.initkillcount()

                if pc.getempire() == 1 then
                game.set_event_flag("threeway_war_open_gate1", 0)
                        notice_all("Pandemonia-empire enters the holy ground." )
                elseif pc.getempire() == 2 then
                game.set_event_flag("threeway_war_open_gate2", 0)
                    notice_all("Asmodia-empire enters the holy ground." )
                elseif pc.getempire() == 3 then
                game.set_event_flag("threeway_war_open_gate3", 0)
                        notice_all("Elgoria-empire enters the holy ground." )
                else
                        say(locale.forked_man_say_you_cant2 )
                end

            local x, y = forked.get_sungzi_start_pos()
            forked.warp_all_in_map( pc.get_map_index(), forked.getsungzimapindex(), x, y, 10)
        end

        when 11001.chat."GM; Three Empires Street Fighting?" or 11003.chat."GM; Three Empires Street Fighting?" or 11005.chat."GM: Three Empires Street Fighting?" with pc.is_gm() begin
           local s = select( "Start the Empires Street Fighting" , "Enter the Empires Street Fighting" );

            if s == 1 then
                -- ±âÁ¸¿¡ ÀÖ´ø ¸÷À» ¸&#287;µÎ Á×ÀδÙ
                forked.purge_all_monsters()

                -- ÃʱâÈ*
                forked.initforked()

                -- ½ÃÀÛ Ç÷¡±× ¼³Á¤
                game.set_event_flag("threeway_war", 1)

                -- »ï°Å¸® ÀüÅõ ų Á¦ÇÑ ¼³Á¤
                game.set_event_flag("threeway_war_dead_count", 25)    -- ºÎȰ °¡´É ¼ö

                if true == is_test_server() then
                    game.set_event_flag("threeway_war_kill_count", 5)    -- PC ¸î ¸í Á×ÀÌ¸é ¼øÀ§ ¸Ô¿© Å»¶ô½Ãų °ÍÀΰ¡
                else
                    game.set_event_flag("threeway_war_kill_count", 250)    -- PC ¸î ¸í Á×ÀÌ¸é ¼øÀ§ ¸Ô¿© Å»¶ô½Ãų °ÍÀΰ¡
                end

                game.set_event_flag("threeway_war_boss_count", 5)    -- ÃÖÁ¾ º¸½º ¸î ¸¶¸® ¼ÒȯÇÒ °ÍÀΰ¡

                -- »ï°Å¸® ÀÔ±¸ ¿*°í/´&#304;±â ¼³Á¤
                game.set_event_flag("threeway_war_open_gate1", 1)
                game.set_event_flag("threeway_war_open_gate2", 1)
                game.set_event_flag("threeway_war_open_gate3", 1)
                say("Three way war has begun.")
                say("")

                wait()

                -- ¸ó½ºÅÍ »õ·Ó°Ô ¸®Á¨
                regen_in_map( forked.getpassmapindexbyempire(1), forked.getpasspathbyempire(1) .."regen.txt" )
                regen_in_map( forked.getpassmapindexbyempire(1), forked.getpasspathbyempire(1) .."npc.txt" )
                regen_in_map( forked.getpassmapindexbyempire(2), forked.getpasspathbyempire(2) .."regen.txt" )
                regen_in_map( forked.getpassmapindexbyempire(2), forked.getpasspathbyempire(2) .."npc.txt" )
                regen_in_map( forked.getpassmapindexbyempire(3), forked.getpasspathbyempire(3) .."regen.txt" )
                regen_in_map( forked.getpassmapindexbyempire(3), forked.getpasspathbyempire(3) .."npc.txt" )

                notice_all("Starting three way war.")
                notice_all("Talk to the town guard to join three way war.")

            elseif 2 == s then
                game.set_event_flag("threeway_war", 0)

                notice_all("Ending three way war")
                forked.purge_all_monsters()

                warp_all_to_village(forked.getsungzimapindex(), 1)
                warp_all_to_village(forked.getpassmapindexbyempire(1), 1)
                warp_all_to_village(forked.getpassmapindexbyempire(2), 1)
                warp_all_to_village(forked.getpassmapindexbyempire(3), 1)
                end
        end
        end
        end
Este questul pe care il folosesc si astea sunt functiile de care am nevoie:

forked.getpassstartposx
forked.getpassstartposy
forked.getsungziposx
forked.getsungziposy
forked.initmobkillcount

[ Postat de pe Android ] Imagine
Avatar utilizator
DragonA7X
Nivel 3

Nivel 3
Mesaje: 434
Membru din: 06 Apr 2017, 10:41
Aprecieri: 100  
Mulţumiri: 3  
Medalii

Up

[ Postat de pe Android ] Imagine
Avatar utilizator
DragonA7X
Nivel 3

Nivel 3
Mesaje: 434
Membru din: 06 Apr 2017, 10:41
Aprecieri: 100  
Mulţumiri: 3  
Medalii

Up

[ Postat de pe Android ] Imagine
Avatar utilizator
DragonA7X
Nivel 3

Nivel 3
Mesaje: 434
Membru din: 06 Apr 2017, 10:41
Aprecieri: 100  
Mulţumiri: 3  
Medalii

Up

Chiar nu are nimeni un quest de razboi intre regate functional?

[ Postat de pe Android ] Imagine
Avatar utilizator
Kazuhiri
Nivel 9

Nivel 9
Mesaje: 2088
Membru din: 26 Mar 2017, 19:14
Server: Demetris
Regat: Shinsoo
Aprecieri: 396  
Mulţumiri: 3227  
  Rezolvări prob.: 2
Discord: Copiază ID
Medalii

DragonA7X scrie: ↑22 Noi 2019, 15:27 Up

Chiar nu are nimeni un quest de razboi intre regate functional?

[ Postat de pe Android ] Imagine
Ia legătura cu braxy sau RaffaeL, ei se pricep în lua

[ Postat de pe Android ] Imagine
Demetris2 Imagine
Afișează semnătura
Avatar utilizator
[RaffaeL]
Software Developer

Software Developer
Mesaje: 3223
Membru din: 19 Mar 2016, 12:58
Server: ...
Aprecieri: 15  
Mulţumiri: 2502  
  Rezolvări prob.: 2
Discord: Copiază ID
 Contact:
Medalii

DragonA7X scrie: ↑19 Noi 2019, 09:06 Imi lipsesc functii, cu toate ca eu le-am adaugat in lista, dar nu si detaliile functiilor. Diseara am sa revin cu un edit despre functiile lipsa.
In legatura cu questul, nu prea am inteles cum functioneaza si cum se desfasoara. Daca ar dori cineva sa imi explice as fi recunoscator.

Edit:

Cod: Selectaţi tot

quest forked_road begin
    state start begin
        when login with forked.isforkedmapindex( pc.get_map_index() ) == true begin
            if game.get_event_flag("threeway_war") == 0 then
                warp_to_village()
            else
                local noticeShow = false

                if forked.is_registered_user() == false then
                    forked.register_user()
                    forked.setdeadcount()
                    pc.remove_item(50089)
                    noticeShow = true
                end

                if forked.getdeadcount() <= 0 then
                    warp_to_village()
                elseif true == noticeShow then
                    if forked.issungzimapindex( pc.get_map_index() ) == true then
                        say( locale.forked_condition2 )
                        say( locale.NOTICE_COLOR..locale.forked_rule_sungzi )
                    else
                        say( locale.forked_condition )
                        say( locale.NOTICE_COLOR..locale.forked_rule )
                        say_item_vnum(50089)
                                end
                        end
                end
        end
        when 11001.chat.locale.forked_man_chat or 11003.chat.locale.forked_man_chat or 11005.chat.locale.forked_man_chat begin
            if game.get_event_flag("threeway_war") == 0 then
                        say(locale.forked_man_say_cant)
            else
                        say(locale.forked_man_say)
                        local s = select(locale.forked_enter,locale.forked_no_enter)
                        if s == 1 then
                    local limit = math.min(game.get_event_flag("threeway_war_level"), 30)

                    if pc.get_level() < limit then
                        say("In order to join three way war, your level must be over "..limit.."")    
                        return
                    end

                    local canJoin = false

                    if (pc.getempire() == 1 and game.get_event_flag("threeway_war_open_gate1" ) != 0) or
                        (pc.getempire() == 2 and game.get_event_flag("threeway_war_open_gate2" ) != 0) or
                        (pc.getempire() == 3 and game.get_event_flag("threeway_war_open_gate3" ) != 0) then
                        canJoin = true
                    else
                        say( locale.forked_man_say_you_cant2 )
                    end

                    if true == canJoin then
                        pc.warp( forked.get_pass_start_pos() )
                    else
                        say("You cannot join after gate to holy land is opened!")
                        say("Pray for our kingdom to conquer Holy land !!")
                        end
                        end
                end
        end
        
        when 1306.kill with forked.isforkedmapindex(pc.get_map_index()) == true begin
            game.drop_item(50089, 1)
        ----"12345678901234567890123456789012345678901234567890"|
                say("If the Stone of Hermetic Seal is opened with the")
                say("Stone of Dismantling ,All users will be")
                say("brought onto the street.")
                say("Nobody will be able to go back to the holy ground.")
                say("")
        end

        when 1902.kill with forked.issungzimapindex(pc.get_map_index()) == true begin
            if 0 == game.get_event_flag("threeway_war") then
                return
            end

            local remainBossCount = game.get_event_flag("threeway_war_boss_count") - 1

            game.set_event_flag("threeway_war_boss_count", remainBossCount)

            if remainBossCount > 1 then
                return
        end

            game.set_event_flag("threeway_war", 0)
            local nation = { "Pandemonia","Asmodia","Elgoria" }
            notice_all("The winner of three way war is "..nation[pc.getempire()])

            warp_all_to_village(forked.getsungzimapindex(), 30)
            warp_all_to_village(forked.getpassmapindexbyempire(1), 30)
            warp_all_to_village(forked.getpassmapindexbyempire(2), 30)
            warp_all_to_village(forked.getpassmapindexbyempire(3), 30)
        end

        when 20081.take with item.vnum == 50089 begin
            say_in_map(pc.get_map_index(), locale.forked_open_gate)
                npc.purge()
                item.remove()

                forked.initkillcount()

                if pc.getempire() == 1 then
                game.set_event_flag("threeway_war_open_gate1", 0)
                        notice_all("Pandemonia-empire enters the holy ground." )
                elseif pc.getempire() == 2 then
                game.set_event_flag("threeway_war_open_gate2", 0)
                    notice_all("Asmodia-empire enters the holy ground." )
                elseif pc.getempire() == 3 then
                game.set_event_flag("threeway_war_open_gate3", 0)
                        notice_all("Elgoria-empire enters the holy ground." )
                else
                        say(locale.forked_man_say_you_cant2 )
                end

            local x, y = forked.get_sungzi_start_pos()
            forked.warp_all_in_map( pc.get_map_index(), forked.getsungzimapindex(), x, y, 10)
        end

        when 11001.chat."GM; Three Empires Street Fighting?" or 11003.chat."GM; Three Empires Street Fighting?" or 11005.chat."GM: Three Empires Street Fighting?" with pc.is_gm() begin
           local s = select( "Start the Empires Street Fighting" , "Enter the Empires Street Fighting" );

            if s == 1 then
                -- ±âÁ¸¿¡ ÀÖ´ø ¸÷À» ¸&#287;µÎ Á×ÀδÙ
                forked.purge_all_monsters()

                -- ÃʱâÈ*
                forked.initforked()

                -- ½ÃÀÛ Ç÷¡±× ¼³Á¤
                game.set_event_flag("threeway_war", 1)

                -- »ï°Å¸® ÀüÅõ ų Á¦ÇÑ ¼³Á¤
                game.set_event_flag("threeway_war_dead_count", 25)    -- ºÎȰ °¡´É ¼ö

                if true == is_test_server() then
                    game.set_event_flag("threeway_war_kill_count", 5)    -- PC ¸î ¸í Á×ÀÌ¸é ¼øÀ§ ¸Ô¿© Å»¶ô½Ãų °ÍÀΰ¡
                else
                    game.set_event_flag("threeway_war_kill_count", 250)    -- PC ¸î ¸í Á×ÀÌ¸é ¼øÀ§ ¸Ô¿© Å»¶ô½Ãų °ÍÀΰ¡
                end

                game.set_event_flag("threeway_war_boss_count", 5)    -- ÃÖÁ¾ º¸½º ¸î ¸¶¸® ¼ÒȯÇÒ °ÍÀΰ¡

                -- »ï°Å¸® ÀÔ±¸ ¿*°í/´&#304;±â ¼³Á¤
                game.set_event_flag("threeway_war_open_gate1", 1)
                game.set_event_flag("threeway_war_open_gate2", 1)
                game.set_event_flag("threeway_war_open_gate3", 1)
                say("Three way war has begun.")
                say("")

                wait()

                -- ¸ó½ºÅÍ »õ·Ó°Ô ¸®Á¨
                regen_in_map( forked.getpassmapindexbyempire(1), forked.getpasspathbyempire(1) .."regen.txt" )
                regen_in_map( forked.getpassmapindexbyempire(1), forked.getpasspathbyempire(1) .."npc.txt" )
                regen_in_map( forked.getpassmapindexbyempire(2), forked.getpasspathbyempire(2) .."regen.txt" )
                regen_in_map( forked.getpassmapindexbyempire(2), forked.getpasspathbyempire(2) .."npc.txt" )
                regen_in_map( forked.getpassmapindexbyempire(3), forked.getpasspathbyempire(3) .."regen.txt" )
                regen_in_map( forked.getpassmapindexbyempire(3), forked.getpasspathbyempire(3) .."npc.txt" )

                notice_all("Starting three way war.")
                notice_all("Talk to the town guard to join three way war.")

            elseif 2 == s then
                game.set_event_flag("threeway_war", 0)

                notice_all("Ending three way war")
                forked.purge_all_monsters()

                warp_all_to_village(forked.getsungzimapindex(), 1)
                warp_all_to_village(forked.getpassmapindexbyempire(1), 1)
                warp_all_to_village(forked.getpassmapindexbyempire(2), 1)
                warp_all_to_village(forked.getpassmapindexbyempire(3), 1)
                end
        end
        end
        end
Este questul pe care il folosesc si astea sunt functiile de care am nevoie:

forked.getpassstartposx
forked.getpassstartposy
forked.getsungziposx
forked.getsungziposy
forked.initmobkillcount

[ Postat de pe Android ] Imagine
Questul pentru razboiul regatelor, nu necesita functii suplimentare in lua, deoarece toate functiile sunt definite deja in sursa game(questlua_forked.cpp).
Tot ce trebuie adaugat(daca nu exista deja), este fisierul "forkedmapindex.txt" datorita functiei
bool CThreeWayWar::LoadSetting(const char* szFileName)
{
	char szPath[1024];
	snprintf( szPath, sizeof(szPath), "%s/%s", LocaleService_GetBasePath().c_str(), szFileName);

	FILE* pf = fopen( szPath, "r" );

	if (NULL == pf)
	{
		sys_err("[INIT_FORKED] Do not open file (%s)", szPath );
		return false;
	}
care incarca setarile de acolo.
Prin urmare, in cazul in care nu il ai deja, creaza un fisier text cu numele mentionat mai sus, in usr/[...]/romania(sau ce ai tu), cu urmatorul continut(copy-paste din fisierul original)

Cod: Selectaţi tot

#���� ���� ���� ����
#���� �߰� ���
#�ش�:   ��       �ż�������(xy) õ��������(xy) ���뱹����(xy)
#sungzi: mapindex startposX startposY startposX startposY startposX startposY
#      �� �ż�������(xy) �� õ��������(xy) �� ���뱹����(xy)
#pass: mapindex1 startposX startposY mapindex2 startposX startposY mapindex3 startposX startposY
sungzi: 114 948100 36500 937100 22000 953200 18500 metin2_map_sungzi 1902
#pass: 115 1032200 125900 metin2_map_sungzi_flame_pass01 116 1032200 228300 metin2_map_sungzi_flame_pass02 117 1032200 330700 metin2_map_sungzi_flame_pass03
pass: 118 1150400 182400 metin2_map_sungzi_flame_hill_01 119 1150400 284800 metin2_map_sungzi_flame_hill_02 120 1150400 387200 metin2_map_sungzi_flame_hill_03 
sungzi: 121 1188800 17500 1212400 19300 1195800 44900 metin2_map_sungzi_snow 1902
pass: 122 1200100 167900 metin2_map_sungzi_snow_pass01 123 1200100 270300 metin2_map_sungzi_snow_pass02 124 1200100 372700 metin2_map_sungzi_snow_pass03
sungzi: 125 1270000 56400 1249700 22200 1283700 20800 metin2_map_sungzi_desert_01 1902
pass: 126 1242400 142100 metin2_map_sungzi_desert_hill_01 127 1242400 244500 metin2_map_sungzi_desert_hill_02 128 1242400 346900 metin2_map_sungzi_desert_hill_03
Pentru acest mesaj, [RaffaeL] for the post:
DragonA7X
Imagine
Imagine
https://www.youtube.com/watch?v=GhYkCIETEto
Do everything, if you know what you're doing, else... Imagine
Ma gasesti si aici: Discord https://discord.gg/5J5GnyZVSR
Afișează semnătura
Avatar utilizator
DragonA7X
Nivel 3

Nivel 3
Mesaje: 434
Membru din: 06 Apr 2017, 10:41
Aprecieri: 100  
Mulţumiri: 3  
Medalii

Multumesc, am sa incerc mai tarziu sa vad ce pot rezolva. In caz contrar renunt la quest

[ Postat de pe Android ] Imagine
Avatar utilizator
w00dy
Nivel 2

Nivel 2
Mesaje: 195
Membru din: 14 Aug 2016, 00:15
Server: n-am
Regat: Chunjo
Aprecieri: 150  
Mulţumiri: 3  
  Rezolvări prob.: 3
Medalii

DragonA7X scrie: ↑24 Noi 2019, 15:39 Multumesc, am sa incerc mai tarziu sa vad ce pot rezolva. In caz contrar renunt la quest

[ Postat de pe Android ] Imagine
Ti a mers questul? As vrea sa l bag si eu, si as vrea sa stiu daca merge sa nu pierd timp degeaba. Mersi

[ Postat de pe iPhone ] Imagine
Închis

Înapoi la “Arhivă Probleme şi Întrebări”

  • Informaţie
  • Cine este conectat

    Utilizatori ce ce navighează pe acest forum: Bing [Bot] și 170 vizitatori