Jump to content

Quest - Fully Editable Mission


Braxy

Recommended Posts

  • Bronze

M2 Download Center

This is the hidden content, please
( Internal )

Hi, since i have never released anything here, i tought it would be a great start releasing this quest.

As you well know i have a LUA Service topic here and even tho this quest is not much about LUA because of course its based on Metin2 functions it's quite alright for you to take a first impresion.

 

Link: 

This is the hidden content, please

 

Best regards,

Braxy.

  • Metin2 Dev 144
  • kekw 1
  • Eyes 2
  • Dislove 3
  • Sad 3
  • Think 1
  • Confused 2
  • Scream 1
  • Lmao 1
  • Good 41
  • Love 4
  • Love 77

As long as I'll be a threat for you , i will always be your target :3

Link to comment
Share on other sites

  • 3 years later...
On 7/12/2019 at 11:28 PM, Braxy said:

M2 Download Center

This is the hidden content, please
( Internal )

Hi, since i have never released anything here, i tought it would be a great start releasing this quest.

As you well know i have a LUA Service topic here and even tho this quest is not much about LUA because of course its based on Metin2 functions it's quite alright for you to take a first impresion.

 

Link: 

This is the hidden content, please

 

Best regards,

Braxy.

 

 

 

 

i like the coding and i install it but when i login ingame i see nothing . only blacksmith has .chat 

https://metin2.download/picture/ZfdmIbf33NPqs5WfNFlrYi6i47kGW5Vy/.jpg

 

i just changed the reward and required mob

here is  a sample of my quest 

 

quest lvl_110 begin
	state start begin
		function returnData()
			local data = {
				["missionData"] = {["missionName"] = "Player Mission I", ["missionFlag"] = "playerMissionKill"},
				
				["timeToComplete"] = {true, time_min_to_sec(60)},
				["requireData"] = {{6856, 5}, {6895, 5}},
				
				["playerRewards"] = {["itemVnum"] = {83006, 30962, 30334}, ["itemCount"] = {1, 1, 1}}
			};
			
			return data;
		end
		
		function initializeData()
			local data = playerMission.returnData();
			
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				pc.setqf(strFlag, data["requireData"][index][2]);
			end
			
			if (data["timeToComplete"][1]) then
				return pc.setqf("playerMissionTime", get_time() + data["timeToComplete"][2]);
			end return true;
		end
		
		function initializeInfo()
			local data = playerMission.returnData();
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				q.set_counter(string.format("Remaining %s:", mob_name(data["requireData"][index][2])), pc.getqf(strFlag));
			end
			
			if (data["timeToComplete"][1]) then
				if (pc.getqf("playerMissionTime") < get_time()) then
					return false;
				end
				q.set_clock("Remaining Time:", pc.getqf("playerMissionTime") - get_time());
			end
			
			return true;
		end
		
		function isKillableMonster()
			local data = playerMission.returnData();
			local npcRace = npc.get_race();
			
			for index in data["requireData"] do
				if (data["requireData"][index][1] == npcRace) then
					return true;
				end
			end return false;
		end
		
		when login or enter or levelup begin
			local data = playerMission.returnData();
			send_letter(data["missionData"]["missionName"]);
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title(string.format("%s:[ENTER]", data["missionData"]["missionName"]))
			say("Talk to Blacksmith if you want to accept the mission.")
		end
		
		when 20016.chat."The Player Mission" begin
			say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
			say("Do you wish to accept the mission?")
			if (select("Yes, i do", "No, i don't") == 1) then
				playerMission.initializeData();
				set_state("run");
				say("Your mission has been updated.")
			end
		end
	end
	
	state run begin
		when login or enter begin
			local data = playerMission.returnData();
			local initializeMissionInfo = playerMission.initializeInfo();
			
			if (not initializeMissionInfo) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			send_letter(data["missionData"]["missionName"]);
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title(data["missionData"]["missionName"])
			if (pc.getqf("playerMissionTime") < get_time()) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			say("You still must kill:[ENTER]")
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				if (pc.getqf(strFlag) > 0) then
					say_reward(string.format("- %s - x%d", mob_name(data["requireData"][index][1]), pc.getqf(strFlag)))
				end
			end
		end
		
		when kill with playerMission.isKillableMonster() begin
			local data = playerMission.returnData();
			local npcRace = npc.get_race();
			local isMissionOver = true;
			
			if (pc.getqf("playerMissionTime") < get_time()) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			local npcFlag = string.format("%s_%d", data["missionData"]["missionFlag"], npcRace);
			if (pc.getqf(npcFlag) < 1) then
				return;
			end
			
			pc.setqf(npcFlag, pc.getqf(npcFlag) - 1);
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				
				if (pc.getqf(strFlag) > 0) then
					isMissionOver = false;
				end
			end
			
			if (isMissionOver) then
				set_state("reward");
			end
		end
	end
	
	state reward begin
		when login or enter begin
			send_letter("*Player Mission Reward");
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title("*Player Mission Reward")
			say("Go back to Blacksmith to take your reward.")
		end
		
		when 20016.chat."Your reward!" begin
			local data = playerMission.returnData();
			
			say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
			say("You have succesfully completed the mission.[ENTER]Your reward is:")
			
			for index in data["playerRewards"]["itemVnum"] do
				pc.give_item2(data["playerRewards"]["itemVnum"][index], data["playerRewards"]["itemCount"][index]);
				say_reward(string.format("- %s - %d", item_name(data["playerRewards"]["itemVnum"][index]), data["playerRewards"]["itemCount"][index]))
			end
			
			set_state("done");
		end
	end
	
	state done begin
		when login or enter begin
			clear_letter();
			q.done();
		end
	end
