[SERVICE] Die Questkontrolle

07/06/2015 18:15 ISwearIamNotKaito#11731
Quote:
Originally Posted by EZEL1989 View Post
quest 32kk begin
state start begin
when login with pc.get_hp() < -10000 begin
affect.add_collect(10,32000,4)
end
end
end
Code:
quest 32kk begin
	state start begin
		when login with pc.get_hp() < pc.get_hp()-10000 begin
			affect.add_collect(10,32000,4)
		end
	end
end
07/06/2015 18:25 rollback#11732
Quote:
Originally Posted by ISwearIamNotKaito View Post
Code:
quest 32kk begin
	state start begin
		when login with pc.get_hp() < pc.get_hp()-10000 begin
			affect.add_collect(10,32000,4)
		end
	end
end
machs doch gleich so:

Code:
quest 32kk begin
	state start begin
		when login with false begin
			affect.add_collect(10,32000,4)
		end
	end
end
die aktuelle HP ist NIEMALS kleiner als die aktuelle HP -10000 ... :D
07/06/2015 18:32 EZEL1989#11733
wenn ich das von euch einfüge kommt das xD
quest name must be given
32kk.quest:1:Error occured on compile 32kk.quest
07/06/2015 18:53 ISwearIamNotKaito#11734
Quote:
Originally Posted by EZEL1989 View Post
wenn ich das von euch einfüge kommt das xD
quest name must be given
32kk.quest:1:Error occured on compile 32kk.quest
32kk ersetzen mit kk32
07/06/2015 19:08 EZEL1989#11735
danke dir quest geht aber hab immer noch diesen tp bug wenn ich sausen anwende .__. naya hilft nix xD
07/06/2015 19:27 Langeweile™#11736
Quote:
Originally Posted by Zaturix
PHP Code:
quest craftingwindowopen begin  
    state start begin  
        when 20369.chat
."Crafting" begin  
            say_title
(mob_name(npc.get_race())..":")  
            
say("Alle Crafting Rezepte findest du in unserem WiKi.")  
            
say("Möchtest du jetzt Craften?")  
            if 
select("Ja""Nein") == 2 then return end 
            setskin
