• 0
Afro94

en cours Probleme d'une quete

Question

Posted (edited)
quest battleroyal begin
	state start begin
		when letter with pc.is_gm() begin --Lors de l'affichage des quetes, si le joueur est un GM
			send_letter("Battle Royal(GM)")--Une quete (Battle Royal(GM) apparait
		end
		when button or info with pc.is_gm() begin -- Si un GM click sur la quete
			say_title("Battle Royal :")--Titre de la quete
			say("Gerer la Battle Royal") -- Texte de la quete
			local activer = select("Activer","Desactiver","Quitter")--Selection du choix
			if activer==3 then--Si le GM met Quitter
				return--Le GM quitte la quete
			elseif activer==1 then--Si le GM met Activer
				game.set_event_flag("battleroyal", 1)--La variable commune de la battleroyal=1
				notice_all("La Battle Royal a commencee !")--Annonce general
			elseif activer==2 then--Si le GM met Desactiver
				game.set_event_flag("battleroyal", 2)--La variable commune de la battleroyal=2
				game.set_event_flag("battleroyal", 0)--Remet la variable commune battle royal a 0
				pc.setqf("participer", 0)--Remet la variable du joueur participer a 0
				game.set_event_flag("winner", 0)--Remet la variable commune winner a 0
				game.set_event_flag("nb_player", 0)--Remet la variable commune nb_player a 0
				game.set_event_flag("nb_rouge", 0)--Remet la variable commune nb_rouge a 0
				game.set_event_flag("nb_bleu", 0)--Remet la variable commune nb_bleu a 0
				game.set_event_flag("nb_jaune", 0)--Remet la variable commune nb_jaune a 0
				notice_all("La Battle Royal est terminee !")--Annonce general
			end
		end
		when letter begin--Lors de l'affichage des quetes, pour tout les joueurs			
			if pc.getqf("participer") == 2 and game.get_event_flag("battleroyal")== 0 then--Si la variable du joueur pariciper=2 et que la variable commune battleroyal=0
				pc.setqf("participer", 0)--Remet la variable du joueur participer a 0
			elseif pc.getqf("participer") == 2 and game.get_event_flag("battleroyal")== 2 then
				pc.setqf("participer", 0)--Remet la variable du joueur participer a 0
			end
			if game.get_event_flag("battleroyal") == 1 and pc.getqf("participer") == 0 then--Si la variable commune battleroyal=1 et la variable du joueur participer=0
				send_letter("Battle Royal")--Une quete (Battle Royal) apparait
			end
		end
		when button or info begin--Si un joueur click sur la quete
			if game.get_event_flag("battleroyal") == 1 then--Si la variable commune battleroyal=1
				say_title("Battle Royal :")--Titre de la quete
				say("Voulez vous participer a la Battle Royal")--Texte de la quete
				local participer = select("Oui","Non","Quitter")--Selection du choix
				if participer==3 then--Si le joueur met Quitter
					return--Le joueur quitte la quete
				elseif participer==1 then--Si le joueur met Oui
					pc.setqf("participer", 1)--La variable du joueur participer=1
					game.set_event_flag("nb_player", game.get_event_flag("nb_player") + 1)--La variable commune nb_player s'incremente de 1
					syschat(pc.get_empire())
					if pc.get_empire() ==1 then
						game.set_event_flag("nb_rouge", game.get_event_flag("nb_rouge") + 1)--La variable commune nb_rouge s'incremente de 1
					elseif pc.get_empire() ==2 then
					game.set_event_flag("nb_jaune", game.get_event_flag("nb_jaune") + 1)--La variable commune nb_jaune s'incremente de 1
					elseif pc.get_empire() ==3 then
						game.set_event_flag("nb_bleu", game.get_event_flag("nb_bleu") + 1)--La variable commune nb_bleu s'incremente de 1
					end
					pc.warp(828300 , 763500)--Le joueur est TP map Geant
				elseif participer==2 then--Si le joueur met Non
					pc.setqf("participer", 2)--La variable du joueur participer=2
				end
			end
		end
		when login begin
			if game.get_event_flag("battleroyal") == 1 then
				loop_timer("verif2", 2)
			end
		end
		when login with pc.get_map_index() == 70 begin--Si le joueur est connecte et se situe dans la map geant
			if pc.getqf("participer") == 1 then--Et si la variable du joueur participer=1
			syschat("Bienvenue dans la Battle Royal, le but du jeu est de survivre.")--Texte dans la barre de chat
			loop_timer("verif", 2)
			else--Sinon
				warp_to_village()--Le joueur quitte la map
			end
		end
		when verif2.timer begin
			if game.get_event_flag("winner") == pc.get_empire() then--Si la variable commune winner est identique aux numero de l'empire du joueur
				syschat("testfinal")
				pc.give_item2(10, 1)--Donne un item a tout les joueurs de l'empire gagnant(CHANGER L'ITEM)
				game.set_event_flag("battleroyal", 0)--Remet la variable commune battle royal a 0
				pc.setqf("participer", 0)--Remet la variable du joueur participer a 0
				game.set_event_flag("winner", 0)--Remet la variable commune winner a 0
				game.set_event_flag("nb_player", 0)--Remet la variable commune nb_player a 0
				if pc.get_map_index() == 70 then
					warp_to_village()--Les derniers joueur se TP map1
				end
			end
		end
		when verif.timer begin
			if pc.get_hp() <= 0 then--Si le joueur est mort 
					pc.setqf("participer", 2)--La variable du joueur participer=2
					warp_to_village()--Le joueur se TP map 1
			end
		end		
		when kill with npc.is_pc() begin--Si un kill se produit dans la map geant
			if pc.get_map_index() == 70 then
				loop_timer("firstkill", 2)
				syschat("test1")
				if pc.getqf("participer") == 1 then--Et si la variable du joueur participer=1
					syschat("test2")
					game.set_event_flag("nb_player", game.get_event_flag("nb_player") - 1)--La variable commune nb_player se decremente de 1
					if npc.empire ==1 then
						game.set_event_flag("nb_rouge", game.get_event_flag("nb_rouge") - 1)--La variable commune nb_rouge se decremente de 1
						syschat("testred")
					elseif npc.empire ==2 then
						game.set_event_flag("nb_jaune", game.get_event_flag("nb_jaune") - 1)--La variable commune nb_rouge se decremente de 1
						syschat("testyellow")
					elseif npc.empire ==3 then
						game.set_event_flag("nb_bleu", game.get_event_flag("nb_bleu") - 1)--La variable commune nb_rouge se decremente de 1
						syschat("testblue")
					end
				end
			end
		end
		when firstkill.timer begin
			if game.get_event_flag("battleroyal") == 1 then
				if game.get_event_flag("nb_jaune")== 0 and game.get_event_flag("nb_bleu") == 0 then
					game.set_event_flag("winner", 1)--La variable commune winner = rouge
					syschat("testwinnred")
				elseif game.get_event_flag("nb_bleu")== 0 and game.get_event_flag("nb_rouge") == 0 then
					game.set_event_flag("winner", 2)--La variable commune winner = jaune
					syschat("testwinnyellow")
				elseif game.get_event_flag("nb_rouge")== 0 and game.get_event_flag("nb_jaune") == 0 then
					game.set_event_flag("winner", 3)--La variable commune winner = bleu
					syschat("testwinnblue")
				end
			end
		end
	end