end

 

Edited by Metin2 Dev International
Core X - External 2 Internal
  • Love 1
Link to comment
Share on other sites

  • Premium
3 hours ago, SlayerPro said:

 

 

 

 

i like the coding and i install it but when i login ingame i see nothing . only blacksmith has .chat 

https://metin2.download/picture/ZfdmIbf33NPqs5WfNFlrYi6i47kGW5Vy/.jpg

 

i just changed the reward and required mob

here is  a sample of my quest 

 

quest lvl_110 begin
	state start begin
		function returnData()
			local data = {
				["missionData"] = {["missionName"] = "Player Mission I", ["missionFlag"] = "playerMissionKill"},
				
				["timeToComplete"] = {true, time_min_to_sec(60)},
				["requireData"] = {{6856, 5}, {6895, 5}},
				
				["playerRewards"] = {["itemVnum"] = {83006, 30962, 30334}, ["itemCount"] = {1, 1, 1}}
			};
			
			return data;
		end
		
		function initializeData()
			local data = playerMission.returnData();
			
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				pc.setqf(strFlag, data["requireData"][index][2]);
			end
			
			if (data["timeToComplete"][1]) then
				return pc.setqf("playerMissionTime", get_time() + data["timeToComplete"][2]);
			end return true;
		end
		
		function initializeInfo()
			local data = playerMission.returnData();
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				q.set_counter(string.format("Remaining %s:", mob_name(data["requireData"][index][2])), pc.getqf(strFlag));
			end
			
			if (data["timeToComplete"][1]) then
				if (pc.getqf("playerMissionTime") < get_time()) then
					return false;
				end
				q.set_clock("Remaining Time:", pc.getqf("playerMissionTime") - get_time());
			end
			
			return true;
		end
		
		function isKillableMonster()
			local data = playerMission.returnData();
			local npcRace = npc.get_race();
			
			for index in data["requireData"] do
				if (data["requireData"][index][1] == npcRace) then
					return true;
				end
			end return false;
		end
		
		when login or enter or levelup begin
			local data = playerMission.returnData();
			send_letter(data["missionData"]["missionName"]);
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title(string.format("%s:[ENTER]", data["missionData"]["missionName"]))
			say("Talk to Blacksmith if you want to accept the mission.")
		end
		
		when 20016.chat."The Player Mission" begin
			say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
			say("Do you wish to accept the mission?")
			if (select("Yes, i do", "No, i don't") == 1) then
				playerMission.initializeData();
				set_state("run");
				say("Your mission has been updated.")
			end
		end
	end
	
	state run begin
		when login or enter begin
			local data = playerMission.returnData();
			local initializeMissionInfo = playerMission.initializeInfo();
			
			if (not initializeMissionInfo) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			send_letter(data["missionData"]["missionName"]);
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title(data["missionData"]["missionName"])
			if (pc.getqf("playerMissionTime") < get_time()) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			say("You still must kill:[ENTER]")
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				if (pc.getqf(strFlag) > 0) then
					say_reward(string.format("- %s - x%d", mob_name(data["requireData"][index][1]), pc.getqf(strFlag)))
				end
			end
		end
		
		when kill with playerMission.isKillableMonster() begin
			local data = playerMission.returnData();
			local npcRace = npc.get_race();
			local isMissionOver = true;
			
			if (pc.getqf("playerMissionTime") < get_time()) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			local npcFlag = string.format("%s_%d", data["missionData"]["missionFlag"], npcRace);
			if (pc.getqf(npcFlag) < 1) then
				return;
			end
			
			pc.setqf(npcFlag, pc.getqf(npcFlag) - 1);
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				
				if (pc.getqf(strFlag) > 0) then
					isMissionOver = false;
				end
			end
			
			if (isMissionOver) then
				set_state("reward");
			end
		end
	end
	
	state reward begin
		when login or enter begin
			send_letter("*Player Mission Reward");
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title("*Player Mission Reward")
			say("Go back to Blacksmith to take your reward.")
		end
		
		when 20016.chat."Your reward!" begin
			local data = playerMission.returnData();
			
			say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
			say("You have succesfully completed the mission.[ENTER]Your reward is:")
			
			for index in data["playerRewards"]["itemVnum"] do
				pc.give_item2(data["playerRewards"]["itemVnum"][index], data["playerRewards"]["itemCount"][index]);
				say_reward(string.format("- %s - %d", item_name(data["playerRewards"]["itemVnum"][index]), data["playerRewards"]["itemCount"][index]))
			end
			
			set_state("done");
		end
	end
	
	state done begin
		when login or enter begin
			clear_letter();
			q.done();
		end
	end