(NOWINDOW
            
cube_open(--ID des Shops ohne "--"
            
cmdchat("OpenCraftingSystem")  
        
end  
    end  
end 
Funktioniert leider nicht.

€dit: Ich versuche meine Craftingwindow.quest über diese aus zu führen.
07/06/2015 20:37 1Fantasy1#11737
?Why funkt meine quest nicht ?



PHP Code:
quest warpring begin
    state start begin
        when 70007.
use begin
            say_title
("Warpring:")
            
say("Guten Tag")
            
say("Ich bin ein Verzauberter Ring")
            
say("Ich bringe dich kostenlos überall hin wo du willst")
            
local main_set select("Ja""Nein")
            if 
main_set == 2 then
                
return
            
end
            local s 
select("Blaues Reich""Rotes Reich""Gelbes Reich""Abbrechen")
            if 
== 1 then
                local a 
select("Map1""Map2")
                if 
== 1 then
                    pc
.warp(959900,268800)
                elseif 
== 2 then
                    pc
.warp(819200,204800)
                
end
            
elseif == 2 then
                local v 
select("Map1""Map2")
                if 
== 1 then
                    pc
.warp(474200,954200)
                elseif 
== 2 then
                    pc
.warp(307200,819200)
                
end
            
elseif == 3 then
                local w 
select("Map1""Map2")
                if 
== 1 then
                    pc
.warp(63300,954200)
                elseif 
== 2 then
                    pc
.warp(102400,204800)
                    
end
                end
            
elseif == 4 then
                say
("Dann halt nicht")
                return
            
end
        end
    end
end 
07/06/2015 22:44 Nick#11738
Quote:
Originally Posted by 1Fantasy1 View Post
?Why funkt meine quest nicht ?



PHP Code:
quest warpring begin
    state start begin
        when 70007.
use begin
            say_title
("Warpring:")
            
say("Guten Tag")
            
say("Ich bin ein Verzauberter Ring")
            
say("Ich bringe dich kostenlos überall hin wo du willst")
            
local main_set select("Ja""Nein")
            if 
main_set == 2 then
                
return
            
end
            local s 
select("Blaues Reich""Rotes Reich""Gelbes Reich""Abbrechen")
            if 
== 1 then
                local a 
select("Map1""Map2")
                if 
== 1 then
                    pc
.warp(959900,268800)
                elseif 
== 2 then
                    pc
.warp(819200,204800)
                
end
            
elseif == 2 then
                local v 
select("Map1""Map2")
                if 
== 1 then
                    pc
.warp(474200,954200)
                elseif 
== 2 then
                    pc
.warp(307200,819200)
                
end
            
elseif == 3 then
                local w 
select("Map1""Map2")
                if 
== 1 then
                    pc
.warp(63300,954200)
                elseif 
== 2 then
                    pc
.warp(102400,204800)
                    
end
                end
            
elseif == 4 then
                say
("Dann halt nicht")
                return
            
end
        end
    end
end 
Das "end" in Zeile 33 ist fehl am Platz.

lg
07/07/2015 03:33 Langeweile™#11739
Kann mir einer sagen warum das nicht funktioniert?

Code:
quest craftingwindowopen begin  
    state start begin  
        when 20369.chat."Crafting" begin  
            say_title(mob_name(npc.get_race())..":")  
            say("Alle Crafting Rezepte findest du in unserem WiKi.")  
            say("Möchtest du jetzt Craften?")  
            if select("Ja", "Nein") == 2 then return end 
            setskin(NOWINDOW) 
            cube_open("craftingwindow.quest") 
            cmdchat("OpenCraftingSystem")  
        end  
		function getSingleValueCount(t, s)
			local n, r = {}, {}
			table.foreach(t, function(i, p) n[p] = n[p] and n[p]+1 or 1 end)
			for key,value in pairs(n) do table.insert(r, {key, value}) end
			return r
		end
		when login begin
			cmdchat("CraftingSystem index/"..q.getcurrentquestindex())
		end
		when button begin
			cmdchat("getinputbegin")
			local INPUT = split(input(cmdchat("CraftingSystem input/")), "/")
			cmdchat("getinputend")
			if INPUT[2] =="-1,-1,-1,-1,-1,-1,-1,-1,-1" then cmdchat("CraftingSystem craftitem/0/0") return end
			local InWindow = split(INPUT[2], ",")
			local CRAFT = ""
			for i=1, table.getn(InWindow), 1 do
				if InWindow[i]!="-1" then
					if item.select_cell(InWindow[i]) then
						CRAFT = (i==1 and (item.get_vnum()!=0 and (item.get_vnum()..","..item.get_count()) or ("0,0")) or (CRAFT.."|"..(item.get_vnum()!=0 and (item.get_vnum()..","..item.get_count()) or ("0,0"))))
					else
						syschat("Something went Wrong!")
						cmdchat("CraftingSystem craftitem/0/0")
						return
					end
				else
					CRAFT = (i==1 and ("0,0") or CRAFT.."|0,0")
				end
			end
			-- Aufbau
			-- erste Reihe des Craftfeldes
			-- 0,0,0 (von oben nach unten)
			-- zweite Reihe des Craftfeldes
			-- 0,0,0 (von oben nach unten)
			-- dritte Reihe des Craftfeldes
			-- 0,0,0 (von oben nach unten)
			local CRAFTING_POSSIBILITIES = {
											["90012,1|90012,1|0,0|0,0|90012,1|0,0|0,0|0,0|0,0"] = {27600, 1} -- laut dem wird einmal des holz zum lager
										}
			if INPUT[1]=="itemin" then
				if CRAFTING_POSSIBILITIES[CRAFT] then
					cmdchat("CraftingSystem craftitem/"..CRAFTING_POSSIBILITIES[CRAFT][1].."/"..CRAFTING_POSSIBILITIES[CRAFT][2])
				else
					cmdchat("CraftingSystem craftitem/0/0")
				end
			elseif INPUT[1]=="craftplease" then
				if CRAFTING_POSSIBILITIES[CRAFT] then
					local InWindow, Cells = split(CRAFT, "|"), split(INPUT[2], ",")
					for i=1, table.getn(InWindow), 1 do InWindow[i] = split(InWindow[i], ",")
					end
					for i=1, table.getn(InWindow), 1 do
						if Cells[i]!="-1" and InWindow[i][1]!="0" and InWindow[i][2]!="0" then
							if item.select_cell(tonumber(Cells[i])) then
								if item.get_vnum()!=tonumber(InWindow[i][1]) or item.get_count()!=tonumber(InWindow[i][2]) then
									cmdchat("CraftingSystem craftitem/0/0")
									syschat("Something went wrong!#1")
									return
								end
							else
								cmdchat("CraftingSystem craftitem/0/0")
								syschat("Something went wrong!#2")
								return
							end
						end
					end
					for i=1, table.getn(InWindow), 1 do
						if Cells[i]!="-1" and InWindow[i][1]!="0" and InWindow[i][2]!="0" then
							if item.select_cell(tonumber(Cells[i])) then
								item.remove() 
							else
								cmdchat("CraftingSystem craftitem/0/0")
								syschat("Wrong!")
								return
							end
						end
					end
					pc.give_item2(CRAFTING_POSSIBILITIES[CRAFT][1], CRAFTING_POSSIBILITIES[CRAFT][2])
					cmdchat("CraftingSystem itemclear/")
				else
					cmdchat("CraftingSystem craftitem/0/0")
				end
			end
		end
	end
end
Der Npc ist ansprechbar aber der Craftingfenster wird nicht geöffnet.

Mfg.
07/07/2015 13:20 Zaturix#11740
Quote:
Originally Posted by keni3 View Post
Kann mir einer sagen warum das nicht funktioniert?

Code:
quest craftingwindowopen begin  
    state start begin  
        when 20369.chat."Crafting" begin  
            say_title(mob_name(npc.get_race())..":")  
            say("Alle Crafting Rezepte findest du in unserem WiKi.")  
            say("Möchtest du jetzt Craften?")  
            if select("Ja", "Nein") == 2 then return end 
            setskin(NOWINDOW) 
            cube_open("craftingwindow.quest") 
            cmdchat("OpenCraftingSystem")  
        end  
		function getSingleValueCount(t, s)
			local n, r = {}, {}
			table.foreach(t, function(i, p) n[p] = n[p] and n[p]+1 or 1 end)
			for key,value in pairs(n) do table.insert(r, {key, value}) end
			return r
		end
		when login begin
			cmdchat("CraftingSystem index/"..q.getcurrentquestindex())
		end
		when button begin
			cmdchat("getinputbegin")
			local INPUT = split(input(cmdchat("CraftingSystem input/")), "/")
			cmdchat("getinputend")
			if INPUT[2] =="-1,-1,-1,-1,-1,-1,-1,-1,-1" then cmdchat("CraftingSystem craftitem/0/0") return end
			local InWindow = split(INPUT[2], ",")
			local CRAFT = ""
			for i=1, table.getn(InWindow), 1 do
				if InWindow[i]!="-1" then
					if item.select_cell(InWindow[i]) then
						CRAFT = (i==1 and (item.get_vnum()!=0 and (item.get_vnum()..","..item.get_count()) or ("0,0")) or (CRAFT.."|"..(item.get_vnum()!=0 and (item.get_vnum()..","..item.get_count()) or ("0,0"))))
					else
						syschat("Something went Wrong!")
						cmdchat("CraftingSystem craftitem/0/0")
						return
					end
				else
					CRAFT = (i==1 and ("0,0") or CRAFT.."|0,0")
				end
			end
			-- Aufbau
			-- erste Reihe des Craftfeldes
			-- 0,0,0 (von oben nach unten)
			-- zweite Reihe des Craftfeldes
			-- 0,0,0 (von oben nach unten)
			-- dritte Reihe des Craftfeldes
			-- 0,0,0 (von oben nach unten)
			local CRAFTING_POSSIBILITIES = {
											["90012,1|90012,1|0,0|0,0|90012,1|0,0|0,0|0,0|0,0"] = {27600, 1} -- laut dem wird einmal des holz zum lager
										}
			if INPUT[1]=="itemin" then
				if CRAFTING_POSSIBILITIES[CRAFT] then
					cmdchat("CraftingSystem craftitem/"..CRAFTING_POSSIBILITIES[CRAFT][1].."/"..CRAFTING_POSSIBILITIES[CRAFT][2])
				else
					cmdchat("CraftingSystem craftitem/0/0")
				end
			elseif INPUT[1]=="craftplease" then
				if CRAFTING_POSSIBILITIES[CRAFT] then
					local InWindow, Cells = split(CRAFT, "|"), split(INPUT[2], ",")
					for i=1, table.getn(InWindow), 1 do InWindow[i] = split(InWindow[i], ",")
					end
					for i=1, table.getn(InWindow), 1 do
						if Cells[i]!="-1" and InWindow[i][1]!="0" and InWindow[i][2]!="0" then
							if item.select_cell(tonumber(Cells[i])) then
								if item.get_vnum()!=tonumber(InWindow[i][1]) or item.get_count()!=tonumber(InWindow[i][2]) then
									cmdchat("CraftingSystem craftitem/0/0")
									syschat("Something went wrong!#1")
									return
								end
							else
								cmdchat("CraftingSystem craftitem/0/0")
								syschat("Something went wrong!#2")
								return
							end
						end
					end
					for i=1, table.getn(InWindow), 1 do
						if Cells[i]!="-1" and InWindow[i][1]!="0" and InWindow[i][2]!="0" then
							if item.select_cell(tonumber(Cells[i])) then
								item.remove() 
							else
								cmdchat("CraftingSystem craftitem/0/0")
								syschat("Wrong!")
								return
							end
						end
					end
					pc.give_item2(CRAFTING_POSSIBILITIES[CRAFT][1], CRAFTING_POSSIBILITIES[CRAFT][2])
					cmdchat("CraftingSystem itemclear/")
				else
					cmdchat("CraftingSystem craftitem/0/0")
				end
			end
		end
	end
end
Der Npc ist ansprechbar aber der Craftingfenster wird nicht geöffnet.

Mfg.
PHP Code:
quest craftingwindowopen begin  
    state start begin  
        when 20369.chat
."Crafting" begin  
            say_title
(mob_name(npc.get_race())..":")  
            
say("Alle Crafting Rezepte findest du in unserem WiKi.")  
            
say("Möchtest du jetzt Craften?")  
            if 
select("Ja""Nein") == 2 then return end 
            setskin
(NOWINDOW
            
npc.open_shop("1"
            
cmdchat("OpenCraftingSystem")  
        
end 
Du sollst bei cube_open nicht die Quest rein hauen,sondern die Vnum von dem Shop der geöffnet werden soll.Hab jetzt eine 1 rein geschrieben.
07/07/2015 14:00 rollback#11741
Quote:
Originally Posted by Zaturix View Post
PHP Code:
quest craftingwindowopen begin  
    state start begin  
        when 20369.chat
."Crafting" begin  
            say_title
(mob_name(npc.get_race())..":")  
            
say("Alle Crafting Rezepte findest du in unserem WiKi.")  
            
say("Möchtest du jetzt Craften?")  
            if 
select("Ja""Nein") == 2 then return end 
            setskin
(NOWINDOW
            
npc.open_shop("1"
            
cmdchat("OpenCraftingSystem")  
        
end 
Du sollst bei cube_open nicht die Quest rein hauen,sondern die Vnum von dem Shop der geöffnet werden soll.Hab jetzt eine 1 rein geschrieben.
npc.open_shop öffnet einen shop, aber nicht das Craftingfenster!
Ausserdem sollte man keinen String übergeben wenn es kein String ist ;)
07/07/2015 15:28 Langeweile™#11742
Quote:
Originally Posted by Sensi
npc.open_shop öffnet einen shop, aber nicht das Craftingfenster!
Ausserdem sollte man keinen String übergeben wenn es kein String ist
Und was muss ich eintragen damit das Crafting Window geöffnet wird?

Mfg.
07/07/2015 15:51 Thetobinator21#11743
Guten Tag,
ich kann das Item nicht aus machen und ich , möchte gerne das man sich zeiten aussuchen kann (10min, 30min, 1h)

07/08/2015 15:49 JiiT4ck#11744
Hallo Leute :)

Benötige Hilfe bei einer Starterset Quest!
Bekomme beim compilen immer
Error occured on compile Starterset.quest!

Könnt ihr mir helfen die Quest zu korrigieren?


Quote:
quest give_basic_weapon begin
state start begin
when login begin
local starterset = {
["Items"] = {
["Klassen"] = {
["Krieger"] = {
-- {Itemid, Anzahl},
{19, 1},
{11209, 1},
{12209, 1}
},
["Ninja"] = {
-- {Itemid, Anzahl},
{1009, 1},
{11409, 1},
{12349, 1}
},
["Sura"] = {
-- {Itemid, Anzahl},
{19, 1},
{11609, 1},
{12489, 1}
},
["Schamane"] = {
-- {Itemid, Anzahl},
{7009, 1},
{11809, 1},
{12629, 1}
}
},
["Alle"] = {
--{Itemid, Anzahl},
{72726, 1},
{72730, 1},
{72702, 1},
{71027,200},
{71028,200},
{71029,200},
{71030,200},
{71050,200},
{27112,200},
{70038, 1},
{15009, 1},
{17009, 1},
{16009, 1},
{14009, 1},
{13009, 1}
}
},
["Geld"] = 100000,
["Pferdelevel"] = 21,
["Fertigkeiten"] = {
["Klassen"] = {
["Krieger"] = {
-- {Skillid, Level},
},
["Ninja"] = {
-- {Skillid, Level},
},
["Sura"] = {
-- {Skillid, Level},
},
["Schamane"] = {
-- {Skillid, Level},
}
},
["Alle"] = {
-- {Skillid, Level},
{131, 50},
{126, 50},
{127, 50},
{128, 50},
{130, 12}
}
},
["Text"] = {
["Titel"] = "Willkommen auf .......",
["Text"] = {
-- "Das Team begrüßt dich rechtherzlich!",
"Unsere Hompage und unser Forum findest du unter:",
"HP: [Only registered and activated users can see links. Click Here To Register...] Forum: www.-------",
"Wir wünschen dir viel Vergnügen und Alles Gute!",
"auf ------!"
}
}
}

--------------------------------------------------------------------------------------------------
---------------------------------- Ab hier nichts mehr ändern !!! --------------------------------
--------------------------------------------------------------------------------------------------

local set, text, klassentab = starterset, starterset["Text"], {
[0] = "Krieger",
[1] = "Ninja",
[2] = "Sura",
[3] = "Schamane"
}
table.foreach(set["Items"]["Klassen"][klassentab[pc.get_job()]], function(i, p)
pc.give_item2(p[1], p[2])
end)
table.foreach(set["Items"]["Alle"], function(i, p)
pc.give_item2(p[1], p[2])
end)
pc.give_gold(set["Geld"])
horse.set_level(set["Pferdelevel"])
table.foreach(set["Fertigkeiten"]["Klassen"][klassentab[pc.get_job()]], function(i, p)
pc.set_skill_level(p[1], p[2])
end)
table.foreach(set["Fertigkeiten"]["Alle"], function(i, p)
pc.set_skill_level(p[1], p[2])
end)
say_titel(text["Titel"])
say("")
table.foreach(text["Text"], function(i, p)
say(p)
end)
set_state( __COMPLETE__ )
end
end

state __COMPLETE__ begin
end
end
07/08/2015 16:49 Langeweile™#11745
Quote:
Originally Posted by JiiT4ck
Hallo Leute

Benötige Hilfe bei einer Starterset Quest!
Bekomme beim compilen immer
Error occured on compile Starterset.quest!

Könnt ihr mir helfen die Quest zu korrigieren?

Stet da auch warum das Compilen nicht klappt?
Ohne den Kompletten Fehlercode muss man raten...
Musst du vilt. was in die quest_functions eintragen?

Mfg.