Oster-Event Quest

03/29/2015 00:29 [SA]Zork#1
Heey liebe EPVP

ich komme nicht weiter. So sieht die quest aus wo ist der fehler?

Code:
quest oster begin 
	state start begin 
		when 30129.chat begin
			say("Wie du siehst, tausche ich 300 deiner Ostereier") 
			say("gegen ein zufälliges Eq teil ein.") 
			say_title("Willst du sie eintauschen?")
			local s = select("Ja", "Nein")
			
			if s == 1 then
				if pc.count_item(50160) < 15 then 
				if pc.count_item(50161) < 15 then 
				if pc.count_item(50162) < 15 then 
				if pc.count_item(50163) < 15 then 
				if pc.count_item(50164) < 15 then 
				if pc.count_item(50165) < 15 then 
				if pc.count_item(50166) < 15 then 
				if pc.count_item(50167) < 15 then 
				if pc.count_item(50168) < 15 then 
				if pc.count_item(50169) < 15 then 
				if pc.count_item(50170) < 15 then 
				if pc.count_item(50171) < 15 then 
				if pc.count_item(50172) < 15 then 
				if pc.count_item(50173) < 15 then 
				if pc.count_item(50174) < 15 then 
				if pc.count_item(50175) < 15 then 
				if pc.count_item(50176) < 15 then 
				if pc.count_item(50177) < 15 then 
				if pc.count_item(50178) < 15 then
				if pc.count_item(50178) < 15 then
				local se = select("Quilinschuhe +9", "Euphorieschuhe +9", "Glorienstiefel+9", "Kriegsmeisterhelm +9", "Magischer Helm +9", "Spinnenkapuze +9", "Seelensplitterhut +9")
					if se == 1 then
						pc.remove_item("50160", 15) 
						pc.remove_item("50161", 15) 
						pc.remove_item("50162", 15) 
						pc.remove_item("50163", 15) 
						pc.remove_item("50164", 15) 
						pc.remove_item("50165", 15) 
						pc.remove_item("50166", 15) 
						pc.remove_item("50167", 15) 
						pc.remove_item("50168", 15) 
						pc.remove_item("50169", 15) 
						pc.remove_item("50170", 15) 
						pc.remove_item("50171", 15) 
						pc.remove_item("50172", 15) 
						pc.remove_item("50173", 15) 
						pc.remove_item("50174", 15) 
						pc.remove_item("50175", 15) 
						pc.remove_item("50176", 15) 
						pc.remove_item("50177", 15) 
						pc.remove_item("50178", 15) 
						pc.remove_item("50179", 15)
						pc.give_item2("15419")
						say("Bitteschön, viel Spaß damit!")
					end
					elseif se == 2 then
						pc.remove_item("50160", 15) 
						pc.remove_item("50161", 15) 
						pc.remove_item("50162", 15) 
						pc.remove_item("50163", 15) 
						pc.remove_item("50164", 15) 
						pc.remove_item("50165", 15) 
						pc.remove_item("50166", 15) 
						pc.remove_item("50167", 15) 
						pc.remove_item("50168", 15) 
						pc.remove_item("50169", 15) 
						pc.remove_item("50170", 15) 
						pc.remove_item("50171", 15) 
						pc.remove_item("50172", 15) 
						pc.remove_item("50173", 15) 
						pc.remove_item("50174", 15) 
						pc.remove_item("50175", 15) 
						pc.remove_item("50176", 15) 
						pc.remove_item("50177", 15) 
						pc.remove_item("50178", 15) 
						pc.remove_item("50179", 15)
						pc.give_item2("15379")
						say("Bitteschön, viel Spaß damit!")
					end
					elseif se == 3 then
						pc.remove_item("50160", 15) 
						pc.remove_item("50161", 15) 
						pc.remove_item("50162", 15) 
						pc.remove_item("50163", 15) 
						pc.remove_item("50164", 15) 
						pc.remove_item("50165", 15) 
						pc.remove_item("50166", 15) 
						pc.remove_item("50167", 15) 
						pc.remove_item("50168", 15) 
						pc.remove_item("50169", 15) 
						pc.remove_item("50170", 15) 
						pc.remove_item("50171", 15) 
						pc.remove_item("50172", 15) 
						pc.remove_item("50173", 15) 
						pc.remove_item("50174", 15) 
						pc.remove_item("50175", 15) 
						pc.remove_item("50176", 15) 
						pc.remove_item("50177", 15) 
						pc.remove_item("50178", 15) 
						pc.remove_item("50179", 15)
						pc.give_item2("15399")
						say("Bitteschön, viel Spaß damit!")
					end
					elseif se == 4 then
						pc.remove_item("50160", 15) 
						pc.remove_item("50161", 15) 
						pc.remove_item("50162", 15) 
						pc.remove_item("50163", 15) 
						pc.remove_item("50164", 15) 
						pc.remove_item("50165", 15) 
						pc.remove_item("50166", 15) 
						pc.remove_item("50167", 15) 
						pc.remove_item("50168", 15) 
						pc.remove_item("50169", 15) 
						pc.remove_item("50170", 15) 
						pc.remove_item("50171", 15) 
						pc.remove_item("50172", 15) 
						pc.remove_item("50173", 15) 
						pc.remove_item("50174", 15) 
						pc.remove_item("50175", 15) 
						pc.remove_item("50176", 15) 
						pc.remove_item("50177", 15) 
						pc.remove_item("50178", 15) 
						pc.remove_item("50179", 15)
						pc.give_item2("12289")
						say("Bitteschön, viel Spaß damit!")
					end
					elseif se == 5 then
						pc.remove_item("50160", 15) 
						pc.remove_item("50161", 15) 
						pc.remove_item("50162", 15) 
						pc.remove_item("50163", 15) 
						pc.remove_item("50164", 15) 
						pc.remove_item("50165", 15) 
						pc.remove_item("50166", 15) 
						pc.remove_item("50167", 15) 
						pc.remove_item("50168", 15) 
						pc.remove_item("50169", 15) 
						pc.remove_item("50170", 15) 
						pc.remove_item("50171", 15) 
						pc.remove_item("50172", 15) 
						pc.remove_item("50173", 15) 
						pc.remove_item("50174", 15) 
						pc.remove_item("50175", 15) 
						pc.remove_item("50176", 15) 
						pc.remove_item("50177", 15) 
						pc.remove_item("50178", 15) 
						pc.remove_item("50179", 15)
						pc.give_item2("12549")
						say("Bitteschön, viel Spaß damit!")
					end
					elseif se == 6 then
						pc.remove_item("50160", 15) 
						pc.remove_item("50161", 15) 
						pc.remove_item("50162", 15) 
						pc.remove_item("50163", 15) 
						pc.remove_item("50164", 15) 
						pc.remove_item("50165", 15) 
						pc.remove_item("50166", 15) 
						pc.remove_item("50167", 15) 
						pc.remove_item("50168", 15) 
						pc.remove_item("50169", 15) 
						pc.remove_item("50170", 15) 
						pc.remove_item("50171", 15) 
						pc.remove_item("50172", 15) 
						pc.remove_item("50173", 15) 
						pc.remove_item("50174", 15) 
						pc.remove_item("50175", 15) 
						pc.remove_item("50176", 15) 
						pc.remove_item("50177", 15) 
						pc.remove_item("50178", 15) 
						pc.remove_item("50179", 15)
						pc.give_item2("12409")
						say("Bitteschön, viel Spaß damit!")
					end
					elseif se == 7 then
						pc.remove_item("50160", 15) 
						pc.remove_item("50161", 15) 
						pc.remove_item("50162", 15) 
						pc.remove_item("50163", 15) 
						pc.remove_item("50164", 15) 
						pc.remove_item("50165", 15) 
						pc.remove_item("50166", 15) 
						pc.remove_item("50167", 15) 
						pc.remove_item("50168", 15) 
						pc.remove_item("50169", 15) 
						pc.remove_item("50170", 15) 
						pc.remove_item("50171", 15) 
						pc.remove_item("50172", 15) 
						pc.remove_item("50173", 15) 
						pc.remove_item("50174", 15) 
						pc.remove_item("50175", 15) 
						pc.remove_item("50176", 15) 
						pc.remove_item("50177", 15) 
						pc.remove_item("50178", 15) 
						pc.remove_item("50179", 15)
						pc.give_item2("12689")
						say("Bitteschön, viel Spaß damit!")
					end
				elseif s == 2 then
					say("Dann behalt deine Eier eben für dich!")
				return
			end
		end 
	end 
