Jump to content

Slot Montadas


NeverMindz
 Share

Recommended Posts

Deixo aqui o código:

quest ride begin
	state start begin
		function Ride( vnum, remain_time )
			ride_info = {
				[71114] = { 20110,	5*60,	apply.DEF_GRADE_BONUS,	75,		75,	true	},
				[71115] = { 20110,	5*60,	apply.DEF_GRADE_BONUS,	100,	75,	false	},
				[71116] = { 20111,	5*60,	apply.DEF_GRADE_BONUS,	100,	80,	true	},
				[71117] = { 20111,	5*60,	apply.DEF_GRADE_BONUS,	150,	80,	false	},
				[71118] = { 20112,	5*60,	apply.DEF_GRADE_BONUS,	125,	85,	true	},
				[71119] = { 20112,	5*60,	apply.DEF_GRADE_BONUS,	200,	85,	false	},
				[71120] = { 20113,	5*60,	apply.ATT_GRADE_BONUS,	200,	85,	true	},
				[71121] = { 20113,	5*60,	apply.ATT_GRADE_BONUS,	300,	85,	false	},
				[71171] = { 20227,	5*60,	apply.MOV_SPEED,	60,		1,	false,	false,	false},
				[71172] = { 20226,	5*60,	apply.MOV_SPEED,	60,		1,	false,	false,	false},
				[71176] = { 20231,	5*60,	apply.MOV_SPEED,	60,		1,	false,	false,	false},
				[71177] = { 20232,	5*60,	apply.MOV_SPEED,	60,		1,	false,	false,	false},
				}

			if pc.level < ride_info[vnum][5] then
				say("")
				say("Bineði kullanabilmek için seviyeniz yeterli deðil.")
				say("")
			else
				if 112 == pc.get_map_index() then
					return
				end
				if ride_info[vnum][2] == 0 and remain_time != 0 then
					pc.mount( ride_info[vnum][1], remain_time*60 )
					pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], remain_time*60 )
				else
					pc.mount( ride_info[vnum][1], ride_info[vnum][2] )
					pc.mount_bonus( ride_info[vnum][3], ride_info[vnum][4], ride_info[vnum][2] )
				end

				if true == ride_info[vnum][6] then
					pc.remove_item(vnum, 1)
				end	
			end	
		end

		when login begin
			local vnum, remain_time = pc.get_special_ride_vnum()
			if vnum <=  71113 or vnum >71121 then
				return
			end
			if 0 != vnum then
				ride.Ride(vnum, remain_time)
			end
		end

		when 71114.use or 71115.use or 71116.use or 71117.use or 71118.use or 71119.use or 71120.use or 71121.use 
				or 71171.use or 71172.use or 71176.use or 71177.use begin
			 if pc.is_polymorphed() then
				 say("")
				 say("Não podes montar enquanto estás transformado!")
				 say("")
			elseif false == pc.is_riding() then
			 	if true == horse.is_summon() then
					horse.unsummon()
				end
				 ride.Ride(item.vnum, 0)
			 else
				say("")
				 say("Já estás a usar uma montada!")
				 say("")
			 end
		end
	end
end

 Cumprimentos

Link to comment
Share on other sites

Erro de posição, verifique em common\length.h:

enum EWearPositions
{
    WEAR_BODY,        // 0
    WEAR_HEAD,        // 1
    WEAR_FOOTS,        // 2
    WEAR_WRIST,        // 3
    WEAR_WEAPON,    // 4
    WEAR_NECK,        // 5
    WEAR_EAR,        // 6
    WEAR_UNIQUE1,    // 7
    WEAR_UNIQUE2,    // 8
    WEAR_ARROW,        // 9
    WEAR_SHIELD,    // 10
    WEAR_ABILITY1,  // 11
    WEAR_ABILITY2,  // 12
    WEAR_ABILITY3,  // 13
    WEAR_ABILITY4,  // 14
    WEAR_ABILITY5,  // 15
    WEAR_ABILITY6,  // 16
    WEAR_ABILITY7,  // 17
    WEAR_ABILITY8,  // 18
    WEAR_COSTUME_BODY,    // 19
    WEAR_COSTUME_HAIR,    // 20
    
    WEAR_COSTUME_MOUNT,    // 21 Posição do Slot
    WEAR_COSTUME_ACCE,    // 22
    WEAR_COSTUME_WEAPON,    // 23
    
    WEAR_RING1,            // 24    : ½Å±Ô ¹ÝÁö½½·Ô1 (¿ÞÂÊ)
    WEAR_RING2,            // 25    : ½Å±Ô ¹ÝÁö½½·Ô2 (¿À¸¥ÂÊ)
	    WEAR_BELT,            // 26    : ½Å±Ô º§Æ®½½·Ô
	    WEAR_MAX = 32    //
};

Continuando no common verifique o subtype em item_length.h:

enum ECostumeSubTypes
{
    COSTUME_BODY = ARMOR_BODY,  // 0 subtype
    COSTUME_HAIR = ARMOR_HEAD,   // 1 subtype
    COSTUME_MOUNT, // 2 subtype
    COSTUME_ACCE, // 3 subtype
    COSTUME_WEAPON, // 4 subtype
    COSTUME_NUM_TYPES,
};

