Jump to content

how connect Phyton->Quest


Recommended Posts

I need connect execute a quest from phyton. 
 
I am using:
 
import event
event.QuestButtonClick(1)

But I have a problem that is.. I don't have index of the quest I have a name.

test.quest

the content of the quest is:

quest test begin
	state start begin
		when login begin
			set_state(open )
		end
	end
	state open begin
		when button begin
			chat("I am here!!")
		end
	end
end

when I used the index of the quest (1 because is in first row of locale_list) everything work fine. But... I think all the time index of the quest will not be 1. If for some reason the change of position on the list would not work. I tried to find the index of the quest with the name of it but I could not.

 

I tried using this:

import event
import quest
event.QuestButtonClick(quest.GetQuestIndex("test.quest"))

but does not work and get this error....

SYSERR: Jan 25 23:53:02 :: OnInfo: QUEST no quest by (quest 2147483647)

any ideas or help?

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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.