Jump to content

Problemas con items de custom equip


Kuroko Sempai

Recommended Posts


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  74
  • Reputation:   1
  • Joined:  12/31/11
  • Last Seen:  

Buenas a todos como dice el titulo cuando me equipo un item de la pestaña custom equip como por ejemplo el arcoiris que se equipa en top, hace que mi item normal un hat desaparesca no se por que pasa eso o si hay manera de remediarlo.

otra cosa que deseaba saber es que si aplico este parche COSTUME_GARMENT_rAthena podre usar los garments en la pestaña equip y si es asi cual seria el numero para la posicion?

Index: src/map/clif.c

===================================================================

--- src/map/clif.c (revision 16624)
+++ src/map/clif.c (working copy)
@@ -4098,6 +4098,8 @@
 len = ( ud && ud->walktimer != INVALID_TIMER ) ? clif_set_unit_walking(bl,ud,buf) : clif_set_unit_idle(bl,buf,false);
 clif_send(buf,len,&sd->bl,SELF);

+ clif_changelook(&sd->bl,LOOK_ROBE,sd->status.robe); //Fix Robe's View by [b.O.X]
+
 if (vd->cloth_color)
 clif_refreshlook(&sd->bl,bl->id,LOOK_CLOTHES_COLOR,vd->cloth_color,SELF);

Index: src/map/pc.c

===================================================================

--- src/map/pc.c (revision 16624)
+++ src/map/pc.c (working copy)
@@ -62,7 +62,7 @@
struct fame_list chemist_fame_list[MAX_FAME_LIST];
struct fame_list taekwon_fame_list[MAX_FAME_LIST];

-static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_AMMO};
+static unsigned short equip_pos[EQI_MAX]={EQP_ACC_L,EQP_ACC_R,EQP_SHOES,EQP_GARMENT,EQP_HEAD_LOW,EQP_HEAD_MID,EQP_HEAD_TOP,EQP_ARMOR,EQP_HAND_L,EQP_HAND_R,EQP_COSTUME_HEAD_TOP,EQP_COSTUME_HEAD_MID,EQP_COSTUME_HEAD_LOW,EQP_COSTUME_GARMENT,EQP_AMMO};

#define MOTD_LINE_SIZE 128
static char motd_text[MOTD_LINE_SIZE][CHAT_SIZE_MAX]; // Message of the day buffer [Valaris]
@@ -8168,11 +8168,18 @@
 }
 if(pos & EQP_SHOES)
 clif_changelook(&sd->bl,LOOK_SHOES,0);