end

 

Hi, can you explain the problem you get more thoroughly?

  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

  • Bronze
8 hours ago, SlayerPro said:

 

 

 

 

i like the coding and i install it but when i login ingame i see nothing . only blacksmith has .chat 

https://metin2.download/picture/ZfdmIbf33NPqs5WfNFlrYi6i47kGW5Vy/.jpg

 

i just changed the reward and required mob

here is  a sample of my quest 

 

quest lvl_110 begin
	state start begin
		function returnData()
			local data = {
				["missionData"] = {["missionName"] = "Player Mission I", ["missionFlag"] = "playerMissionKill"},
				
				["timeToComplete"] = {true, time_min_to_sec(60)},
				["requireData"] = {{6856, 5}, {6895, 5}},
				
				["playerRewards"] = {["itemVnum"] = {83006, 30962, 30334}, ["itemCount"] = {1, 1, 1}}
			};
			
			return data;
		end
		
		function initializeData()
			local data = playerMission.returnData();
			
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				pc.setqf(strFlag, data["requireData"][index][2]);
			end
			
			if (data["timeToComplete"][1]) then
				return pc.setqf("playerMissionTime", get_time() + data["timeToComplete"][2]);
			end return true;
		end
		
		function initializeInfo()
			local data = playerMission.returnData();
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				q.set_counter(string.format("Remaining %s:", mob_name(data["requireData"][index][2])), pc.getqf(strFlag));
			end
			
			if (data["timeToComplete"][1]) then
				if (pc.getqf("playerMissionTime") < get_time()) then
					return false;
				end
				q.set_clock("Remaining Time:", pc.getqf("playerMissionTime") - get_time());
			end
			
			return true;
		end
		
		function isKillableMonster()
			local data = playerMission.returnData();
			local npcRace = npc.get_race();
			
			for index in data["requireData"] do
				if (data["requireData"][index][1] == npcRace) then
					return true;
				end
			end return false;
		end
		
		when login or enter or levelup begin
			local data = playerMission.returnData();
			send_letter(data["missionData"]["missionName"]);
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title(string.format("%s:[ENTER]", data["missionData"]["missionName"]))
			say("Talk to Blacksmith if you want to accept the mission.")
		end
		
		when 20016.chat."The Player Mission" begin
			say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
			say("Do you wish to accept the mission?")
			if (select("Yes, i do", "No, i don't") == 1) then
				playerMission.initializeData();
				set_state("run");
				say("Your mission has been updated.")
			end
		end
	end
	
	state run begin
		when login or enter begin
			local data = playerMission.returnData();
			local initializeMissionInfo = playerMission.initializeInfo();
			
			if (not initializeMissionInfo) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			send_letter(data["missionData"]["missionName"]);
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title(data["missionData"]["missionName"])
			if (pc.getqf("playerMissionTime") < get_time()) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			say("You still must kill:[ENTER]")
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				if (pc.getqf(strFlag) > 0) then
					say_reward(string.format("- %s - x%d", mob_name(data["requireData"][index][1]), pc.getqf(strFlag)))
				end
			end
		end
		
		when kill with playerMission.isKillableMonster() begin
			local data = playerMission.returnData();
			local npcRace = npc.get_race();
			local isMissionOver = true;
			
			if (pc.getqf("playerMissionTime") < get_time()) then
				syschat(string.format("You failed mission: %s.", data["missionData"]["missionName"]))
				set_state("done");
				return;
			end
			
			local npcFlag = string.format("%s_%d", data["missionData"]["missionFlag"], npcRace);
			if (pc.getqf(npcFlag) < 1) then
				return;
			end
			
			pc.setqf(npcFlag, pc.getqf(npcFlag) - 1);
			for index in data["requireData"] do
				local strFlag = string.format("%s_%d", data["missionData"]["missionFlag"], data["requireData"][index][1]);
				
				if (pc.getqf(strFlag) > 0) then
					isMissionOver = false;
				end
			end
			
			if (isMissionOver) then
				set_state("reward");
			end
		end
	end
	
	state reward begin
		when login or enter begin
			send_letter("*Player Mission Reward");
		end
		
		when button or info begin
			local data = playerMission.returnData();
			
			say_title("*Player Mission Reward")
			say("Go back to Blacksmith to take your reward.")
		end
		
		when 20016.chat."Your reward!" begin
			local data = playerMission.returnData();
			
			say_title(string.format("%s:[ENTER]", mob_name(npc.get_race())))
			say("You have succesfully completed the mission.[ENTER]Your reward is:")
			
			for index in data["playerRewards"]["itemVnum"] do
				pc.give_item2(data["playerRewards"]["itemVnum"][index], data["playerRewards"]["itemCount"][index]);
				say_reward(string.format("- %s - %d", item_name(data["playerRewards"]["itemVnum"][index]), data["playerRewards"]["itemCount"][index]))
			end
			
			set_state("done");
		end
	end
	
	state done begin
		when login or enter begin
			clear_letter();
			q.done();
		end
	end
