Jump to content
Brynner

@aura patch

Recommended Posts

Well, I haven't tested it myself, but it's supposed this changes your aura whenever you use this command and type an aura ID. These auras also seem not to be customizable at all by seeing this topic.

Share this post


Link to post
Share on other sites

As a general rule, almost no Hercules source modifications work in any other RO emulator. This particular one isn't compatible with rAthena.

Share this post


Link to post
Share on other sites

I need help. I'm getting these errors

 

        CC      clif.cclif.c: In function âaura_getAuraEffectâ:clif.c:267: error: âstruct mmo_charstatusâ has no member named âauraâmake[1]: *** [obj_sql/clif.o] Error 1make[1]: Leaving directory `/home/mommeh/hercules/Hercules/src/map'make: *** [map_sql] Error 2

 

 

Thank you so much!

Share this post


Link to post
Share on other sites

File Name: @aura patch

File Submitter: bgamez23

File Submitted: 20 Apr 2013

File Category: Source Modifications

 

@aura commands for hercules

 

Click here to download this file

Server crashes when deactivating hide..

 

@edit

 

Server crashes when deactivating hide, cloak, chasewalk.. works for @hide tho

Edited by quesoph

Share this post


Link to post
Share on other sites

try this: (not mine)

 

Index: src/common/mmo.h===================================================================--- src/common/mmo.h    (revision 12718)+++ src/common/mmo.h    (working copy)@@ -248,7 +248,7 @@        unsigned char karma;        short hair,hair_color,clothes_color;        int party_id,guild_id,pet_id,hom_id;-       int fame;+       int fame,pvprank,aura;         short weapon; // enum weapon_type        short shield; // view-idIndex: src/map/atcommand.c===================================================================--- src/map/atcommand.c (revision 12718)+++ src/map/atcommand.c (working copy)@@ -8200,6 +8200,43 @@ }  /*==========================================+ * Auras personalizadas+ *------------------------------------------*/+int atcommand_aura(const int fd, struct map_session_data* sd, const char* command, const char* message)+{+       struct map_session_data *pl_sd = 0;+       int type = 0;++       if (!message || !*message || sscanf(message, "%d %[^n]", &type, atcmd_player_name) < 2)+       {+               if (!message || !*message || sscanf(message, "%d", &type) < 1)+               {+                       clif_displaymessage(fd, "Please, enter at least an option (usage: @aura  ).");+                       return -1;+               }++               atcmd_player_name[0] = 0;+               pl_sd = sd;+       }++       if( pl_sd != sd )+       {+               if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL)+                       return -1;+       }++       sprintf(atcmd_output, "Current Aura: %d", pl_sd->status.aura);+       clif_displaymessage(fd, atcmd_output);++       pl_sd->status.aura = type;+       pc_setglobalreg(pl_sd,"USERAURA",type);++       pc_setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, 3);++       return 0;+}++/*==========================================  * AUCTION SYSTEM  *------------------------------------------*/ int atcommand_auction(const int fd, struct map_session_data *sd, const char *command, const char *message)@@ -8552,6 +8589,7 @@        { "homshuffle",        60,     atcommand_homshuffle },        { "showmobs",          10,     atcommand_showmobs },        { "feelreset",         10,     atcommand_feelreset },+       { "aura",               1,     atcommand_aura },        { "auction",           60,     atcommand_auction },        { "mail",               1,     atcommand_mail },        { "noks",               0,     atcommand_ksprotection },Index: src/map/clif.c===================================================================--- src/map/clif.c      (revision 12718)+++ src/map/clif.c      (working copy)@@ -95,6 +95,139 @@ int clif_parse (int fd);  /*==========================================+ * @aura+ *------------------------------------------*/+static int auraTable[][3] = {+       {  -1,  -1,  -1 },+       // Reserved for PK Mode+       { 586,  -1,  -1 }, // LH+       { 586, 362,  -1 }, // LH Mvp+       { 586, 362, 240 }, // 1є PK Place+       // Basic Auras+       { 418,  -1,  -1 }, // Red Fury+       { 486,  -1,  -1 }, // Blue Fury+       { 485,  -1,  -1 }, // White Fury+       { 239,  -1,  -1 }, // Aura Red+       { 240,  -1,  -1 }, // Aura White+       { 241,  -1,  -1 }, // Aura Yellow+       { 620,  -1,  -1 }, // Aura Blue+       { 202,  -1,  -1 }, // Lvl 99 Bubbles+       { 362,  -1,  -1 }, // Advanced Lvl 99 Bubbles+       { 678,  -1,  -1 }, // Brazil Aura Bubbles+       { 679,  -1,  -1 }, // Brazil Aura+       { 680,  -1,  -1 }, // Brazil Aura Floor+       // 2 Sets+       { 239, 418,  -1 },+       { 239, 486,  -1 },+       { 239, 485,  -1 },+       { 240, 418,  -1 },+       { 240, 486,  -1 },+       { 240, 485,  -1 },+       { 241, 418,  -1 },+       { 241, 486,  -1 },+       { 241, 485,  -1 },+       { 620, 418,  -1 },+       { 620, 486,  -1 },+       { 620, 485,  -1 },+       // Full Sets+       { 239, 418, 202 },+       { 239, 486, 202 },+       { 239, 485, 202 },+       { 240, 418, 202 },+       { 240, 486, 202 },+       { 240, 485, 202 },+       { 241, 418, 202 },+       { 241, 486, 202 },+       { 241, 485, 202 },+       { 620, 418, 202 },+       { 620, 486, 202 },+       { 620, 485, 202 },+       { 239, 418, 362 },+       { 239, 486, 362 },+       { 239, 485, 362 },+       { 240, 418, 362 },+       { 240, 486, 362 },+       { 240, 485, 362 },+       { 241, 418, 362 },+       { 241, 486, 362 },+       { 241, 485, 362 },+       { 620, 418, 362 },+       { 620, 486, 362 },+       { 620, 485, 362 },+       { 239, 418, 678 },+       { 239, 486, 678 },+       { 239, 485, 678 },+       { 240, 418, 678 },+       { 240, 486, 678 },+       { 240, 485, 678 },+       { 241, 418, 678 },+       { 241, 486, 678 },+       { 241, 485, 678 },+       { 620, 418, 678 },+       { 620, 486, 678 },+       { 620, 485, 678 },+       // Oficial Set+       { 680, 679, 678 },+       {  -1,  -1,  -1 }+};++int aura_getSize()+{+       return sizeof(auraTable)/(sizeof(int) * 3) - 1;+}++int aura_getAuraEffect(struct map_session_data *sd, short pos)+{+       int aura = sd->status.aura;++       if (pos < 0 || pos > 2)+               return -1;++       if (aura > aura_getSize() || aura < 0)+               return -1;++       return auraTable[aura][pos];+}++void clif_sendaurastoone(struct map_session_data *sd, struct map_session_data *dsd)+{+       int effect1, effect2, effect3;++       if (pc_ishiding(sd))+               return;++       effect1 = aura_getAuraEffect(sd, 0);+       effect2 = aura_getAuraEffect(sd, 1);+       effect3 = aura_getAuraEffect(sd, 2);++       if (effect1 >= 0)+               clif_specialeffect_single(&sd->bl, effect1, dsd->fd);+       if (effect2 >= 0)+               clif_specialeffect_single(&sd->bl, effect2, dsd->fd);+       if (effect3 >= 0)+               clif_specialeffect_single(&sd->bl, effect3, dsd->fd);+}++void clif_sendauras(struct map_session_data *sd,  enum send_target type)+{+       int effect1, effect2, effect3;++       if (pc_ishiding(sd))+               return;++       effect1 = aura_getAuraEffect(sd, 0);+       effect2 = aura_getAuraEffect(sd, 1);+       effect3 = aura_getAuraEffect(sd, 2);++       if (effect1 >= 0)+               clif_specialeffect(&sd->bl, effect1, type);+       if (effect2 >= 0)+               clif_specialeffect(&sd->bl, effect2, type);+       if (effect3 >= 0)+               clif_specialeffect(&sd->bl, effect3, type);+}++/*==========================================  * mapЋI‚МipђЭ’и  *------------------------------------------*/ int clif_setip(const char* ip)@@ -1016,6 +1149,7 @@                                clif_specialeffect(bl,423,AREA);                        else if(sd->state.size==1)                                clif_specialeffect(bl,421,AREA);+                       clif_sendauras((TBL_PC*)bl, AREA);                }        break;        case BL_MOB:@@ -3388,6 +3522,7 @@                                clif_specialeffect_single(bl,423,sd->fd);                        else if(tsd->state.size==1)                                clif_specialeffect_single(bl,421,sd->fd);+                       clif_sendaurastoone(tsd, sd);                }                break;        case BL_NPC:@@ -3413,6 +3548,37 @@        } } +int clif_insight2(struct block_list *bl,va_list ap)+{+       struct block_list *tbl;+       struct map_session_data *sd, *tsd;+       int flag;++       tbl = va_arg(ap,struct block_list*);+       flag = va_arg(ap,int);++       if (bl == tbl && !flag)+               return 0;++       sd = BL_CAST(BL_PC, bl);+       tsd = BL_CAST(BL_PC, tbl);++       if (sd && sd->fd)+       {+               if (bl == tbl)+                       clif_sendaurastoone(sd, tsd);+               else+                       clif_getareachar_unit(sd, tbl);+       }++       return 0;+}++void clif_getareachar_char(struct block_list *bl, short flag)+{+       map_foreachinarea(clif_insight2, bl->m, bl->x-AREA_SIZE, bl->y-AREA_SIZE, bl->x+AREA_SIZE, bl->y+AREA_SIZE,BL_PC, bl, flag);+}+ //Modifies the type of damage according to status changes [Skotlex] //Aegis data specifies that: 4 endure against single hit sources, 9 against multi-hit. #define clif_calc_delay(type,div,damage,delay) ((delay)==0&&(damage)>0?((div)>1?9:4):type)Index: src/map/clif.h===================================================================--- src/map/clif.h      (revision 12718)+++ src/map/clif.h      (working copy)@@ -415,6 +415,10 @@ int do_final_clif(void); int do_init_clif(void); +// [@aura]+void clif_sendauras(struct map_session_data *sd,  enum send_target type);+void clif_getareachar_char(struct block_list *bl, short flag);+ #ifndef TXT_ONLY // MAIL SYSTEM void clif_Mail_window(int fd, int flag);Index: src/map/pc.c===================================================================--- src/map/pc.c        (revision 12718)+++ src/map/pc.c        (working copy)@@ -898,6 +898,9 @@        sd->change_level = pc_readglobalreg(sd,"jobchange_level");        sd->die_counter = pc_readglobalreg(sd,"PC_DIE_COUNTER"); +       // @Aura+       sd->status.aura = pc_readglobalreg(sd,"USERAURA");+        // Cash shop        sd->cashPoints = pc_readaccountreg(sd,"#CASHPOINTS");        sd->kafraPoints = pc_readaccountreg(sd,"#KAFRAPOINTS");Index: src/map/status.c===================================================================--- src/map/status.c    (revision 12718)+++ src/map/status.c    (working copy)@@ -5038,6 +5038,7 @@        vd = status_get_viewdata(bl);        calc_flag = StatusChangeFlagTable[type];        if(!(flag&4)) //&4 - Do not parse val settings when loading SCs+       {        switch(type)        {                case SC_DECREASEAGI:@@ -5931,6 +5932,15 @@                                return 0;                        }        }+       // @aura+       if (sd && sd->status.aura > 0 &&+               (type == SC_HIDING || type == SC_CLOAKING || type == SC_CHASEWALK))+       {+               sd->status.aura *= -1;+               clif_clearunit_area(&sd->bl, 0);+               clif_getareachar_char(&sd->bl, 0);+       }+       }        else //Special considerations when loading SC data.        switch( type )        {@@ -6693,6 +6703,14 @@                opt_flag = 0;        } +       // @auras+       if (sd && sd->status.aura < 0 &&+               (type == SC_HIDING || type == SC_CLOAKING || type == SC_CHASEWALK))+       {+               sd->status.aura *= -1;+               clif_sendauras(sd, AREA_WOS);+       }+        if (calc_flag&SCB_DYE)        {       //Restore DYE color                if (vd && !vd->cloth_color && sce->val4)

or

 

http://rathena.org/board/topic/79770-atcommand-aura/

Share this post


Link to post
Share on other sites

Hi. I got errors when compiling using latest hercules rev.

 

 

..srcmapatcommand.c(8057): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8057): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8057): error C2100: illegal indirection
..srcmapatcommand.c(8057): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8057): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
..srcmapatcommand.c(8057): warning C4024: 'sscanf' : different types for formal and actual parameter 1
..srcmapatcommand.c(8058): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8058): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8058): error C2100: illegal indirection
..srcmapatcommand.c(8058): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8058): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
..srcmapatcommand.c(8058): warning C4024: 'sscanf' : different types for formal and actual parameter 1
..srcmapatcommand.c(8059): error C2065: 'fd' : undeclared identifier
..srcmapatcommand.c(8064): error C2065: 'sd' : undeclared identifier
..srcmapatcommand.c(8064): warning C4047: '=' : 'map_session_data *' differs in levels of indirection from 'int'
..srcmapatcommand.c(8067): error C2065: 'sd' : undeclared identifier
..srcmapatcommand.c(8067): warning C4047: '!=' : 'map_session_data *' differs in levels of indirection from 'int'
..srcmapatcommand.c(8074): error C2065: 'fd' : undeclared identifier
..srcmapatcommand.c(9798): error C2065: 'atcommand_aura' : undeclared identifier
..srcmapatcommand.c(9798): warning C4047: 'initializing' : 'AtCommandFunc' differs in levels of indirection from 'int'

 

Hope someone can help me with this thanks!!!!

Share this post


Link to post
Share on other sites

Hi. I got errors when compiling using latest hercules rev.

 

 

..srcmapatcommand.c(8057): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8057): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8057): error C2100: illegal indirection
..srcmapatcommand.c(8057): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8057): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
..srcmapatcommand.c(8057): warning C4024: 'sscanf' : different types for formal and actual parameter 1
..srcmapatcommand.c(8058): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8058): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8058): error C2100: illegal indirection
..srcmapatcommand.c(8058): error C2065: 'message' : undeclared identifier
..srcmapatcommand.c(8058): warning C4047: 'function' : 'const char *' differs in levels of indirection from 'int'
..srcmapatcommand.c(8058): warning C4024: 'sscanf' : different types for formal and actual parameter 1
..srcmapatcommand.c(8059): error C2065: 'fd' : undeclared identifier
..srcmapatcommand.c(8064): error C2065: 'sd' : undeclared identifier
..srcmapatcommand.c(8064): warning C4047: '=' : 'map_session_data *' differs in levels of indirection from 'int'
..srcmapatcommand.c(8067): error C2065: 'sd' : undeclared identifier
..srcmapatcommand.c(8067): warning C4047: '!=' : 'map_session_data *' differs in levels of indirection from 'int'
..srcmapatcommand.c(8074): error C2065: 'fd' : undeclared identifier
..srcmapatcommand.c(9798): error C2065: 'atcommand_aura' : undeclared identifier
..srcmapatcommand.c(9798): warning C4047: 'initializing' : 'AtCommandFunc' differs in levels of indirection from 'int'

 

Hope someone can help me with this thanks!!!!

 

 

try This

 

atcommand.h+ /*==========================================+ * Auras personalizadas+ *------------------------------------------*/+ACMD(aura)+{+	   struct map_session_data *pl_sd = 0;+	   int type = 0;++	   if (!message || !*message || sscanf(message, "%d %[^n]", &type, atcmd_player_name) < 2)+	   {+			   if (!message || !*message || sscanf(message, "%d", &type) < 1)+			   {+					   clif->message(fd, "Please, enter at least an option (usage: @aura  ).");+					   return -1;+			   }++			   atcmd_player_name[0] = 0;+			   pl_sd = sd;+	   }++	   if( pl_sd != sd )+	   {+			   if ((pl_sd = map_nick2sd(atcmd_player_name)) == NULL)+					   return -1;+	   }++	   sprintf(atcmd_output, "Current Aura: %d", pl_sd->status.aura);+	   clif->message(fd, atcmd_output);++	   pl_sd->status.aura = type;+	   pc_setglobalreg(pl_sd,"USERAURA",type);++	   pc_setpos(pl_sd, pl_sd->mapindex, pl_sd->bl.x, pl_sd->bl.y, 3);++	   return 0;+}

Share this post


Link to post
Share on other sites

some1 got a release of the aurás used in this patch ?

 

+static int auraTable[][3] = {
+ {  -1,  -1,  -1 },
+ // Reserved for PK Mode
+ { 586,  -1,  -1 }, // LH
+ { 586, 362,  -1 }, // LH Mvp
+ { 586, 362, 240 }, // 1? PK Place
+ // Basic Auras
+ { 418,  -1,  -1 }, // Red Fury
+ { 486,  -1,  -1 }, // Blue Fury
+ { 485,  -1,  -1 }, // White Fury
+ { 239,  -1,  -1 }, // Aura Red
+ { 240,  -1,  -1 }, // Aura White
+ { 241,  -1,  -1 }, // Aura Yellow
+ { 620,  -1,  -1 }, // Aura Blue
+ { 202,  -1,  -1 }, // Lvl 99 Bubbles
+ { 362,  -1,  -1 }, // Advanced Lvl 99 Bubbles
+ { 678,  -1,  -1 }, // Brazil Aura Bubbles
+ { 679,  -1,  -1 }, // Brazil Aura
+ { 680,  -1,  -1 }, // Brazil Aura Floor
+ // 2 Sets
+ { 239, 418,  -1 },
+ { 239, 486,  -1 },
+ { 239, 485,  -1 },
+ { 240, 418,  -1 },
+ { 240, 486,  -1 },
+ { 240, 485,  -1 },
+ { 241, 418,  -1 },
+ { 241, 486,  -1 },
+ { 241, 485,  -1 },
+ { 620, 418,  -1 },
+ { 620, 486,  -1 },
+ { 620, 485,  -1 },
+ // Full Sets
+ { 239, 418, 202 },
+ { 239, 486, 202 },
+ { 239, 485, 202 },
+ { 240, 418, 202 },
+ { 240, 486, 202 },
+ { 240, 485, 202 },
+ { 241, 418, 202 },
+ { 241, 486, 202 },
+ { 241, 485, 202 },
+ { 620, 418, 202 },
+ { 620, 486, 202 },
+ { 620, 485, 202 },
+ { 239, 418, 362 },
+ { 239, 486, 362 },
+ { 239, 485, 362 },
+ { 240, 418, 362 },
+ { 240, 486, 362 },
+ { 240, 485, 362 },
+ { 241, 418, 362 },
+ { 241, 486, 362 },
+ { 241, 485, 362 },
+ { 620, 418, 362 },
+ { 620, 486, 362 },
+ { 620, 485, 362 },
+ { 239, 418, 678 },
+ { 239, 486, 678 },
+ { 239, 485, 678 },
+ { 240, 418, 678 },
+ { 240, 486, 678 },
+ { 240, 485, 678 },
+ { 241, 418, 678 },
+ { 241, 486, 678 },
+ { 241, 485, 678 },
+ { 620, 418, 678 },
+ { 620, 486, 678 },
+ { 620, 485, 678 },
+ // Oficial Set
+ { 680, 679, 678 },
+ {  -1,  -1,  -1 }

Share this post


Link to post
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.   Restore formatting

  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.

Loading...

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.