Jump to content

Recommended Posts

Function pc.change_empure not return 999 for successful change empire. So problem in change empire, some players(some can change empire successful) cannot do it. Quest doesn't give any error, with test I check what quest return "ret" value not 999, and does not fall into the condition. 

Player info: single(not marriage), no guild, above level 70, 1 character per account

Where can be problem?

Edited by tester12
Format
Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

5 hours ago, WeedHex said:

Show the quest.

quest reset_scroll begin
	state start begin
		when 71054.use begin
			local yang = 1000000
			local lvl = 50
			say_title(" Change empire ")
			if pc.is_engaged() then
				say(" You cannot change empire if you are married.[ENTER] ")
				return
			end
			if pc.is_married() then
				say(" You cannot change your empire if you are married.[ENTER] ")
				return
			end
			if pc.is_polymorphed() then
				say(" You cannot change empire if you in polymorph.[ENTER] ")
				return
			end
			if pc.has_guild() then
				say(" You cannot change empire if you are in a guild.[ENTER] ")
				return
			end
			say(" Continuing, you will change your empire. ")
			say(" Are you sure you want to continue?[ENTER] ")
			say_reward(" Price: "..yang.." yang ")
			say_reward(" Min level: "..lvl.." [ENTER] ")
			local b = select(" Yes ", " No ")
			if b == 2 then
				return
			end
			say_title(" Change empire ")
			if pc.get_gold() < yang then
				say(" You don`t have yang.[ENTER] ")
				return
			end
			if pc.get_level() < liv then
				say(" Your lvl is small.[ENTER] ")
				return
			end
			say( "Choose your empire:[ENTER] ")
			local emp = select(" Red ", " Yellow ", " Blue ", " Close ")
			if emp == 4 then
				return
			end
			local ret = pc.change_empire(emp)
			if ret == 999 then -- this condition does not work, ret 999 does not return from the server source 
				pc.change_gold(-yang)
				pc.remove_item(item.get_vnum(), 1)
				say_title(" Сhange empire ")
				say(" The change is complete.[ENTER] ")
			elseif ret == 1 then
				say_title(" Сhange empire ")
				say(" You cannot choose your own empire.[ENTER] ")
			elseif ret == 2 then
				say_title(" Change empire ")
				say("")
				say(" Impossible to change empire because you or other members ")
				say(" on your account are in the guild. ")
			elseif ret == 3 then
				say_title(" Сhange empire ")
				say("")
				say(" Impossible to change empire because you were married ")
				say(" less than 24 hours ago.[ENTER] ")
			end			
		end
	end
end

 

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • 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.