- if( pos&EQP_GARMENT )
- {
+
+ if(pos & EQP_GARMENT && pc_checkequip(sd,EQP_COSTUME_GARMENT) == -1) {
 sd->status.robe = id ? id->look : 0;
 clif_changelook(&sd->bl, LOOK_ROBE, sd->status.robe);
 }
+ if(pos & EQP_COSTUME_GARMENT) {
+ if(id){
+ sd->status.robe = id->look;						
+ } else
+ sd->status.robe = 0;
+ clif_changelook(&sd->bl,LOOK_ROBE, sd->status.robe);
+ }

 pc_checkallowskill(sd); //Check if status changes should be halted.

@@ -8305,11 +8312,16 @@

 if(sd->status.inventory[n].equip & EQP_SHOES)
 clif_changelook(&sd->bl,LOOK_SHOES,0);
- if( sd->status.inventory[n].equip&EQP_GARMENT )
- {
+
+ if(sd->status.inventory[n].equip & EQP_GARMENT && pc_checkequip(sd,EQP_COSTUME_GARMENT) == -1) {
 sd->status.robe = 0;
- clif_changelook(&sd->bl, LOOK_ROBE, 0);
+ clif_changelook(&sd->bl,LOOK_ROBE,sd->status.robe);
 }
+
+ if( sd->status.inventory[n].equip & EQP_COSTUME_GARMENT ) {
+ sd->status.robe = ( pc_checkequip(sd,EQP_GARMENT) >= 0 ) ? sd->inventory_data[pc_checkequip(sd,EQP_GARMENT)]->look : 0;
+ clif_changelook(&sd->bl,LOOK_ROBE,sd->status.robe);
+ }

 clif_unequipitemack(sd,n,sd->status.inventory[n].equip,1);

Index: src/map/pc.h

===================================================================

--- src/map/pc.h (revision 16624)
+++ src/map/pc.h (working copy)
@@ -166,7 +166,7 @@
 struct registry save_reg;

 struct item_data* inventory_data[MAX_INVENTORY]; // direct pointers to itemdb entries (faster than doing item_id lookups)
- short equip_index[14];
+ short equip_index[15];
 unsigned int weight,max_weight;
 int cart_weight,cart_num,cart_weight_max;
 int fd;
@@ -543,6 +543,7 @@
 EQP_COSTUME_HEAD_TOP = 0x0400,
 EQP_COSTUME_HEAD_MID = 0x0800,
 EQP_COSTUME_HEAD_LOW = 0x1000,
+ EQP_COSTUME_GARMENT  = 0x2000,
 EQP_AMMO	 = 0x8000, //32768
};

@@ -551,7 +552,7 @@
#define EQP_ARMS (EQP_HAND_R|EQP_HAND_L)
#define EQP_HELM (EQP_HEAD_LOW|EQP_HEAD_MID|EQP_HEAD_TOP)
#define EQP_ACC (EQP_ACC_L|EQP_ACC_R)
-#define EQP_COSTUME (EQP_COSTUME_HEAD_TOP|EQP_COSTUME_HEAD_MID|EQP_COSTUME_HEAD_LOW)
+#define EQP_COSTUME (EQP_COSTUME_HEAD_TOP|EQP_COSTUME_HEAD_MID|EQP_COSTUME_HEAD_LOW|EQP_COSTUME_GARMENT)

/// Equip positions that use a visible sprite
#if PACKETVER < 20110111
@@ -576,6 +577,7 @@
 EQI_COSTUME_TOP,
 EQI_COSTUME_MID,
 EQI_COSTUME_LOW,
+ EQI_COSTUME_GARMENT,
 EQI_AMMO,
 EQI_MAX
};

COSTUME_GARMENT_rAthena.patch

COSTUME_GARMENT_rAthena.patch

Edited by Ziu
Añadido codebox
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  45
  • Topics Per Day:  0.01
  • Content Count:  715
  • Reputation:   83
  • Joined:  01/05/12
  • Last Seen:  

Please use the code or codebox when you post a very long script.

Edited by Lelouch vi Britannia
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  177
  • Topics Per Day:  0.04
  • Content Count:  909
  • Reputation:   247
  • Joined:  11/08/11
  • Last Seen:  

custom equip?

No conozco esa pestaña, ¿te refieres a costume?

Si te equipas el hat en la pestaña costume y tu item normal desaparece es porque no estás usando el rango 0x correctamente, aparte si te refieres a que el sprite de tu hat desaparece por el de arcoiris es porque el costume tab es para eso.. solo visual ponerte gorros encima de otros pero se muestra el sprite del costume por encima del hat del equipo normal.

lee:

 EQP_COSTUME_HEAD_TOP = 0x0400,
 EQP_COSTUME_HEAD_MID = 0x0800,
 EQP_COSTUME_HEAD_LOW = 0x1000,
+ EQP_COSTUME_GARMENT  = 0x2000,
 EQP_AMMO	 = 0x8000, //32768

lo tienes.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.00
  • Content Count:  74
  • Reputation:   1
  • Joined:  12/31/11
  • Last Seen:  

OK entiendo tons es normal que al usar el item costume se visualiza dicho item y el hat no se ve en la cabeza pero si esta equipado...

lo segundo del garmet costume no me quedo claro...

ya que si implemento el parche no se cual es el numero como muestro a continuacion... Y lo mas importante sirve? el parche...

2^12 4096 = Costume Low Headgear

2^11 2048 = Costume Mid Headgear

2^10 1024 = Costume Top Headgear

x^xxxxxx = Costume Garment

2^8 256 = Upper Headgear

2^9 512 = Middle Headgear

2^0 001 = Lower Headgear

2^4 016 = Armor

2^1 002 = Weapon

2^5 032 = Shield

2^2 004 = Garment

2^6 064 = Footgear

2^3 008 = Accessory 1

2^7 128 = Accessory 2

Edited by Kuroko Sempai
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...