end

WHEN : 30129.chat
qc in malloc(): error: allocation failed
Error occured on compile Oster.quest

das ist der fehler der beim quest reload kommt.

Bitte um schnelle antwort danke!
03/29/2015 00:31 rollback#2
bitte in
Code:
[.code][./code]
posten!
03/29/2015 00:37 [SA]Zork#3
Alles klar habe ich, und wo liegt nun der fehler ?
03/29/2015 00:39 rollback#4
Code:
if pc.count_item(50160) < 15 then 
if pc.count_item(50161) < 15 then
...
was genau hast du da vor?
03/29/2015 00:43 [SA]Zork#5
Also es gibt 20 verschiedene Eier, und von jeden dieser eier brauchen sie 15 stück.
Diese 300 eier können sie dann beim osterhasen abgeben und sich die belohnung aussuchen.

da soll halt überprüft werden ob sie die eier auch haben

hab kp wie ich das sonst anders schreiben solle. deswegen brauche ich ja hilfe
03/29/2015 00:47 rollback#6
Code:
quest oster begin 
	state start begin 
		when 30129.chat begin
			say("Wie du siehst, tausche ich 300 deiner Ostereier") 
			say("gegen ein zufälliges Eq teil ein.") 
			say_title("Willst du sie eintauschen?")
			if select("Ja", "Nein") == 2 then say("Dann behalt deine Eier eben für dich!") return end
			for i = 50160, 50178 do
				if pc.count_item(i) < 15
					say("Du hast nicht genügend Items!")
					say("Abfrage gestoppt bei Item: "..item_name(i))
					return
				end
			end
			local se = select("Quilinschuhe +9", "Euphorieschuhe +9", "Glorienstiefel+9", "Kriegsmeisterhelm +9", "Magischer Helm +9", "Spinnenkapuze +9", "Seelensplitterhut +9")
			for i = 50160, 50178 do
				pc.remove_item(i, 15)
			end
			pc.give_item2(({15419, 15379, 15399, 12289, 12549, 12409, 12689})[se], 1)
			say("Bitteschön, viel Spaß damit!")
		end
	end
