Register for your free account! | Forgot your password?

Go Back   elitepvpers > Popular Games > Metin2 > Metin2 Private Server
You last visited: Today at 15:57

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



[Server] Problem guild_war_bet.quest

Discussion on [Server] Problem guild_war_bet.quest within the Metin2 Private Server forum part of the Metin2 category.

Reply
 
Old   #1
 
rapperclau's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 66
Received Thanks: 2
Exclamation [Server] Problem guild_war_bet.quest

Hi As he says and in the title I have a problem with this quest:
P.S: I have to mention that I have not changed at all, this is original quest SG
2 Hours torturing myself and do not give him the end.....
Sorry for my bad english...

Code:
quest guild_war_bet begin 
        state start begin
                when
                        guild_war_observer1.chat."Guild War-Bet" or
                        guild_war_observer2.chat."Guild War-Bet" or
                        guild_war_observer3.chat."Guild War-Bet" begin
                        guild.get_reserve_war_table returns
                        {     1        2               3           4
                        { id, presume_winner, presume_loser, handicap },
                        }
                        local info_counter = pc.getqf("Info")

                        if info_counter < 3 then
                                say_title("The Guild War-Bet.")
                                say("")
                                ----"12345678901234567890123456789012345678901234567890"|
                                say("Buy a Betting Lot for your empire.")
                                say("1 At every guild war, there will be an announcement")
                                say("of the possible projection for the victorious guild")
                                say("")
                                say("2. You can buy a Betting Lot, and give your tip")
                                say("which guild will win and if the guild reaches the ")
                                say("announced projection or not.")
                                say("")
                                say("3. The possibilities for choosing a bet are")
                                say("controlled by the Betting Booth and when the war")
				say("ends you are informed if you have won or lost.")
                                say("* 10% of the profit is paid to the empire.")
                                pc.setqf("Info", info_counter + 1)
                                wait()
                        end

                        local g = guild.get_reserve_war_table()
                        local gname_table = {}

                        table.foreachi(g,
                        function(n, p)
                                gname_table[n] = guild.get_name(p[2]).." against "..guild.get_name(p[3])
                        end)

                        if table.getn(g) == 0 then
                                -- no currently war
                                say_title("Battle Administrator:")
                                say("")
                                say("There is no guild war in the moment, you could bet on.")
                                say("")
                        else
                                gname_table[table.getn(g)+1] = "Abbort"
                                say_title("Battle Administrator:")
                                say("")
				----"12345678901234567890123456789012345678901234567890"|
                                say("For which guild war you want to buy a Betting Lot?")

                                local s = select_table(gname_table)

                                if s != table.getn(gname_table) then
                                        if guild.is_bet(g[s][1]) then
                                                say_title("Battle Administrator:")
                                                say("")
                                                say("On my list stands, you already have a Betting Lot")
                                                say("for this guild war.")
                                                say("You can only buy one Lot per war.")
                                        else
                                                local name1 = guild.get_name(g[s][2])
                                                local name2 = guild.get_name(g[s][3])

                                                say_title("Battle Administrator:")
                                                say("")
                                                say("The guild with the name")
                                                say(name1.." "..name2.."with "..g[s][4].."seems to be victorious.")
                                                say("On which guild you want to bet?")
                                                say(name1.."It is to be foreseen, that guild"..name2..""..g[s][4].."will be victorious.[ENTER][ENTER]On which guild you want to bet?")
                                                local guild_s = select(name1, name2, "Abbort")

                                                if guild_s != 3 then
                                                        local bet_guild = g[s][guild_s+1]

                                                        say_title("Battle Administrator:")
                                                        say("")
                                                        say("Hmm ... A good choice! Waht is you option?")

                                                        local price_button_table = {}

                                                        table.foreachi(guild_war_bet_price_table,
                                                        function(n, p)
                                                                price_button_table[n] = p.."Yang"
                                                        end)

                                                        price_button_table[table.getn(price_button_table)+1] =  "Abbort"

                                                        local price_idx = select_table(price_button_table)

                                                        if price_idx != table.getn(price_button_table) then -- ? ??? ?? ??? ???
                                                                if pc.gold < guild_war_bet_price_table[price_idx] then
                                                                        say_title("Battle Administrator:")
                                                                        say("")
                                                                        say("You do not have enough Yang!")
                                                                        say("")
                                                                else
                                                                        say_title("Battle Administrator:")
                                                                        say("")
                                                                        pc.changegold(-guild_war_bet_price_table[price_idx])
                                                                        guild.war_bet(g[s][1], bet_guild, guild_war_bet_price_table[price_idx])
                                                                        say("Everything is ready. If you have chosen right,")
                                                                        say("The Yang will be paid and given to you, ")
                                                                        say("when the guild war is over. Good luck!")
                                                                end
                                                        end
                                                end -- if guild_s != 3
                                        end -- if guild.is_bet(g[s][1])
                                end -- if s != table.getn(gname_table)
                        end
                end
        end
end

this is installation error

PHP Code:
guild_war_bet.quest:113:syntax error : [string "start"]:1: `=' expected near `returns'
Abort (core dumped) 
rapperclau is offline  
Old 09/03/2013, 15:29   #2
 
.Inya's Avatar
 