end

Bonjour a tous,

Tout fonctionne sauf la partie When kill with npc.is_pc and pc.get_map_index() ==70 begin.

Help me Please !

Merci !!

 

(cf: Hier j'ai changé (When kill with npc.is_pc and pc.get_map_index() ==70 begin) par (When kill with pc.get_map_index() ==70 begin), les syschat ont fonctionnés une fois mais mes getqf ne se sont pas décrémentés puis apres plusieurs testes, plus rien et meme pas d'affichage de syschat.).

Edited by Afro94

Share this post


Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0
Posted (edited)

SYSERR: Apr 16 23:27:00 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:27:01 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:27:01 :: ChildLoop: AsyncSQL: query failed: Incorrect integer value: 'N' for column 'is_gm' at row 1 (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'N', NOW(), 99, 94242, 22, inet_aton('89.3.231.152'), '') errno: 1366)
SYSERR: Apr 16 23:27:02 :: ChildLoop: AsyncSQL: query failed: Incorrect integer value: 'Y' for column 'is_gm' at row 1 (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'Y', NOW(), 99, 94241, 19, inet_aton('89.3.231.152'), '') errno: 1366)
SYSERR: Apr 16 23:27:07 :: Entergame: !GetMovablePosition (name Milkdromeda 819200x716800 map 70 changed to 827700x763400)
SYSERR: Apr 16 23:27:23 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 19, 827700, 763400, 0, 'WARP', 'Milkdromeda MapIdx 70 DestMapIdx0 DestX969600 DestY278400 Empire3', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:27:56 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:27:58 :: Entergame: !GetMovablePosition (name Milkdromeda 819200x716800 map 70 changed to 827700x763400)
SYSERR: Apr 16 23:29:04 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 19, 829287, 763459, 0, 'WARP', 'Milkdromeda MapIdx 70 DestMapIdx0 DestX969600 DestY278400 Empire3', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:29:42 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:29:43 :: ChildLoop: AsyncSQL: query failed: Incorrect integer value: 'N' for column 'is_gm' at row 1 (query: INSERT INTO loginlog2(type, is_gm, login_time, channel, account_id, pid, ip, client_version) VALUES('INVALID', 'N', NOW(), 99, 94242, 22, inet_aton('89.3.231.152'), '') errno: 1366)
SYSERR: Apr 16 23:33:14 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:33:15 :: Entergame: !GetMovablePosition (name Milkdromeda 819200x716800 map 70 changed to 827700x763400)
SYSERR: Apr 16 23:33:26 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:33:26 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:33:58 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 20, 829575, 763759, 0, 'WARP', 'OneShot MapIdx 70 DestMapIdx0 DestX969600 DestY278400 Empire3', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:34:29 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 22, 830083, 764432, 0, 'WARP', 'Ryu MapIdx 70 DestMapIdx0 DestX969600 DestY278400 Empire3', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:39:29 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 19, 829391, 763574, 0, 'WARP', 'Milkdromeda MapIdx 70 DestMapIdx0 DestX969600 DestY278400 Empire3', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:44:17 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:44:27 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 60, 829006, 763671, 0, 'WARP', 'TESTBATTLE MapIdx 70 DestMapIdx0 DestX469300 DestY964200 Empire1', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:45:48 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:45:50 :: Entergame: !GetMovablePosition (name Milkdromeda 819200x716800 map 70 changed to 827700x763400)
SYSERR: Apr 16 23:46:34 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 60, 599400, 756300, 0, 'WARP', 'TESTBATTLE MapIdx 62 DestMapIdx70 DestX828047 DestY763566 Empire1', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:47:13 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 60, 828654, 763817, 0, 'WARP', 'TESTBATTLE MapIdx 70 DestMapIdx0 DestX469300 DestY964200 Empire1', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:48:46 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 19, 829512, 763618, 0, 'WARP', 'Milkdromeda MapIdx 70 DestMapIdx0 DestX969600 DestY278400 Empire3', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:52:25 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:52:25 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:52:37 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 20, 830249, 764175, 0, 'WARP', 'OneShot MapIdx 70 DestMapIdx0 DestX969600 DestY278400 Empire3', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:52:53 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 22, 830739, 764099, 0, 'WARP', 'Ryu MapIdx 70 DestMapIdx0 DestX959900 DestY269200 Empire3', '89.3.231.152') errno: 1406)
SYSERR: Apr 16 23:54:53 :: GetServerLocation: location error name  mapindex 0 0 x 0 empire 3
SYSERR: Apr 16 23:54:55 :: Entergame: !GetMovablePosition (name Milkdromeda 819200x716800 map 70 changed to 827700x763400)
SYSERR: Apr 16 23:54:56 :: ChildLoop: AsyncSQL: query failed: Data too long for column 'hint' at row 1 (query: INSERT DELAYED INTO log (type, time, who, x, y, what, how, hint, ip) VALUES('CHARACTER', NOW(), 19, 827700, 763400, 0, 'WARP', 'Milkdromeda MapIdx 70 DestMapIdx0 DestX969600 DestY278400 Empire3', '89.3.231.152') errno: 1406)
 

Edited by Afro94

Share this post


Link to post
Share on other sites
  • 0

Tu es certain qu’il s’agit du bon syserr ? Je ne vois rien en rapport avec la quête en tout cas.

 

Peux-tu envoyer toute ta quête ? Ce morceau m’a l’air correct, le problème vient peut-être d’ailleurs

Share this post


Link to post
Share on other sites