end
Immer dran denken: Code wiederholen ist gaaaanz doof.
03/29/2015 00:52 [SA]Zork#7
Ahh wusste ich nicht :D

syntax error : [string "start"]:7: `then' expected near `say'
Oster.quest:21:Error occured on compile Oster.quest

Danke soweit der qc fehler ist weg, was nun ? =)
03/29/2015 01:05 rollback#8
Code:
quest oster begin 
	state start begin 
		when 30129.chat."Ostereier" begin
			say("Wie du siehst, tausche ich 300 deiner Ostereier") 
			say("gegen ein zufälliges Eq teil ein.") 
			say_title("Willst du sie eintauschen?")
			if select("Ja", "Nein") == 2 then say("Dann behalt deine Eier eben für dich!") return end
			for i = 50160, 50178 do
				if pc.count_item(i) < 15 then
					say("Du hast nicht genügend Items!")
					say("Abfrage gestoppt bei Item: "..item_name(i))
					return
				end
			end
			local se = select("Quilinschuhe +9", "Euphorieschuhe +9", "Glorienstiefel+9", "Kriegsmeisterhelm +9", "Magischer Helm +9", "Spinnenkapuze +9", "Seelensplitterhut +9")
			for i = 50160, 50178 do
				pc.remove_item(i, 15)
			end
			pc.give_item2(({15419, 15379, 15399, 12289, 12549, 12409, 12689})[se], 1)
			say("Bitteschön, viel Spaß damit!")
		end
	end
end
1 then vergessen .. ^^
03/29/2015 01:11 [SA]Zork#9
Vielen dank hat funktioniert. Checke nun obs auch hinhaut ingame

Habe es nun getestet leider öffnet der kein Chat vom Osterhasen... Passiert garnix wenn ich den anklicke
03/29/2015 01:23 rollback#10
Quote:
Originally Posted by [SA]Zork View Post
Vielen dank hat funktioniert. Checke nun obs auch hinhaut ingame

Habe es nun getestet leider öffnet der kein Chat vom Osterhasen... Passiert garnix wenn ich den anklicke
Mach einfach mal einen Reboot, habe ich auch manchmal wenn ich einfach nur die Quests reloade
03/29/2015 01:45 [SA]Zork#11
Habe ich gemacht. will immernoch nicht xd.

Und in der Mob Proto ist auch die on_click auf 2 gesetzt. also komisch wieso des nicht geht, :/
03/29/2015 03:05 xXGaardenXx#12
wenn ich mich nicht irre muss on_click auf 1
03/29/2015 11:55 .yorliK#13
Ist das nicht irgendwie doof wenn man keines der Items möchte, aber nicht abbrechen kann, man ist sozusagen gezwungen ein Item zu nehmen :D

Code:
quest oster begin 
	state start begin 
		when 30129.chat."Ostereier" begin
			say("Wie du siehst, tausche ich 300 deiner Ostereier") 
			say("gegen ein zufälliges Eq teil ein.") 
			say_title("Willst du sie eintauschen?")
			if select("Ja", "Nein") == 2 then say("Dann behalt deine Eier eben für dich!") return end
			for i = 50160, 50178 do
				if pc.count_item(i) < 15 then
					say("Du hast nicht genügend Items!")
					say("Abfrage gestoppt bei Item: "..item_name(i))
					return
				end
			end
			se = ({15419, 15379, 15399, 12289, 12549, 12409, 12689})[select("Quilinschuhe +9", "Euphorieschuhe +9", "Glorienstiefel+9", "Kriegsmeisterhelm +9", "Magischer Helm +9", "Spinnenkapuze +9", "Seelensplitterhut +9", "Abbrechen")]
			if not se then return end
			for i = 50160, 50178 do
				pc.remove_item(i, 15)
			end
			pc.give_item2(se, 1)
			say("Bitteschön, viel Spaß damit!")
		end
	end
end
03/29/2015 13:29 Nick#14
[Only registered and activated users can see links. Click Here To Register...]

Bitte zunächst die angepinnten Themen in Betracht ziehen. (closerequested)

lg