Jump to content

Quest Problem with when 1231.chat."..pc.get_level().."


Go to solution Solved by VegaS™,

Recommended Posts

52 minuty temu, Chyu ^^ napisał:

For example, if you are level 24 and you click on NPC it gives you this output:

l---------------------l
l         24          l
l---------------------l

l---------------------l
l       Close      l
l---------------------l

Am I right?

as button right,

 

40 minut temu, Fire napisał:

quest levelQuest begin
	state start begin
		when 1231.chat."Show level" with pc.get_level() >= 21 begin
			say("Lv.: "..pc.get_level().."")
		end
	end
end

 

hahahaha, you are kidding me? check first post.

Link to comment
Share on other sites

  • Bot

I'm not sure if it is possible without editing a system.

I currently can't test it but have you tried to put it there without quotation marks? As I think it will return an error.
I mean this:

quest levelQuest begin
	state start begin
		when 1231.chat.(pc.get_level()) begin
			say_title("Test")
		end
	end
end

 

  • Sad 1

english_banner.gif

Link to comment
Share on other sites

16 minutes ago, Traceur3RUN said:

as button right,


My solution:

quest showlevel begin
state start begin
when 9010.chat."Your level: #PlayerGetLevel" begin
say(""..pc.get_level().."")
end
end
end


Python client script:

root->uiquest.py
Search:
 

def AppendQuestion(self, name, idx):

and replace

if not self.btnAnswer:
			return
		import player
		import string
		level = str(player.GetStatus(player.LEVEL))
		new_name = string.replace(name, '#PlayerGetLevel', level)
		self.btnAnswer[idx].SetText(new_name)
		x, y= self.btnAnswer[idx].GetGlobalPosition()

like that:

work1.PNG

Result:

result.PNG


^_^

Edited by Metin2 Dev
Core X - External 2 Internal
  • Love 3

I completely abandoned working on the files for this game. I do not respond to private messages.

.png

Link to comment
Share on other sites

  • Forum Moderator
  • Solution

That's the single method which is correctly.

c5ce630f7703c1a66e42f33d825b31e8.gif

quest test_quest begin
	state start begin
		when 20091.chat.string.format("DBG: name(%s), level(%d).", pc.get_name(), pc.get_level()) begin
			say_title("I'm a potato!")
		end
	end
end

New quest core: /src/share/locale/germany/quest < qc

Edited by Metin2 Dev
Core X - External 2 Internal
  • Metin2 Dev 1
  • Good 2
  • Love 4
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



  • Similar Content

  • Activity

    1. 0

      Moving server from FreeBSD 11.2 to 13.2 - lib needed

    2. 0

      I just implemented some costumes and they are not visible

    3. 0

      Skill Tree Problem

    4. 97

      Ulthar SF V2 (TMP4 Base)

    5. 5

      Client Crashes through Offline Shop (Ikarus)

    6. 5

      VIVY-WORLD2 - FARM TO THE TOP

    7. 0

      ToolTip Bug?

    8. 0

      Skill tree build erorr

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • 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.