Jump to content

Escape / Unstuck Option


Recommended Posts

  • Honorable Member

This is the hidden content, please

This is the hidden content, please

.jpg

Synchronizes the character's position with the server and can be used to free them if they get stuck.
If there is no available position within the available distance, the character will be warped to the village. 

.

  • Metin2 Dev 84
  • Eyes 1
  • Scream 1
  • Good 14
  • Love 5
  • Love 34
Link to comment
Share on other sites

  • Active Member

Thanks @ Owsap i'm fixing button, but work, nice released thanks!

72ab56fbbb38c99dbb9714cf355fd310.gif

edit1: if someone don't have 

Quote

    def __del__(self):
        ui.ScriptWindow.__del__(self)
        if app.OWSAP_ESCAPE:
            del self.tooltip

you cand add on def Destroy:

Quote

    def Destroy(self):
        self.ClearDictionary()
        
        if self.gameOptionDlg:
            self.gameOptionDlg.Destroy()
            
        if self.systemOptionDlg:
            self.systemOptionDlg.Destroy()
       if app.OWSAP_ESCAPE:     
             del self.tooltip

        self.__Initialize()

 

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

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Honorable Member
18 minutes ago, nazox said:

Thanks @ Owsap i'm fixing button, but work, nice released thanks!

I just updated the repository, there was one thing missing for the button to work, everything should be fine now.

Edited by Owsap
  • Love 1
Link to comment
Share on other sites

MIssing some functions that are used by uiEscapePopup.py
uicommon.py

class QuestionDialog(ui.ScriptWindow):

	def GetTextSize(self):
		if self.textLine:
			return self.textLine.GetTextSize()

		return (0,0)
              
	def SetLineHeight(self, Height):
		self.textLine.SetLineHeight(Height)

also player.SHOW_UI_WINDOW_LIMIT_RANGE is missing

	def __EscapePopupRangeCheck(self):
		SHOW_UI_WINDOW_LIMIT_RANGE = 1000
		(x, y, z) = player.GetMainCharacterPosition()
		# if abs(x - self.escape_window_open_x) > player.SHOW_UI_WINDOW_LIMIT_RANGE or abs(y - self.escape_window_open_y) > player.SHOW_UI_WINDOW_LIMIT_RANGE:
		if abs(x - self.escape_window_open_x) > SHOW_UI_WINDOW_LIMIT_RANGE or abs(y - self.escape_window_open_y) > SHOW_UI_WINDOW_LIMIT_RANGE:
			chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_ESCAPE_FAR_DISTANCE)
			self.Close()

 

Link to comment
Share on other sites

  • Active Member

Hello again @ Owsap again thanks for the system work very great:

fc6d205ac5ea8186b845c079bdd97ff4.gif

But maybe people have a few problems, because don't have functions or like that.

The first, you need to change certain functions as mentioned @Dominic. in Uicommon.py:

Spoiler

class QuestionDialog(ui.ScriptWindow): def GetTextSize(self): if self.textLine: return self.textLine.GetTextSize() return (0,0) def SetLineHeight(self, Height): self.textLine.SetLineHeight(Height)

and uiEscapePopoup.py:

Spoiler

def __EscapePopupRangeCheck(self): SHOW_UI_WINDOW_LIMIT_RANGE = 1000 (x, y, z) = player.GetMainCharacterPosition() # if abs(x - self.escape_window_open_x) > player.SHOW_UI_WINDOW_LIMIT_RANGE or abs(y - self.escape_window_open_y) > player.SHOW_UI_WINDOW_LIMIT_RANGE: if abs(x - self.escape_window_open_x) > SHOW_UI_WINDOW_LIMIT_RANGE or abs(y - self.escape_window_open_y) > SHOW_UI_WINDOW_LIMIT_RANGE: chat.AppendChat(chat.CHAT_TYPE_INFO, localeInfo.OPTION_ESCAPE_FAR_DISTANCE) self.Close()

If you have the problem with 

Spoiler

net.SendCommandPacket("/escape")

Change with:

Spoiler

net.SendChatPacket("/escape")

If you lost some functions like (SetLineHeight, GetLineHeight, etc) you need add the system (or functions) from here:

 

(you can use this version or @ Mali version).

Thanks again :).

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

KH.jpg

Nicks: Nazox Krone Nagato Yahiko Yakiro
Proyecto: Trabajando en el.
Compañeros & firma: DreamHQ  - 2009-2015 [Nostalgia]

Link to comment
Share on other sites

  • Honorable Member

Repository Updated

Changed QuestionDialog to QuestionDialog2.

This change is due to the multi-line token which is not supported by all clients.
To improve compatibility, the dialog message has been split into two tokens.
The issue with the player's distance while the dialogue is open has also been fixed.

Thanks for testing and reporting back.

I recommend taking a look at all the code in the repository as I amended some issues on the first commit.

Edited by Owsap
  • Metin2 Dev 9
  • Love 6
Link to comment
Share on other sites

  • 2 months later...

Those function are doing the same thing?

bool CPythonPlayer::IsDead()
{
	CInstanceBase* pMainInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
	if (!pMainInstance)
		return false;

	return pMainInstance->IsDead();
}

bool CPythonPlayer::IsPoly()
{
	CInstanceBase* pMainInstance = CPythonCharacterManager::Instance().GetMainInstancePtr();
	if (!pMainInstance)
		return false;

	return pMainInstance->IsPoly();
}

 

Link to comment
Share on other sites

  • 1 month later...

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.