Verifique em db/src/ProtoReader.cpp

static string arSub28[] = { "COSTUME_BODY", "COSTUME_HAIR", "COSTUME_MOUNT", "COSTUME_ACCE", "COSTUME_WEAPON" };

Verifique em Client\UserInterface\GameType.h:

#ifdef ENABLE_COSTUME_SYSTEM
    const DWORD c_Costume_Slot_Start    = c_Equipment_Start + 19;    // [ÁÖÀÇ] ¼ýÀÚ(19) ÇϵåÄÚµù ÁÖÀÇ. ÇöÀç ¼­¹ö¿¡¼­ ÄÚ½ºÃõ ½½·ÔÀº 19ºÎÅÍÀÓ. ¼­¹ö common/length.h ÆÄÀÏÀÇ EWearPositions ¿­°ÅÇü Âü°í.
    const DWORD    c_Costume_Slot_Body        = c_Costume_Slot_Start + 0; // 19
    const DWORD    c_Costume_Slot_Hair        = c_Costume_Slot_Start + 1; // 20
    const DWORD    c_Costume_Slot_Mount    = c_Costume_Slot_Start + 2; // 21 Posição do Slot
    const DWORD    c_Costume_Slot_Acce        = c_Costume_Slot_Start + 3; // 22
    const DWORD    c_Costume_Slot_Weapon    = c_Costume_Slot_Start + 4; // 23
    const DWORD c_Costume_Slot_Count    = 5;
    const DWORD c_Costume_Slot_End        = c_Costume_Slot_Start + c_Costume_Slot_Count;
#endif

Correção do slot belt e ring_left e ring_right:

#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
    const DWORD c_New_Equipment_Start = c_Equipment_Start + 24; // 24 Posição de slot
    const DWORD c_New_Equipment_Count = 3;
    const DWORD c_Equipment_Ring1 = c_New_Equipment_Start + 0; // 24
    const DWORD c_Equipment_Ring2 = c_New_Equipment_Start + 1; // 25
    const DWORD c_Equipment_Belt  = c_New_Equipment_Start + 2;; // 26
#endif

Verifique em Client\UserInterface\PythonItemModule.cpp:

#ifdef ENABLE_COSTUME_SYSTEM
    PyModule_AddIntConstant(poModule, "ITEM_TYPE_COSTUME",            CItemData::ITEM_TYPE_COSTUME);
	    // Item Sub Type
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_BODY",            CItemData::COSTUME_BODY);
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_HAIR",            CItemData::COSTUME_HAIR);
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_MOUNT",            CItemData::COSTUME_MOUNT);
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_ACCE",            CItemData::COSTUME_ACCE);
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_WEAPON",            CItemData::COSTUME_WEAPON);
	    // Àκ¥Å丮 ¹× Àåºñâ¿¡¼­ÀÇ ½½·Ô ¹øÈ£
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_START",            c_Costume_Slot_Start);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_COUNT",            c_Costume_Slot_Count);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_BODY",            c_Costume_Slot_Body);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_HAIR",            c_Costume_Slot_Hair);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_MOUNT",            c_Costume_Slot_Mount);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_ACCE",            c_Costume_Slot_Acce);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_WEAPON",        c_Costume_Slot_Weapon);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_END",            c_Costume_Slot_End);
#endif

Verifique em uiscript->costumewindow.py:

"slot" : (
                {"index":COSTUME_START_INDEX+0, "x":62, "y":45, "width":32, "height":64},# 19 - Posição de slot
                {"index":COSTUME_START_INDEX+1, "x":62, "y": 9, "width":32, "height":32},# 20
                {"index":COSTUME_START_INDEX+2, "x":13, "y":126, "width":32, "height":32},# 21
                {"index":COSTUME_START_INDEX+3, "x":62, "y":126, "width":32, "height":32},# 22
                {"index":COSTUME_START_INDEX+4, "x":13, "y":13, "width":32, "height":96},# 23
                ),
Edited by xkillmt2
ProtoReader.cpp
Link to comment
Share on other sites

36 minutos atrás, xkillmt2 disse:

Erro de posição, verifique em common\length.h:


enum EWearPositions
{
    WEAR_BODY,        // 0
    WEAR_HEAD,        // 1
    WEAR_FOOTS,        // 2
    WEAR_WRIST,        // 3
    WEAR_WEAPON,    // 4
    WEAR_NECK,        // 5
    WEAR_EAR,        // 6
    WEAR_UNIQUE1,    // 7
    WEAR_UNIQUE2,    // 8
    WEAR_ARROW,        // 9
    WEAR_SHIELD,    // 10
    WEAR_ABILITY1,  // 11
    WEAR_ABILITY2,  // 12
    WEAR_ABILITY3,  // 13
    WEAR_ABILITY4,  // 14
    WEAR_ABILITY5,  // 15
    WEAR_ABILITY6,  // 16
    WEAR_ABILITY7,  // 17
    WEAR_ABILITY8,  // 18
    WEAR_COSTUME_BODY,    // 19
    WEAR_COSTUME_HAIR,    // 20
    
