Jump to content

Quest problem with when1231.chat."test" with pc.getqf("test") == 0


Recommended Posts

Hello, i have a problem with quest....

 

example my quest:

quest test begin
	state start begin
		when 1231.chat."test" with pc.getqf("test") == 0 begin
			pc.setqf("test",1)
		end
	end
end

when you change character etc 

and you have this on database "test" == 1

but in game you still see chat "test"

  • Love 1
Link to comment
Share on other sites

3 minuty temu, Shogun napisał:

It's cached, if you want to change it on the database, you will have to log off the character first, and possibly wait some minutes as well. Or restart the server.

you wrong understand me...

1.click on test chat-> it send to database "test" value 1.

and dissapear chat."test"

but if you change character or logout or server restart it will be always showed because allways pc.getqf("test") will return null (0) but on database you have 1

Link to comment
Share on other sites

21 minut temu, metin2team napisał:

check your syserr/syslog because it has something to do with your player.quest table either crashed or corrupted.

sysser is clean

 

syslog when i click on npc i got this

 

Oct 25 11:28:52 :: OnClick Stable Man[vnum 20349 ServerUniqueID 14621, pid 0] by Tester

 

maybe mainline_released have bug with this function in source?

 

i can without problem use it 

if pc.getqf("test") == 0 then

--todo

elseif pc.getqf("test") == 1 then

--todo

end

but i can't use it here:

when 1231.chat."test" with pc.getqf("test") == 0 begin

because always return null

 

i think i can fix syslog return pid 0

by change this:

sys_log(0, "OnClick %s[vnum %d ServerUniqueID %d, pid %d] by %s", GetName(), GetRaceNum(), vid, GetPlayerID(), pkChrCauser->GetName());

change to this:

sys_log(0, "OnClick %s[vnum %d ServerUniqueID %d, pid %d] by %s", GetName(), GetRaceNum(), vid, ch->GetPlayerID(), pkChrCauser->GetName());

but this is nothing to quest function.

Link to comment
Share on other sites

Acum 8 ore, Traceur3RUN a spus:

Hello, i have a problem with quest....

 

example my quest:


quest test begin
	state start begin
		when 1231.chat."test" with pc.getqf("test") == 0 begin
			pc.setqf("test",1)
		end
	end
end

when you change character etc 

and you have this on database "test" == 1

but in game you still see chat "test"

Even if you use q.done() in your quest?

I mean: 

quest test begin
	state start begin
		when 1231.chat."test" with pc.getqf("test") == 0 begin
			pc.setqf("test",1)
			q.done()
		end
	end
end

 

Link to comment
Share on other sites

  • 4 years later...

I had this problem as well but it work for me when you put pc.getqf("") in if.
when xxx.chat."xx" with pc.getqf("xx") == 1 begin   - this works once, when you escape and try to chat again it will disappear but in data you still have flag xx ==1

when xxx.chat."xx" begin   ----this work all the time for me, 
    if pc.getqf("xx") == 1 then
else
end

 

maybe something is wrong when you put quest flag check with "when" and it stop reading it.

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

Announcements



×
×
  • 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.