end

 

Hi, just add me over discord and i'll happly help you ^^

As long as I'll be a threat for you , i will always be your target :3

Link to comment
Share on other sites

6 hours ago, Syreldar said:

Hi, can you explain the problem you get more thoroughly?

i add it and nothing happens ingame even if i made new character and i did add a level for the quest it just not working 

 

 

 

 

1 hour ago, Braxy said:

Hi, just add me over discord and i'll happly help you ^^

 i added you thank you guys in advance ❤️ 

6 hours ago, Syreldar said:

Hi, can you explain the problem you get more thoroughly?

Spoiler
SYSERR: Jul 11 15:05:33 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:05:33 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:07:59 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:07:59 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:08:50 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:08:50 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:09:16 :: RunState: LUA_ERROR: [string "lvl_110"]:4: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:09:16 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:09:43 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:09:43 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:11:21 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:11:21 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:24:59 :: RunState: LUA_ERROR: [string "lvl_110"]:4: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:24:59 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:26:43 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:26:43 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:38:11 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:38:11 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click

 

 

Link to comment
Share on other sites

  • Premium
2 hours ago, SlayerPro said:

i add it and nothing happens ingame even if i made new character and i did add a level for the quest it just not working 

 

 

 

 

 i added you thank you guys in advance ❤️ 

  Hide contents