    WEAR_COSTUME_MOUNT,    // 21 Posição do Slot
    WEAR_COSTUME_ACCE,    // 22
    WEAR_COSTUME_WEAPON,    // 23
    
    WEAR_RING1,            // 24    : ½Å±Ô ¹ÝÁö½½·Ô1 (¿ÞÂÊ)
    WEAR_RING2,            // 25    : ½Å±Ô ¹ÝÁö½½·Ô2 (¿À¸¥ÂÊ)
	    WEAR_BELT,            // 26    : ½Å±Ô º§Æ®½½·Ô
	    WEAR_MAX = 32    //
};

 

Continuando no common verifique o subtype em item_length.h:


enum ECostumeSubTypes
{
    COSTUME_BODY = ARMOR_BODY,  // 0 subtype
    COSTUME_HAIR = ARMOR_HEAD,   // 1 subtype
    COSTUME_MOUNT, // 2 subtype
    COSTUME_ACCE, // 3 subtype
    COSTUME_WEAPON, // 4 subtype
    COSTUME_NUM_TYPES,
};

 

Verifique em Client\UserInterface\GameType.h:


#ifdef ENABLE_COSTUME_SYSTEM
    const DWORD c_Costume_Slot_Start    = c_Equipment_Start + 19;    // [ÁÖÀÇ] ¼ýÀÚ(19) ÇϵåÄÚµù ÁÖÀÇ. ÇöÀç ¼­¹ö¿¡¼­ ÄÚ½ºÃõ ½½·ÔÀº 19ºÎÅÍÀÓ. ¼­¹ö common/length.h ÆÄÀÏÀÇ EWearPositions ¿­°ÅÇü Âü°í.
    const DWORD    c_Costume_Slot_Body        = c_Costume_Slot_Start + 0; // 19
    const DWORD    c_Costume_Slot_Hair        = c_Costume_Slot_Start + 1; // 20
    const DWORD    c_Costume_Slot_Mount    = c_Costume_Slot_Start + 2; // 21 Posição do Slot
    const DWORD    c_Costume_Slot_Acce        = c_Costume_Slot_Start + 3; // 22
    const DWORD    c_Costume_Slot_Weapon    = c_Costume_Slot_Start + 4; // 23
    const DWORD c_Costume_Slot_Count    = 5;
    const DWORD c_Costume_Slot_End        = c_Costume_Slot_Start + c_Costume_Slot_Count;
#endif

 

Correção do slot belt e ring_left e ring_right:


#ifdef ENABLE_NEW_EQUIPMENT_SYSTEM
    const DWORD c_New_Equipment_Start = c_Equipment_Start + 24; // 24 Posição de slot
    const DWORD c_New_Equipment_Count = 3;
    const DWORD c_Equipment_Ring1 = c_New_Equipment_Start + 0; // 24
    const DWORD c_Equipment_Ring2 = c_New_Equipment_Start + 1; // 25
    const DWORD c_Equipment_Belt  = c_New_Equipment_Start + 2;; // 26
#endif

 

Verifique em Client\UserInterface\PythonItemModule.cpp:


#ifdef ENABLE_COSTUME_SYSTEM
    PyModule_AddIntConstant(poModule, "ITEM_TYPE_COSTUME",            CItemData::ITEM_TYPE_COSTUME);
	    // Item Sub Type
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_BODY",            CItemData::COSTUME_BODY);
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_HAIR",            CItemData::COSTUME_HAIR);
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_MOUNT",            CItemData::COSTUME_MOUNT);
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_ACCE",            CItemData::COSTUME_ACCE);
    PyModule_AddIntConstant(poModule, "COSTUME_TYPE_WEAPON",            CItemData::COSTUME_WEAPON);
	    // Àκ¥Å丮 ¹× Àåºñâ¿¡¼­ÀÇ ½½·Ô ¹øÈ£
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_START",            c_Costume_Slot_Start);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_COUNT",            c_Costume_Slot_Count);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_BODY",            c_Costume_Slot_Body);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_HAIR",            c_Costume_Slot_Hair);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_MOUNT",            c_Costume_Slot_Mount);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_ACCE",            c_Costume_Slot_Acce);
    PyModule_AddIntConstant(poModule, "COSTUME_SLOT_WEAPON",        c_Costume_Slot_Weapon);
#endif

 

Verifique em uiscript->costumewindow.py:


"slot" : (
                {"index":COSTUME_START_INDEX+0, "x":62, "y":45, "width":32, "height":64},# 19 - Posição de slot
                {"index":COSTUME_START_INDEX+1, "x":62, "y": 9, "width":32, "height":32},# 20
                {"index":COSTUME_START_INDEX+2, "x":13, "y":126, "width":32, "height":32},# 21
                {"index":COSTUME_START_INDEX+3, "x":62, "y":126, "width":32, "height":32},# 22
                {"index":COSTUME_START_INDEX+4, "x":13, "y":13, "width":32, "height":96},# 23
                ),

 

ProtoReader.cpp também ajudava para saber exatamente quais são as flags do quê.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...