elite*gold: 50
Join Date: Mar 2013
Posts: 2,401
Received Thanks: 1,613
Code:
quest guild_war_bet begin 
        state start begin
                when
                        guild_war_observer1.chat."Guild War-Bet" or
                        guild_war_observer2.chat."Guild War-Bet" or
                        guild_war_observer3.chat."Guild War-Bet" begin
                        --guild.get_reserve_war_table returns
                        --{     1        2               3           4
                        --{ id, presume_winner, presume_loser, handicap },
                        --}
                        local info_counter = pc.getqf("Info")

                        if info_counter < 3 then
                                say_title("The Guild War-Bet.")
                                say("")
                                ----"12345678901234567890123456789012345678901234567890"|
                                say("Buy a Betting Lot for your empire.")
                                say("1 At every guild war, there will be an announcement")
                                say("of the possible projection for the victorious guild")
                                say("")
                                say("2. You can buy a Betting Lot, and give your tip")
                                say("which guild will win and if the guild reaches the ")
                                say("announced projection or not.")
                                say("")
                                say("3. The possibilities for choosing a bet are")
                                say("controlled by the Betting Booth and when the war")
				say("ends you are informed if you have won or lost.")
                                say("* 10% of the profit is paid to the empire.")
                                pc.setqf("Info", info_counter + 1)
                                wait()
                        end

                        local g = guild.get_reserve_war_table()
                        local gname_table = {}

                        table.foreachi(g,
                        function(n, p)
                                gname_table[n] = guild.get_name(p[2]).." against "..guild.get_name(p[3])
                        end)

                        if table.getn(g) == 0 then
                                -- no currently war
                                say_title("Battle Administrator:")
                                say("")
                                say("There is no guild war in the moment, you could bet on.")
                                say("")
                        else
                                gname_table[table.getn(g)+1] = "Abbort"
                                say_title("Battle Administrator:")
                                say("")
				----"12345678901234567890123456789012345678901234567890"|
                                say("For which guild war you want to buy a Betting Lot?")

                                local s = select_table(gname_table)

                                if s != table.getn(gname_table) then
                                        if guild.is_bet(g[s][1]) then
                                                say_title("Battle Administrator:")
                                                say("")
                                                say("On my list stands, you already have a Betting Lot")
                                                say("for this guild war.")
                                                say("You can only buy one Lot per war.")
                                        else
                                                local name1 = guild.get_name(g[s][2])
                                                local name2 = guild.get_name(g[s][3])

                                                say_title("Battle Administrator:")
                                                say("")
                                                say("The guild with the name")
                                                say(name1.." "..name2.."with "..g[s][4].."seems to be victorious.")
                                                say("On which guild you want to bet?")
                                                say(name1.."It is to be foreseen, that guild"..name2..""..g[s][4].."will be victorious.[ENTER][ENTER]On which guild you want to bet?")
                                                local guild_s = select(name1, name2, "Abbort")

                                                if guild_s != 3 then
                                                        local bet_guild = g[s][guild_s+1]

                                                        say_title("Battle Administrator:")
                                                        say("")
                                                        say("Hmm ... A good choice! Waht is you option?")

                                                        local price_button_table = {}

                                                        table.foreachi(guild_war_bet_price_table,
                                                        function(n, p)
                                                                price_button_table[n] = p.."Yang"
                                                        end)

                                                        price_button_table[table.getn(price_button_table)+1] =  "Abbort"

                                                        local price_idx = select_table(price_button_table)

                                                        if price_idx != table.getn(price_button_table) then -- ? ??? ?? ??? ???
                                                                if pc.gold < guild_war_bet_price_table[price_idx] then
                                                                        say_title("Battle Administrator:")
                                                                        say("")
                                                                        say("You do not have enough Yang!")
                                                                        say("")
                                                                else
                                                                        say_title("Battle Administrator:")
                                                                        say("")
                                                                        pc.changegold(-guild_war_bet_price_table[price_idx])
                                                                        guild.war_bet(g[s][1], bet_guild, guild_war_bet_price_table[price_idx])
                                                                        say("Everything is ready. If you have chosen right,")
                                                                        say("The Yang will be paid and given to you, ")
                                                                        say("when the guild war is over. Good luck!")
                                                                end
                                                        end
                                                end -- if guild_s != 3
                                        end -- if guild.is_bet(g[s][1])
                                end -- if s != table.getn(gname_table)
                        end
                end
        end
end
should work
.Inya is offline  
Thanks
2 Users
Old 09/03/2013, 15:49   #3
 
rapperclau's Avatar
 
elite*gold: 0
Join Date: Aug 2012
Posts: 66
Received Thanks: 2
Thanks mane work
rapperclau is offline  
Reply


Similar Threads Similar Threads
[Server] Problem guild_war_bet.quest
09/03/2013 - Metin2 - 2 Replies
Hi As he says and in the title I have a problem with this quest: P.S: I have to mention that I have not changed at all, this is original quest SG 2 Hours torturing myself and do not give him the end..... Sorry for my bad english... quest guild_war_bet begin state start begin when guild_war_observer1.chat."Guild War-Bet" or guild_war_observer2.chat."Guild War-Bet" or
Problem bei eigenen Quest im Server implementieren:>
11/05/2011 - Metin2 Private Server - 0 Replies
Hay E-pvper. Hoffe ihr könnt mir bei einem folgenden problem helfen undzwar will ich bei mir im Server eigene Quest reinfügen aber es kommt dauernt ne Fehlermeldung die so geht assertion failure: nested==0 waffruss.quest:44:Abort trap Error occured on compile waffruss.quest Hoffe um hilfe Gibt auch ein THX;) Ps: nicht kritisieren ist mein erster eintrag:D
[Problem] Problem with server starting - cannot find quest index for PaxHeader
12/22/2009 - Metin2 Private Server - 1 Replies
Hello! I have this same problem as here when i'm starting my server: http://www.elitepvpers.com/forum/metin2-pserver-di scussions-questions/307143-metin2-serverfiles-ques t-index-fehler.html But I didn't know the answer.. how to repair this? Greetings



All times are GMT +2. The time now is 15:57.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.