antiblock
Rodnia | Alpha & Omega

Owsap

Membro
  • Content Count

    231
  • Joined

  • Last visited

  • Days Won

    9

Posts posted by Owsap


  1. Aqui tens um exemplo, espero que te ajude.
    54b1f673f10351f16269da49b38b489a.gif

    #
    # Title: Expanded Window
    # Date: 2021.03.16
    # Author: Owsap
    
    import app
    import ui
    
    BUTTON_COUNT = 4
    
    class TestWindow(ui.BoardWithTitleBar):
    	def __init__(self):
    		ui.BoardWithTitleBar.__init__(self)
    		self.isLoaded = False
    		self.btnExpanded = False
    		self.btnList = []
    		if not self.isLoaded:
    			self.__LoadBoard()
    
    	def __del__(self):
    		ui.BoardWithTitleBar.__del__(self)
    
    	def __LoadBoard(self):
    		self.SetSize(95, 210)
    		self.SetCenterPosition()
    		self.AddFlag('movable')
    		self.SetTitleName("Test")
    
    		self.SetCloseEvent(self.Close)
    
    		textLineGuide = ui.TextLine()
    		textLineGuide.SetParent(self)
    		textLineGuide.SetPosition(45, 185)
    		textLineGuide.SetText(".")
    		textLineGuide.Show()
    		self.textLineGuide = textLineGuide
    
    		btnExpand = ui.Button()
    		btnExpand.SetParent(self)
    		btnExpand.SetUpVisual("d:/ymir work/ui/public/small_button_01.sub")
    		btnExpand.SetOverVisual("d:/ymir work/ui/public/small_button_02.sub")
    		btnExpand.SetDownVisual("d:/ymir work/ui/public/small_button_03.sub")
    		btnExpand.SetText("+")
    		btnExpand.SetPosition(25, 160)
    		btnExpand.SetEvent(self.__OnClickExpand)
    		btnExpand.Show()
    		self.btnExpand = btnExpand
    
    		(xLocal, yLocal) = self.btnExpand.GetLocalPosition()
    
    		btnGroup = ui.Window()
    		btnGroup.SetParent(self)
    		btnGroup.SetPosition(xLocal, yLocal - 0 - (30 * BUTTON_COUNT))
    		btnGroup.SetSize(40, 30 * BUTTON_COUNT)
    		btnGroup.Hide()
    		self.btnGroup = btnGroup
    
    		for btnIdx in xrange(BUTTON_COUNT):
    			btn = ui.Button()
    			btn.SetParent(self.btnGroup)
    			btn.SetUpVisual("d:/ymir work/ui/public/small_button_01.sub")
    			btn.SetOverVisual("d:/ymir work/ui/public/small_button_02.sub")
    			btn.SetDownVisual("d:/ymir work/ui/public/small_button_03.sub")
    			btn.SetText("{}".format(btnIdx))
    			btn.SetPosition(0, (30 * btnIdx))
    			btn.SetEvent(lambda arg = btnIdx: self.__OnClickExpandedBtn(arg))
    			btn.Show()
    			self.btnList.append(btn)
    
    	def __OnClickExpand(self):
    		if not self.btnExpanded:
    			self.btnExpanded = True
    			self.btnGroup.Show()
    
    			if self.btnExpand:
    				self.btnExpand.SetText("-")
    		else:
    			self.btnExpanded = False
    			self.btnGroup.Hide()
    
    			if self.btnExpand:
    				self.btnExpand.SetText("+")
    
    		if self.textLineGuide:
    			self.textLineGuide.SetText(".")
    
    	def __OnClickExpandedBtn(self, arg):
    		if self.textLineGuide:
    			self.textLineGuide.SetText("{}".format(arg))
    
    	def Open(self):
    		self.Show()
    
    	def Close(self):
    		self.Hide()
    
    	def OnPressEscapeKey(self):
    		self.Close()
    		return True
    
    	def OnPressExitKey(self):
    		self.Close()
    		return True

     


  2. Por padrão já existe uma função em que verifique a versão do cliente com a versão do servidor, funciona por tempo, ou seja, se a data de execução for maior que a data limite que está configurada no servidor, o jogador será desconectado do servidor. Agora fica como queres verificar esta "chave" ou data de limite da versão / "licença".

    /// 1. @ Server/Game/input_login.cpp
    // Procura
    	if (g_bCheckClientVersion)
    	{
    		[ ... ]
    	}
    
    // Altere tudo por (verificar por data limite)
    	if (g_bCheckClientVersion)
    	{
    		sys_log(0, "VERSION CHECK %s %s", g_stClientVersion.c_str(), d->GetClientVersion());
    
    		if (!d->GetClientVersion())
    		{
    			d->DelayedDisconnect(10);
    		}
    		else
    		{
    			if (d->GetClientVersion() >= g_stClientVersion)
    			{
    				ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Ŭ¶óÀ̾ðÆ® ¹öÀüÀÌ Æ²·Á ·Î±×¾Æ¿ô µË´Ï´Ù. Á¤»óÀûÀ¸·Î ÆÐÄ¡ ÈÄ Á¢¼ÓÇϼ¼¿ä."));
    				d->DelayedDisconnect(0);
    				LogManager::instance().HackLog("VERSION_CONFLICT", ch);
    
    				sys_log(0, "VERSION : WRONG VERSION USER : account:%s name:%s hostName:%s server_version:%s client_version:%s",
    					d->GetAccountTable().login,
    					ch->GetName(),
    					d->GetHostName(),
    					g_stClientVersion.c_str(),
    					d->GetClientVersion());
    			}
    		}
    	}
    	else
    	{
    		sys_log(0, "VERSION : NO CHECK");
    	}
    
    // Ou altere por (verificar um valor fixo)
    	if (g_bCheckClientVersion)
    	{
    		sys_log(0, "VERSION CHECK %s %s", g_stClientVersion.c_str(), d->GetClientVersion());
    
    		if (!d->GetClientVersion())
    		{
    			d->DelayedDisconnect(10);
    		}
    		else
    		{
    			if (0 != g_stClientVersion.compare(d->GetClientVersion()))
    			{
    				ch->ChatPacket(CHAT_TYPE_NOTICE, LC_TEXT("Ŭ¶óÀ̾ðÆ® ¹öÀüÀÌ Æ²·Á ·Î±×¾Æ¿ô µË´Ï´Ù. Á¤»óÀûÀ¸·Î ÆÐÄ¡ ÈÄ Á¢¼ÓÇϼ¼¿ä."));
    				d->DelayedDisconnect(0);
    				LogManager::instance().HackLog("VERSION_CONFLICT", ch);
    
    				sys_log(0, "VERSION : WRONG VERSION USER : account:%s name:%s hostName:%s server_version:%s client_version:%s",
    					d->GetAccountTable().login,
    					ch->GetName(),
    					d->GetHostName(),
    					g_stClientVersion.c_str(),
    					d->GetClientVersion());
    			}
    		}
    	}
    	else
    	{
    		sys_log(0, "VERSION : NO CHECK");
    	}

    Eis algumas coisas que tens que considerar também; no ficheiro Server/Game /config.cpp tens que ativar esta verificação e também tens que alterar a "chave" ou data limite da versão / "licença".

    /// 1. @ Server/Game/config.cpp
    // Procura e confirme, altere g_stClientVersion conforme as tuas preferências.
    bool g_bCheckClientVersion = true; // true = verificar | false = não verificar
    std::string g_stClientVersion = "1640998800"; // Sat Jan 01 2022 01:00:00 GMT+0000

    Também podes criar um ficheiro "VERSION" junto a ficheiro "CONFIG" no diretório dos teus canais e adicionar o valor lá em vez de modificares o código fonte sempre que queres alterar a "chave" ou data limite da versão / "licença".

    Para isso também deves confirmar que essa função seja chamada.

    /// 1. @ Server/Game/config.cpp
    // Procura
    	LoadValidCRCList();
    	LoadStateUserCount();
    
    // Adiciona abaixo
    	LoadClientVersion();

    Finalmente na source do teu cliente terás que fazer algumas alterações também.

    /// 1. @ Client/UserInterface/PythonNetworkPhaseGame.cpp
    // Procura
    		strncpy(kVersionPacket.timestamp, "1215955205", sizeof(kVersionPacket.timestamp) - 1); // # python time.time ¾ÕÀÚ¸®
    
    // Altere para (verificar por data limite)
    		strncpy(kVersionPacket.timestamp, static_cast<std::time_t>(std::time(0)), sizeof(kVersionPacket.timestamp) - 1);
    
    // Ou altere para (verificar um valor fixo)
    		strncpy(kVersionPacket.timestamp, "1234567890", sizeof(kVersionPacket.timestamp) - 1);

    O que deves saber sobre essas alterações.
    1. Nem todos os clientes em que toca o código fonte são iguais, por isso deves-te guiar pela semelhança do código.
    2. Este método apenas desconecta o jogador após entrar no jogo caso haja conflito entre a "chave" ou data limite da versão / "licença".
    3. Há melhores formas de verificares o que pretendes, este é apenas o mais semelhante à tua pergunta e o mais simples que já existe no código fonte.

    Cumprimentos, Owsap.


  3. Depende onde tens o boss mas em geral, se o boss for "padrão" e estiver no seu mapa official é da seguinte forma,
    Nos ficheiros do teu servidor, localizado no mapa que contém o boss, no ficheiro boss.txt ou regen.txt, depende onde possa estar.
     

    Resumindo,

    ../share/locale/x/map/(nome_do_mapa)/boss.txt

    ou

    ../share/locale/x/map/(nome_do_mapa)/regen.txt

    Irás encontrar o boss pelo ID no ficheiros de texto.

     

    Exemplo:

    Vou alterar o tempo de respawn da Tartaruga no deserto.
    1. ../share/locale/master/map/metin2_map_n_desert_01/boss.txt

    Irás encontrar uma linha separada por vários valores.

    m	869	658	100	100	0	0	7200s	100	1	2191

    Como podes reparar tens um valor com "s", neste caso 7200s.

    Então tens aí o valor do respawn do boss em segundos.

    Depois de mudares o valor, reinicia o servidor.


  4. Provalvalemnte não tens a função "ThinBoardClosed" no "ui.py".

    import ui
    import wndMgr
    
    class AllenTeste(ui.Window):
    	def __init__(self):
    		ui.Window.__init__(self)
    		self.__LoadMainBoards()
    
    	def __del__(self):
    		ui.Window.__del__(self)
    
    	def __LoadMainBoards(self):
    		self.FunctionalBoard = ui.ThinBoard()
    		self.FunctionalBoard.SetParent(self)
    		self.FunctionalBoard.SetSize(100, 300)
    		self.FunctionalBoard.SetPosition(0, 0)
    		self.FunctionalBoard.Show()
    
    start = AllenTeste()
    start.Show()

  5. Antes de tudo, eu sei que isso é um pouco inútil, mas para ativar e desativar o efeito a piscar nos botões, decidi usar a função de flash padrão, porque não conhecia uma maneira mais fácil.
     

    Spoiler

    EterPythonLib/PythonWindow.cpp

    
    /// 1.
    // Procura
    	void CButton::Flash()
    	{
    		m_isFlash = true;
    	}
    
    // Adiciona abaixo
    	void CButton::EnableFlash()
    	{
    		m_isFlash = true;
    		if (!m_overVisual.IsEmpty())
    			SetCurrentVisual(&m_overVisual);
    	}
    
    	void CButton::DisableFlash()
    	{
    		m_isFlash = false;
    		if (!m_upVisual.IsEmpty())
    			SetCurrentVisual(&m_upVisual);
    	}
    
    
    /// 2.
    // Procura a função
    	void CButton::OnRender()
    
    // Substituir por
    	void CButton::OnRender()
    	{
    		if (!IsShow())
    			return;
    
    		if (m_pcurVisual)
    		{
    			if (m_isFlash)
    			{
    				if (!IsIn() && !IsPressed())
    				{
    					if (!m_overVisual.IsEmpty())
    						SetCurrentVisual(&m_overVisual);
    
    					if (int(timeGetTime() / 500) % 2)
    						return;
    				}
    			}
    
    			m_pcurVisual->Render();
    		}
    
    		PyCallClassMemberFunc(m_poHandler, "OnRender", BuildEmptyTuple());
    	}

    EterPythonLib/PythonWindow.h

    
    /// 1.
    // Procura
    			void Flash();
    
    // Adicionar abaixo
    			void EnableFlash();
    			void DisableFlash();

    EterPythonLib/PythonWindowManagerModule.cpp

    
    /// 1.
    // Procura
    PyObject * wndButtonFlash(PyObject * poSelf, PyObject * poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	((UI::CButton*)pWindow)->Flash();
    
    	return Py_BuildNone();
    }
    
    // Adiciona abaixo
    PyObject* wndButtonEnableFlash(PyObject* poSelf, PyObject* poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	((UI::CButton*)pWindow)->EnableFlash();
    
    	return Py_BuildNone();
    }
    
    PyObject* wndButtonDisableFlash(PyObject* poSelf, PyObject* poArgs)
    {
    	UI::CWindow * pWindow;
    	if (!PyTuple_GetWindow(poArgs, 0, &pWindow))
    		return Py_BuildException();
    
    	((UI::CButton*)pWindow)->DisableFlash();
    
    	return Py_BuildNone();
    }
    
    /// 2.
    // Procura
    		{ "Flash",						wndButtonFlash,						METH_VARARGS },
    
    // Adiciona abaixo
    		{ "EnableFlash",				wndButtonEnableFlash,				METH_VARARGS },
    		{ "DisableFlash",				wndButtonDisableFlash,				METH_VARARGS },

    ROOT/ui.py

    
    ''' 1. '''
    # Procura
    	def Flash(self):
    		wndMgr.Flash(self.hWnd)
    
    # Adiciona abaixo
    	def EnableFlash(self):
    		wndMgr.EnableFlash(self.hWnd)
    
    	def DisableFlash(self):
    		wndMgr.DisableFlash(self.hWnd)

     

    Como um exemplo, aqui está uma demonstração do efeito do flash.

    CU52L7z.gif


  6. Ocultar arma ao atuar emoções

    NYn2J6l.gif

    Repositório Git
    common/service.h

    Citar
    
    /// 1.
    // Add:
    #define __EMOTION_HIDE_WEAPON__

     

    game/char.cpp

    Citar
    
    /// 1.
    // Search @ CHARACTER::Initialize
    	memset(&m_tvLastSyncTime, 0, sizeof(m_tvLastSyncTime));
    	m_iSyncHackCount = 0;
    
    // Add below
    #ifdef __EMOTION_HIDE_WEAPON__
    	m_pkEmotionEvent = NULL;
    #endif
    
    /// 2.
    // Search @ CHARACTER::Destroy
    	StopHackShieldCheckCycle();
    
    // Add above
    #ifdef __EMOTION_HIDE_WEAPON__
    	event_cancel(&m_pkEmotionEvent);
    #endif
    
    /// 3.
    // Search @ CHARACTER::OnMove
    	// MINING
    	mining_cancel();
    	// END_OF_MINING
    
    // Add below
    #ifdef __EMOTION_HIDE_WEAPON__
    	CancelEmotion();
    #endif
    
    /// 4.
    // Add to the very bottom of the document
    #ifdef __EMOTION_HIDE_WEAPON__
    void CHARACTER::CancelEmotion()
    {
    	if (m_pkEmotionEvent)
    	{
    		event_cancel(&m_pkEmotionEvent);
    		RefreshWeapon(this);
    	}
    }
    
    void CHARACTER::RefreshWeapon(LPCHARACTER ch)
    {
    	if (!ch->IsPC())
    		return;
    
    	const CItem* pWeapon = ch->GetWear(WEAR_WEAPON);
    	DWORD toSetValue = (NULL != pWeapon) ? pWeapon->GetVnum() : ch->GetOriginalPart(PART_WEAPON);
    #ifdef __CHANGE_LOOK_SYSTEM__
    	if (pWeapon)
    		toSetValue = pWeapon->GetTransmutation() != 0 ? pWeapon->GetTransmutation() : pWeapon->GetVnum();
    #endif
    
    #ifdef __WEAPON_COSTUME_SYSTEM__
    	const CItem* pWeaponCostume = ch->GetWear(WEAR_COSTUME_WEAPON);
    	if (0 != ch->GetWear(WEAR_COSTUME_WEAPON))
    		toSetValue = (NULL != pWeaponCostume) ? pWeaponCostume->GetVnum() : ch->GetOriginalPart(PART_WEAPON);
    #endif

     

    game/char.h

    Citar
    
    /// 1.
    // Search
    		// MINING
    		void			mining(LPCHARACTER chLoad);
    		void			mining_cancel();
    		void			mining_take();
    		// END_OF_MINING
    
    // Add below
    #ifdef __EMOTION_HIDE_WEAPON__
    		void			CancelEmotion();
    		void			RefreshWeapon(LPCHARACTER ch);
    #endif
    
    /// 2.
    // Search
    		LPEVENT				m_pkPetSystemUpdateEvent;
    
    // Add below
    #ifdef __EMOTION_HIDE_WEAPON__
    		LPEVENT				m_pkEmotionEvent;
    #endif

     

    game/cmd_emotion.cpp

    Citar
    
    /*
    emotion_types[] = {
    	{ "키스",	"french_kiss",	NEED_PC | OTHER_SEX_ONLY | BOTH_DISARM,	4.000000f	},
    	{ "뽀뽀",	"kiss",	NEED_PC | OTHER_SEX_ONLY | BOTH_DISARM,	1.5f	},
    	{ "따귀",	"slap",	NEED_PC | SELF_DISARM,	2.0f	},
    	{ "박수",	"clap",	0,	2.66667f	},
    	{ "와",	"cheer1",	0,	2.33333f	},
    	{ "만세",	"cheer2",	0,	2.33333f	},
    	// DANCE
    	{ "댄스1",	"dance1",	0,	28.3333f	},
    	{ "댄스2",	"dance2",	0,	4.76667f	},
    	{ "댄스3",	"dance3",	0,	27.3333f	},
    	{ "댄스4",	"dance4",	0,	30.3333f	},
    	{ "댄스5",	"dance5",	0,	21.1f	},
    	{ "댄스6",	"dance6",	0,	30.433332f	},
    	// END_OF_DANCE
    	{ "축하",	"congratulation",	0,	6.33333f	},
    	{ "용서",	"forgive",	0,	8.33333f	},
    	{ "화남",	"angry",	0,	4.33333f	},
    	{ "유혹",	"attractive",	0,	4.83333f	},
    	{ "슬픔",	"sad",	0,	7.33333f	},
    	{ "브끄",	"shy",	0,	4.66667f	},
    	{ "응원",	"cheerup",	0,	5.0f	},
    	{ "질투",	"banter",	0,	7.0f	},
    	{ "기쁨",	"joy",	0,	5.33333f	},
    */
    
    /// 1.
    // Search
    #define NEED_TARGET	(1 << 0)
    
    // Add above
    #ifdef __EMOTION_HIDE_WEAPON__
    	#include "item.h"
    #endif
    
    /// 2.
    // Search
    ACMD(do_emotion)
    
    // Add above
    #ifdef __EMOTION_HIDE_WEAPON__
    EVENTINFO(EmotionEventInfo)
    {
    	LPCHARACTER me;
    	LPCHARACTER target;
    
    	EmotionEventInfo()
    	: me(0)
    	, target(0)
    	{
    	}
    };
    
    EVENTFUNC(EmotionEvent)
    {
    	EmotionEventInfo * info = dynamic_cast<EmotionEventInfo*>(event->info);
    
    	if (info == NULL)
    	{
    		sys_err("EmotionEventInfo> <Factor> Null pointer");
    		return 0;
    	}
    
    	LPCHARACTER me = info->me;
    	LPCHARACTER target = info->target;
    
    	if (me) me->RefreshWeapon(me);
    	if (target) target->RefreshWeapon(target);
    
    	return 0;
    }
    #endif
    
    /// 3.
    // Search
    			s_emotion_set.insert(std::make_pair(ch->GetVID(), victim->GetVID()));
    		}
    	}
    
    // Add above
    #ifdef __EMOTION_HIDE_WEAPON__
    			EmotionEventInfo * info = AllocEventInfo<EmotionEventInfo>();
    			info->target = victim;
    
    			victim->SetPart(PART_WEAPON, 0);
    			victim->UpdatePacket();
    
    			victim->m_pkEmotionEvent = event_create(EmotionEvent, info, PASSES_PER_SEC(emotion_types[i].extra_delay));
    #endif
    
    /// 4.
    // Search
    	TPacketGCChat pack_chat;
    	pack_chat.header = HEADER_GC_CHAT;
    	pack_chat.size = sizeof(TPacketGCChat) + len;
    	pack_chat.type = CHAT_TYPE_COMMAND;
    	pack_chat.id = 0;
    	TEMP_BUFFER buf;
    	buf.write(&pack_chat, sizeof(TPacketGCChat));
    	buf.write(chatbuf, len);
    
    // Add above
    #ifdef __EMOTION_HIDE_WEAPON__
    	EmotionEventInfo * info = AllocEventInfo<EmotionEventInfo>();
    	info->me = ch;
    
    	ch->SetPart(PART_WEAPON, 0);
    	ch->UpdatePacket();
    
    	ch->m_pkEmotionEvent = event_create(EmotionEvent, info, PASSES_PER_SEC(emotion_types[i].extra_delay));
    #endif

     

     


  7. Comando de GM para derrotar todos os jogadores à sua volta.

    zYm3YlG.gif

    game/src/cmd.cpp

    Spoiler

    Procura:

    
    ACMD(do_clear_affect);

    Adiciona abaixo:

    
    ACMD(do_kill_all);

    Procura:

    
    	{ "do_clear_affect", do_clear_affect, 	0, POS_DEAD,		GM_LOW_WIZARD},

    Adiciona abaixo:

    
    	{ "kill_all", do_kill_all, 0, POS_DEAD, GM_HIGH_WIZARD },

     

     

    game/src/cmd_gm.cpp

    Spoiler

    Procura:

    
    ACMD (do_clear_affect)
    {
    	ch->ClearAffect(true);
    }

    Adiciona abaixo:

    
    struct FuncKillAll
    {
    	LPCHARACTER m_ch;
    
    	FuncKillAll(LPCHARACTER ch):
    		m_ch(ch)
    	{}
    
    	void operator()(LPENTITY ent)
    	{
    		if (ent->IsType(ENTITY_CHARACTER))
    		{
    			LPCHARACTER ch = (LPCHARACTER) ent;
    
    			if (!test_server)
    			{
    				if (!ch->IsPC() || m_ch == ch || ch->IsGM() || ch->IsDead() || ch->GetHP() <= 0)
    					return;
    			}
    			else
    			{
    				if (!ch->IsPC() || m_ch == ch || ch->IsDead() || ch->GetHP() <= 0)
    					return;
    			}
    
    			float fDist = DISTANCE_APPROX(m_ch->GetX() - ch->GetX(), m_ch->GetY() - ch->GetY());
    			if (fDist > 7000.f)
    				return;
    
    			int damage = ch->GetHP()+number(1, 4250);
    			ch->EffectPacket(SE_CRITICAL);
    			ch->PointChange(POINT_HP, -damage, false);
    			ch->Dead();
    		}
    	}
    };
    
    ACMD(do_kill_all)
    {
    	LPSECTREE pSec = ch->GetSectree();
    	if (pSec)
    	{
    		FuncKillAll f(ch);
    		pSec->ForEachAround(f);
    	}
    }

     


  8. QUEST1

    quest quest1_test begin
    	state start begin
    		when 8010.kill with not npc.is_pc() begin
    			mob.spawn(180, pc.get_x(), pc.get_y(), 0, 0) -- spawn mob vnum 180 @ pc x & y
    		end
    	end
    end

    QUEST2
     

    quest quest2_test begin
    	state start begin
    		when BOSS_VNUM.kill with not npc.is_pc() begin
    			local village = {1, 21, 41} -- metin2_map_a1, metin2_map_b1, metin2_map_c1
    
    			if pc.get_map_index() != village[pc.get_empire()] then
    
    				if pc.get_empire() == 1 then -- shinsoo player
    
    					local shinsoo_costume = {41033, 41034} -- costumes vnum's
    					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41033 ~ 41034
    
    				elseif pc.get_empire() == 2 then -- chunjo player
    
    					local chunjo_costume = {41035, 41036} -- costumes vnum's
    					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41035 ~ 41036
    
    				elseif pc.get_empire() == 3 then -- jinno player
    
    					local chunjo_costume = {41037, 41038} -- costumes vnum's
    					game.drop_item_with_ownership(shinsoo_costume[math.random(0, table.getn(costume))]) -- 1 item vnum 41037 ~ 41038
    
    				end
    			end
    		end
    	end
    end

     


  9. Cliente
    locale/inventorywindow.py

    import uiScriptLocale
    import item
    
    EQUIPMENT_START_INDEX = 0
    
    window = {
    	"name" : "InventoryWindow",
    
    	## 600 - (width + ¿À¸¥ÂÊÀ¸·Î ºÎÅÍ ¶ç¿ì±â 24 px)
    	"x" : SCREEN_WIDTH - 176,
    	"y" : SCREEN_HEIGHT - 37 - 565,
    
    	"style" : ("movable", "float",),
    
    	"width" : 176,
    	"height" : 565,
    
    	"children" :
    	(
    		## Inventory, Equipment Slots
    		{
    			"name" : "board",
    			"type" : "board",
    			"style" : ("attach",),
    
    			"x" : 0,
    			"y" : 0,
    
    			"width" : 176,
    			"height" : 565,
    
    			"children" :
    			(
    				## Title
    				{
    					"name" : "TitleBar",
    					"type" : "titlebar",
    					"style" : ("attach",),
    
    					"x" : 8,
    					"y" : 7,
    
    					"width" : 161,
    					"color" : "yellow",
    
    					"children" :
    					(
    						{ "name":"TitleName", "type":"text", "x":77, "y":3, "text":uiScriptLocale.INVENTORY_TITLE, "text_horizontal_align":"center" },
    					),
    				},
    
    				## Equipment Slot
    				{
    					"name" : "Equipment_Base",
    					"type" : "image",
    
    					"x" : 10,
    					"y" : 33,
    
    					"image" : "d:/ymir work/ui/equipment_bg_with_ring.tga",
    
    					"children" :
    					(
    
    						{
    							"name" : "EquipmentSlot",
    							"type" : "slot",
    
    							"x" : 3,
    							"y" : 3,
    
    							"width" : 150,
    							"height" : 182,
    
    							"slot" : (
    								{"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64},
    								{"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96},
    								{"index":EQUIPMENT_START_INDEX+5, "x":114, "y":67, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+6, "x":114, "y":35, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+7, "x":2, "y":145, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+8, "x":75, "y":145, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+9, "x":114, "y":2, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
    								## »õ ¹ÝÁö1
    								{"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32},
    								## »õ ¹ÝÁö2
    								{"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32},
    								## »õ º§Æ®
    								{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},
    							),
    						},
    						## Dragon Soul Button
    						{
    							"name" : "DSSButton",
    							"type" : "button",
    
    							"x" : 114,
    							"y" : 107,
    
    							"tooltip_text" : uiScriptLocale.TASKBAR_DRAGON_SOUL,
    
    							"default_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_01.tga",
    							"over_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_02.tga",
    							"down_image" : "d:/ymir work/ui/dragonsoul/dss_inventory_button_03.tga",
    						},
    						## MallButton
    						{
    							"name" : "MallButton",
    							"type" : "button",
    
    							"x" : 118,
    							"y" : 148,
    
    							"tooltip_text" : uiScriptLocale.MALL_TITLE,
    
    							"default_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_01.tga",
    							"over_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_02.tga",
    							"down_image" : "d:/ymir work/ui/game/TaskBar/Mall_Button_03.tga",
    						},
    						## CostumeButton
    						{
    							"name" : "CostumeButton",
    							"type" : "button",
    
    							"x" : 78,
    							"y" : 5,
    
    							"tooltip_text" : uiScriptLocale.COSTUME_TITLE,
    
    							"default_image" : "d:/ymir work/ui/game/taskbar/costume_Button_01.tga",
    							"over_image" : "d:/ymir work/ui/game/taskbar/costume_Button_02.tga",
    							"down_image" : "d:/ymir work/ui/game/taskbar/costume_Button_03.tga",
    						},
    						{
    							"name" : "Equipment_Tab_01",
    							"type" : "radio_button",
    
    							"x" : 86,
    							"y" : 161,
    
    							"default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
    							"over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
    							"down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
    
    							"children" :
    							(
    								{
    									"name" : "Equipment_Tab_01_Print",
    									"type" : "text",
    
    									"x" : 0,
    									"y" : 0,
    
    									"all_align" : "center",
    
    									"text" : "I",
    								},
    							),
    						},
    						{
    							"name" : "Equipment_Tab_02",
    							"type" : "radio_button",
    
    							"x" : 86 + 32,
    							"y" : 161,
    
    							"default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
    							"over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
    							"down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
    
    							"children" :
    							(
    								{
    									"name" : "Equipment_Tab_02_Print",
    									"type" : "text",
    
    									"x" : 0,
    									"y" : 0,
    
    									"all_align" : "center",
    
    									"text" : "II",
    								},
    							),
    						},
    
    					),
    				},
    
    				{
    					"name" : "Inventory_Tab_01",
    					"type" : "radio_button",
    
    					"x" : 10,
    					"y" : 33 + 191,
    
    					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
    					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
    					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
    					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_1,
    
    					"children" :
    					(
    						{
    							"name" : "Inventory_Tab_01_Print",
    							"type" : "text",
    
    							"x" : 0,
    							"y" : 0,
    
    							"all_align" : "center",
    
    							"text" : "I",
    						},
    					),
    				},
    				{
    					"name" : "Inventory_Tab_02",
    					"type" : "radio_button",
    
    					#"x" : 10 + 78,
    					"x" : 10 + 39,
    					"y" : 33 + 191,
    
    					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
    					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
    					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
    					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2,
    
    					"children" :
    					(
    						{
    							"name" : "Inventory_Tab_02_Print",
    							"type" : "text",
    
    							"x" : 0,
    							"y" : 0,
    
    							"all_align" : "center",
    
    							"text" : "II",
    						},
    					),
    				},
    
    				{
    					"name" : "Inventory_Tab_03",
    					"type" : "radio_button",
    
    					"x" : 10 + 39 + 39,
    					"y" : 33 + 191,
    
    					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
    					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
    					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
    					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_3,
    
    					"children" :
    					(
    						{
    							"name" : "Inventory_Tab_03_Print",
    							"type" : "text",
    
    							"x" : 0,
    							"y" : 0,
    
    							"all_align" : "center",
    
    							"text" : "III",
    						},
    					),
    				},
    
    				{
    					"name" : "Inventory_Tab_04",
    					"type" : "radio_button",
    
    					"x" : 10 + 39 + 39 + 39,
    					"y" : 33 + 191,
    
    					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_01.sub",
    					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_02.sub",
    					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_half_03.sub",
    					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_4,
    
    					"children" :
    					(
    						{
    							"name" : "Inventory_Tab_04_Print",
    							"type" : "text",
    
    							"x" : 0,
    							"y" : 0,
    
    							"all_align" : "center",
    
    							"text" : "IV",
    						},
    					),
    				},
    
    				## Item Slot
    				{
    					"name" : "ItemSlot",
    					"type" : "grid_table",
    
    					"x" : 8,
    					"y" : 246,
    
    					"start_index" : 0,
    					"x_count" : 5,
    					"y_count" : 9,
    					"x_step" : 32,
    					"y_step" : 32,
    
    					"image" : "d:/ymir work/ui/public/Slot_Base.sub"
    				},
    
    				## Print
    				{
    					"name":"Money_Slot",
    					"type":"button",
    
    					"x":8,
    					"y":28,
    
    					"horizontal_align":"center",
    					"vertical_align":"bottom",
    
    					"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
    					"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
    					"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
    
    					"children" :
    					(
    						{
    							"name":"Money_Icon",
    							"type":"image",
    
    							"x":-18,
    							"y":2,
    
    							"image":"d:/ymir work/ui/game/windows/money_icon.sub",
    						},
    
    						{
    							"name" : "Money",
    							"type" : "text",
    
    							"x" : 3,
    							"y" : 3,
    
    							"horizontal_align" : "right",
    							"text_horizontal_align" : "right",
    
    							"text" : "123456789",
    						},
    					),
    				},
    
    			),
    		},
    	),
    }

    locale/locale_interface.txt

    INVENTORY_PAGE_BUTTON_TOOLTIP_1	1º Inventário
    INVENTORY_PAGE_BUTTON_TOOLTIP_2	2º Inventário
    INVENTORY_PAGE_BUTTON_TOOLTIP_3	3º Inventário
    INVENTORY_PAGE_BUTTON_TOOLTIP_4	4º Inventário

    uiscript/inventorywindow.py

    import uiScriptLocale
    import item
    
    EQUIPMENT_START_INDEX = 90
    
    window = {
    	"name" : "InventoryWindow",
    
    	## 600 - (width + ¿À¸¥ÂÊÀ¸·Î ºÎÅÍ ¶ç¿ì±â 24 px)
    	"x" : SCREEN_WIDTH - 176 - 200,
    	"y" : SCREEN_HEIGHT - 37 - 565,
    
    	"style" : ("movable", "float",),
    
    	"width" : 176,
    	"height" : 565,
    
    	"children" :
    	(
    		{
    			"name" : "board",
    			"type" : "board",
    			"style" : ("attach",),
    
    			"x" : 0,
    			"y" : 0,
    
    			"width" : 176,
    			"height" : 565,
    
    			"children" :
    			(
    				## Title
    				{
    					"name" : "TitleBar",
    					"type" : "titlebar",
    					"style" : ("attach",),
    
    					"x" : 8,
    					"y" : 7,
    
    					"width" : 161,
    					"color" : "yellow",
    
    					"children" :
    					(
    						{ "name":"TitleName", "type":"text", "x":77, "y":3, "text":uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2, "text_horizontal_align":"center" },
    					),
    				},
    
    				## Equipment Slot
    				{
    					"name" : "Equipment_Base",
    					"type" : "image",
    
    					"x" : 10,
    					"y" : 33,
    
    					"image" : "d:/ymir work/ui/game/windows/equipment_base.sub",
    
    					"children" :
    					(
    
    						{
    							"name" : "EquipmentSlot",
    							"type" : "slot",
    
    							"x" : 3,
    							"y" : 3,
    
    							"width" : 150,
    							"height" : 182,
    
    							"slot" : (
    								{"index":EQUIPMENT_START_INDEX+0, "x":39, "y":37, "width":32, "height":64},
    								{"index":EQUIPMENT_START_INDEX+1, "x":39, "y":2, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+2, "x":39, "y":145, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+3, "x":75, "y":67, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+4, "x":3, "y":3, "width":32, "height":96},
    								{"index":EQUIPMENT_START_INDEX+5, "x":114, "y":84, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+6, "x":114, "y":52, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+7, "x":2, "y":113, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+8, "x":75, "y":113, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+9, "x":114, "y":1, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
    								{"index":EQUIPMENT_START_INDEX+10, "x":75, "y":35, "width":32, "height":32},
    								## »õ ¹ÝÁö1
    								{"index":item.EQUIPMENT_RING1, "x":2, "y":106, "width":32, "height":32},
    								## »õ ¹ÝÁö2
    								{"index":item.EQUIPMENT_RING2, "x":75, "y":106, "width":32, "height":32},
    								## »õ º§Æ®
    								{"index":item.EQUIPMENT_BELT, "x":39, "y":106, "width":32, "height":32},
    							),
    						},
    
    						{
    							"name" : "Equipment_Tab_01",
    							"type" : "radio_button",
    
    							"x" : 86,
    							"y" : 161,
    
    							"default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
    							"over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
    							"down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
    
    							"children" :
    							(
    								{
    									"name" : "Equipment_Tab_01_Print",
    									"type" : "text",
    
    									"x" : 0,
    									"y" : 0,
    
    									"all_align" : "center",
    
    									"text" : "I",
    								},
    							),
    						},
    						{
    							"name" : "Equipment_Tab_02",
    							"type" : "radio_button",
    
    							"x" : 86 + 32,
    							"y" : 161,
    
    							"default_image" : "d:/ymir work/ui/game/windows/tab_button_small_01.sub",
    							"over_image" : "d:/ymir work/ui/game/windows/tab_button_small_02.sub",
    							"down_image" : "d:/ymir work/ui/game/windows/tab_button_small_03.sub",
    
    							"children" :
    							(
    								{
    									"name" : "Equipment_Tab_02_Print",
    									"type" : "text",
    
    									"x" : 0,
    									"y" : 0,
    
    									"all_align" : "center",
    
    									"text" : "II",
    								},
    							),
    						},
    
    					),
    				},
    
    				{
    					"name" : "Inventory_Tab_01",
    					"type" : "radio_button",
    
    					"x" : 10,
    					"y" : 33 + 191,
    
    					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
    					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
    					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
    					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_1,
    
    					"children" :
    					(
    						{
    							"name" : "Inventory_Tab_01_Print",
    							"type" : "text",
    
    							"x" : 0,
    							"y" : 0,
    
    							"all_align" : "center",
    
    							"text" : "I",
    						},
    					),
    				},
    				{
    					"name" : "Inventory_Tab_02",
    					"type" : "radio_button",
    
    					"x" : 10 + 78,
    					"y" : 33 + 191,
    
    					"default_image" : "d:/ymir work/ui/game/windows/tab_button_large_01.sub",
    					"over_image" : "d:/ymir work/ui/game/windows/tab_button_large_02.sub",
    					"down_image" : "d:/ymir work/ui/game/windows/tab_button_large_03.sub",
    					"tooltip_text" : uiScriptLocale.INVENTORY_PAGE_BUTTON_TOOLTIP_2,
    
    					"children" :
    					(
    						{
    							"name" : "Inventory_Tab_02_Print",
    							"type" : "text",
    
    							"x" : 0,
    							"y" : 0,
    
    							"all_align" : "center",
    
    							"text" : "II",
    						},
    					),
    				},
    
    				## Item Slot
    				{
    					"name" : "ItemSlot",
    					"type" : "grid_table",
    
    					"x" : 8,
    					"y" : 246,
    
    					"start_index" : 0,
    					"x_count" : 5,
    					"y_count" : 9,
    					"x_step" : 32,
    					"y_step" : 32,
    
    					"image" : "d:/ymir work/ui/public/Slot_Base.sub"
    				},
    
    				## Print
    				{
    					"name":"Money_Slot",
    					"type":"button",
    
    					"x":8,
    					"y":28,
    
    					"horizontal_align":"center",
    					"vertical_align":"bottom",
    
    					"default_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
    					"over_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
    					"down_image" : "d:/ymir work/ui/public/parameter_slot_05.sub",
    
    					"children" :
    					(
    						{
    							"name":"Money_Icon",
    							"type":"image",
    
    							"x":-18,
    							"y":20,
    
    							"image":"d:/ymir work/ui/game/windows/money_icon.sub",
    						},
    
    						{
    							"name" : "Money",
    							"type" : "text",
    
    							"x" : 3,
    							"y" : 3,
    
    							"horizontal_align" : "right",
    							"text_horizontal_align" : "right",
    
    							"text" : "123456789",
    						},
    					),
    				},
    
    			),
    		},
    	),
    }


    Source (Em caso se tiveres)
    UserInterface/Locale_inc.h
    Adiciona se não tiver.

    #define ENABLE_NEW_EQUIPMENT_SYSTEM

     


  10. FreeBSD

    ee /usr/local/etc/apache24/httpd.conf

    Procura:

    Citar

    <IfModule dir_module>
        DirectoryIndex index.html
    </IfModule>

     

    Adiciona:

    Citar

    <IfModule dir_module>
        DirectoryIndex index.html index.php
    </IfModule>

     

    /*
    a) leave editor
    	a) save changes
    */
    service apache24 restart

     

    * Tira uma captura do ecrã com o erro/problema para ser mais fácil ajudarem-te.


  11. root/game.py

     

    Procura por def __PressGKey(self): e substituí a função toda por:

    	def __PressGKey(self):
    		if app.IsPressed(app.DIK_LCONTROL) or app.IsPressed(app.DIK_RCONTROL):
    			net.SendChatPacket("/ride")
    		else:
    			if self.ShowNameFlag:
    				self.interface.ToggleGuildWindow()
    			else:
    				app.PitchCamera(app.CAMERA_TO_POSITIVE)

     


  12. Tenta,

     

    root/uisystem.py

     

    Procura:

    	def __Initialize(self):
    		self.eventOpenHelpWindow = None
    		self.systemOptionDlg = None
    		self.gameOptionDlg = None

    Adiciona abaixo:

    		self.mallShowEvent = None

     

    Procura:

    	def __ClickInGameShopButton(self):
    		self.Close()
    		net.SendChatPacket("/in_game_mall")

    Substitui por:

    	def __ClickInGameShopButton(self):
    		self.Close()
    		if self.mallShowEvent:
    			self.mallShowEvent()
    		else:
    			net.SendChatPacket("/in_game_mall")

     

    #Resposta ao autor do tópico @Blackout

    # (Postado Outubro 21, 2015) - to late bro

     


  13. quest receber_level begin
    	state start begin
    		when 20095.chat."Receber Nível 127" begin
    			say_title("Mestre GM:")
    			say("Olá!")
    			say("Com este frio tenho de aquecer a minha familia")
    			say("Preciso de 30 pijamas")
    			say("Podes obter pijamas ao partir a Pedra Mythology2 no Mapa Upar")
    			say("Eu sei, tenho bastantes filhos visto no meu tempo não haver televisão.")
    			say_red("Recompensa: Nível 127")
    			local s = select("Entregar Pijamas", "Sair")
    			if s == 1 then
    				if pc.count_item(30032) >= 30 then
    					pc.remove_item(30032, 30)
    					while pc.get_level() < 127 do
    						pc.give_exp2(pc.get_next_exp())
    					end
    					notice_all("O jogador "..pc.get_name().." chegou ao nível 127!")
    				else
    					say_red("Não sejas mau, sou velho mas não sou parvo!")
    					say_red("Não tens 30 Pijamas!")
    					return
    				end
    			else
    				return
    			end
    		end
    	end
    end