SYSERR: Jul 11 15:05:33 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:05:33 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:07:59 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:07:59 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:08:50 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:08:50 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:09:16 :: RunState: LUA_ERROR: [string "lvl_110"]:4: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:09:16 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:09:43 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:09:43 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:11:21 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:11:21 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:24:59 :: RunState: LUA_ERROR: [string "lvl_110"]:4: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:24:59 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:26:43 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:26:43 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click
SYSERR: Jul 11 15:38:11 :: RunState: LUA_ERROR: [string "lvl_110"]:1: attempt to index global `playerMission' (a nil value)
SYSERR: Jul 11 15:38:11 :: WriteRunningStateToSyserr: LUA_ERROR: quest lvl_110.start click

 

 

Your quest is called "lvl_110", therefore function calls refer to that "class".
You have 2 solutions:

1. Substitute all "playerMission." occurrences with "lvl_110."
2. Call the quest "playerMission" instead of "lvl_110"

But I assume there's a reason why you called the quest "lvl_110", so the first option is the go-to.

Edited by Syreldar
  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites

1 hour ago, caanmasu said:

@SlayerPro

Change
 

quest lvl_110 begin

By:
 

quest playerMission begin

 

i will try now thanx in advance

 

57 minutes ago, Syreldar said:

Your quest is called "lvl_110", therefore function calls refer to that "class".
You have 2 solutions:

1. Substitute all "playerMission." occurrences with "lvl_110."
2. Call the quest "playerMission" instead of "lvl_110"

But I assume there's a reason why you called the quest "lvl_110", so the first option is the go-to.

 

 

i will try now thanx in advance

 

1 hour ago, Syreldar said:

Your quest is called "lvl_110", therefore function calls refer to that "class".
You have 2 solutions:

1. Substitute all "playerMission." occurrences with "lvl_110."
2. Call the quest "playerMission" instead of "lvl_110"

But I assume there's a reason why you called the quest "lvl_110", so the first option is the go-to.

 

1 hour ago, caanmasu said:

@SlayerPro

Change
 

quest lvl_110 begin

By:
 

quest playerMission begin

 

 

 

both is correct 

now its working 100% 

thank you very much 

 

one last issue how can i make it starts only on level 110 please 

 

Link to comment
Share on other sites

  • Premium

Substitute:

quest lvl_110 begin
	state start begin

with:

quest lvl_110 begin
	state start begin
		when login or levelup with pc.get_level() >= 110 begin
			set_state(in_mission);
		end -- when
	end -- state

	state in_mission begin

 

 

Some more unrelated advice:

1. Substitute:

		when login or enter or levelup begin
			local data = playerMission.returnData();
			send_letter(data["missionData"]["missionName"]);
		end

1. With:

		when letter begin
			local data = playerMission.returnData();
			send_letter(data["missionData"]["missionName"]);
		end



2. Substitute:

	state run begin
		when login or enter begin

2. With:

	state run begin
		when letter begin

 

3. Substitute:

	state reward begin
		when login or enter begin

3. With:

	state reward begin
		when letter begin

 

4. Substitute:

			set_state("done");
		end
	end
	
	state done begin
		when login or enter begin
			clear_letter();
			q.done();
		end
	end

4. With:

			clear_letter();
			set_state("done");
		end
	end
	
	state done begin
	end
end

 

Edited by Syreldar
  • Good 1
  • Love 1

 

"Nothing's free in this life.

Ignorant people have an obligation to make up for their ignorance by paying those who help them.

Either you got the brains or cash, if you lack both you're useless."

Syreldar

Link to comment
Share on other sites



×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.