Jump to content

Faction System


Lilith

Recommended Posts


  • Group:  Members
  • Topic Count:  17
  • Topics Per Day:  0.00
  • Content Count:  76
  • Reputation:   3
  • Joined:  02/24/12
  • Last Seen:  

doesn't work for me.

script.c error

Edited by SaZzuke
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  33
  • Topics Per Day:  0.01
  • Content Count:  231
  • Reputation:   24
  • Joined:  12/18/11
  • Last Seen:  

There is a BUG the map server crashes when you choose faction if your not a faction leader or a faction member

what npc did this use? for the NPC named faction manager?

Edited by lakasmonk
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

guys how to fix this.

faction.jpg

why always patch with tortoise (not manual) it's erorr?this message is locked Rathena...-__-a..so complicated...

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Как правильно установить альянс для рас, если нужно более 1 альянса?

Например:

1,Человек...

2,Гном...

3,Эльф...

И мне надо поставить, чтобы у человека был альянс с гномом и эльфом

@kangfredy

try to check added lines in your src. You don't have script command Setfaction.

Did you recompile server?

Edited by Oxxy
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

@oxxy...recompile?how to recomplie? same as compile server?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  106
  • Reputation:   3
  • Joined:  01/01/12
  • Last Seen:  

Yeap.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

Как правильно установить альянс для рас, если нужно более 1 альянса?

Например:

1,Человек...

2,Гном...

3,Эльф...

И мне надо поставить, чтобы у человека был альянс с гномом и эльфом

Пока не придумал как именно реализовать это.

Сейчас получается только если все трое в альянсе.

Иначе говоря:

[1] = [2] = [3]

Ты, как я понял, хочешь сделать так:

[1] = [2]
[1] = [3]
[2] != [3]

Есть идея либо создать для альянсов отдельный файл, либо каждая вторая строка в faction_db.txt будет содержать id дружественных фракций для каждой первой строки.

Что то вроде этого:

// Faction ID: 1

1,Angel,8,6,1,1,1,1,0x00BFFF,{ bonus bInt,3; },{ bonus bInt,30; }

2,3 - id дружественных фракций

// Faction ID: 2

2,Elf,7,0,1,0,1,2,0x7CFC00,{ bonus bDex,3; },{ bonus bDex,30; }

1 - id дружественных фракций

// Faction ID: 3

3,Demon,1,9,1,2,0,3,0xFF8C00,{ bonus bStr,3; },{ bonus bStr,30; }

1 - id дружественных фракций

Но у меня нет времени =) Честно говоря я вообще не хотел выкладывать эту систему, т.к. мало времени на её доработку.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

after recompile is still eror set faction is uknown?why?any body can helpme?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  21
  • Topics Per Day:  0.00
  • Content Count:  56
  • Reputation:   1
  • Joined:  11/21/11
  • Last Seen:  

hey please help..

i got this error when try to compile the server

1>------ Build started: Project: map-server_sql, Configuration: Debug Win32 ------

1> faction.c

1>d:\campur\coba server\rathena 16433\src\map\faction.c(439): error C2143: syntax error : missing ')' before 'constant'

1>d:\campur\coba server\rathena 16433\src\map\faction.c(439): error C2059: syntax error : ')'

here's my faction.c

// Ñèñòåìà ôðàêöèé (c) Lilith
// Íå êîïèðîâàòü, íå èçìåíÿòü è íå îïóáëèêîâûâàòü áåç ðàçðåøåíèÿ

#include "../common/db.h"
#include "../common/malloc.h"
#include "../common/socket.h"
#include "../common/showmsg.h"
#include "../common/strlib.h"
#include "../common/nullpo.h"

#include "faction.h"
#include "elemental.h"
#include "homunculus.h"
#include "map.h"
#include "mercenary.h"
#include "mob.h"
#include "npc.h"
#include "pc.h"
#include "pet.h"
#include "skill.h"
#include "script.h"

#include <stdlib.h>

static DBMap* faction_db;
static DBMap* aura_db;

int faction_get_exp(struct map_session_data *sd,struct map_session_data *tsd)
{
   struct faction_data* db, *t_db;

   db = faction_search(sd->status.faction_id);
   t_db = faction_search(tsd->status.faction_id);

   if( db == NULL || t_db == NULL )
       return 0;

   return 0;
}

// Àóðà ìàñòåðà ôðàêöèè ( àíàëîã àóðû ãëàâû ãèëüäèè )
void faction_factionaura(struct map_session_data *sd)
{
   struct skill_unit_group* group = NULL;

   if( sd->sc.data[sC_FACTION_AURA] && (group = skill_id2group(sd->sc.data[sC_FACTION_AURA]->val4)) )
   {
       skill_delunitgroup(group);
       status_change_end(&sd->bl,SC_FACTION_AURA,INVALID_TIMER);
   }

   group = skill_unitsetting(&sd->bl,FACTION_AURA,1,sd->bl.x,sd->bl.y,0);

   if( group )
       sc_start4(&sd->bl,SC_FACTION_AURA,100,1,group->faction_id,0,group->group_id,600000);

   return;
}

// Îòîáðàæåíèå çíà÷êà áèòâû íàä ãîëîâîé
void faction_sendemblem_area(struct map_session_data *sd)
{
   struct faction_data* db = faction_search(sd->status.faction_id);
   unsigned char buf[33];

   nullpo_retv(sd);

   WBUFW(buf, 0) = 0x2dd;
   WBUFL(buf,2) = sd->bl.id;
   safestrncpy((char*)WBUFP(buf,6), sd->status.name, NAME_LENGTH);
   WBUFW(buf,30) = ( db->alliance_id ? db->alliance_id : sd->status.faction_id );
   clif_send(buf,packet_len(0x2dd), &sd->bl, AREA);
}

// Îòîáðàæåíèå çíà÷êà áèòâû íàä ãîëîâîé
void faction_sendemblem_single(int fd, struct map_session_data *sd)
{
   struct faction_data* db = faction_search(sd->status.faction_id);

   nullpo_retv(sd);

   WFIFOHEAD(fd,32);
   WFIFOW(fd,0) = 0x2dd;
   WFIFOL(fd,2) = sd->bl.id;
   safestrncpy((char*)WFIFOP(fd,6), sd->status.name, NAME_LENGTH);
   WFIFOW(fd,30) = ( db->alliance_id ? db->alliance_id : sd->status.faction_id );
   WFIFOSET(fd,packet_len(0x2dd));
}

// Îòîáðàæåíèå àóðû íîñèòåëÿ
void faction_aura_load(struct map_session_data *tsd, struct map_session_data *sd)
{
   struct faction_data* db = faction_search(tsd->status.faction_id);
   struct aura_data* a_db = aura_search(tsd->status.faction_id);
   int e1,e2,e3;

   if( pc_ishiding(tsd) || !map[tsd->bl.m].flag.fvf || a_db == NULL )
       return;

   if( (e1 = a_db->effect_1) )
       clif_specialeffect_single(&tsd->bl, e1, sd->fd);    // Ýôôåêò #1
   if( (e2 = a_db->effect_2) )
       clif_specialeffect_single(&tsd->bl, e2, sd->fd);    // Ýôôåêò #2
   if( (e3 = a_db->effect_3) )
       clif_specialeffect_single(&tsd->bl, e3, sd->fd);    // Ýôôåêò #3
}

// Îòîáðàæåíèå àóðû âñåì â çîíå type
void faction_aura_send(struct map_session_data *sd, enum send_target type)
{
   struct faction_data* db = faction_search(sd->status.faction_id);
   struct aura_data* a_db = aura_search(sd->status.faction_id);
   int e1,e2,e3;

   if( pc_ishiding(sd) || !map[sd->bl.m].flag.fvf || a_db == NULL )
       return;

   if( (e1 = a_db->effect_1) )
       clif_specialeffect(&sd->bl, e1, type);    // Ýôôåêò #1
   if( (e2 = a_db->effect_2) )
       clif_specialeffect(&sd->bl, e2, type);    // Ýôôåêò #2
   if( (e3 = a_db->effect_3) )
       clif_specialeffect(&sd->bl, e3, type);    // Ýôôåêò #3
}

// Ñîêðûòèå àóðû íîñèòåëÿ ( åñëè íîñèòåëü â õàéäå)
int faction_aura_update(struct block_list *bl,va_list ap)
{
   struct block_list *tbl = va_arg(ap,struct block_list*);
   struct map_session_data *sd = BL_CAST(BL_PC,bl);

   if( bl == tbl || tbl->type != BL_PC || !sd )
       return 0;

   clif_getareachar_unit(sd,tbl);

   return 0;
}

// Ðàñ÷¸ò óðîíà íà òåððèòîðèè âîéíû ôðàêöèé
int faction_calc_damage(struct block_list *src, struct block_list *bl, int damage, int div_, int skill_num, int skill_lv, int flag)
{
   if( damage )
   switch( skill_num )
   {
       case PA_PRESSURE:
       case HW_GRAVITATION:
       case NJ_ZENYNAGE:
           break;
       default:
           if( flag&BF_SKILL )
           {
               if( flag&BF_WEAPON )
                   damage = damage * battle_config.fvf_weapon_damage_rate/100;
               if( flag&BF_MAGIC )
                   damage = damage * battle_config.fvf_magic_damage_rate/100;
               if(    flag&BF_MISC )
                   damage = damage * battle_config.fvf_misc_damage_rate/100;
           }
           else
           {
               if( flag&BF_SHORT )
                   damage = damage * battle_config.fvf_short_damage_rate/100;
               if( flag&BF_LONG )
                   damage = damage * battle_config.fvf_long_damage_rate/100;
           }

           if( !damage )
               damage = 1;
   }

   return damage;
}

// Ïðèñâàèâàíèå âèçóàëüíîãî ðàçìåðà â çàâèñèìîñòè îò ëîêàöèè
void faction_display_size(struct map_session_data *sd)
{
   struct faction_data* db = faction_search(sd->status.faction_id);

   if( db )
   {
       if( map[sd->bl.m].flag.fvf )
               sd->state.size = db->size;
       else
       {
           sd->state.size = (sd->class_&JOBL_BABY)?1:0;

           if (battle_config.character_size && pc_isriding(sd))
           {
               if (sd->class_&JOBL_BABY)
               {
                   if (battle_config.character_size&SZ_BIG)
                       sd->state.size++;
               }
               else if(battle_config.character_size&SZ_MEDIUM)
                   sd->state.size++;
           }
       }
   }
}

// Îòîáðàæåíèå HP ïåðñîíàæåé îäíîé ôðàêöèè
void faction_show_hp(struct map_session_data *sd)
{
   unsigned char buf[34];
   const int cmd = 0x2e0;

   nullpo_retv(sd);

   WBUFW(buf,0) = cmd;
   WBUFL(buf,2) = sd->status.account_id;
   memcpy(WBUFP(buf,6), sd->status.name, NAME_LENGTH);

   if( sd->battle_status.max_hp > INT16_MAX )
   {
       WBUFW(buf,30) = sd->battle_status.hp/(sd->battle_status.max_hp/100);
       WBUFW(buf,32) = 100;
   }
   else
   {
       WBUFW(buf,30) = sd->battle_status.hp;
       WBUFW(buf,32) = sd->battle_status.max_hp;
   }

   clif_send(buf, packet_len(cmd), &sd->bl, FACTION_AREA_WOS);
}

// Ïîèñê ID ôðàêöèè
struct faction_data* faction_search(int id)
{
   return (struct faction_data*)idb_get(faction_db,id);
}

// Ïîèñê ID àóðû
struct aura_data* aura_search(int id)
{
   return (struct aura_data*)idb_get(aura_db,id);
}

// Âîçâðàùåíèå ID ôðàêöèè
int faction_get_id(struct block_list* bl)
{
   if( bl )
   switch( bl->type )
   {
       case BL_PC:            // Èãðîê
           return ((TBL_PC*)bl)->status.faction_id;
       case BL_PET:        // Ïèòîìåö
           if( ((TBL_PET*)bl)->msd )
               return ((TBL_PET*)bl)->msd->status.faction_id;
           break;
       case BL_MOB:        // Ìîíñòð
       {
           struct map_session_data *msd;
           struct mob_data *md = (TBL_MOB*)bl;
           if( md->special_state.ai && (msd = map_id2sd(md->master_id)) != NULL )
               return msd->status.faction_id;
           return md->faction_id;
       }
       case BL_HOM:        // Ãîìóíêóëóñ
           if( ((TBL_HOM*)bl)->master )
               return ((TBL_HOM*)bl)->master->status.faction_id;
           break;
       case BL_MER:        // Íà¸ìíèê
           if( ((TBL_MER*)bl)->master )
               return ((TBL_MER*)bl)->master->status.faction_id;
           break;
       case BL_ELEM:        // Ýëåìåíòàëü
           if( ((TBL_ELEM*)bl)->master )
               return ((TBL_ELEM*)bl)->master->status.faction_id;
           break;
       case BL_SKILL:        // Íàâûê
           return ((TBL_SKILL*)bl)->group->faction_id;
   }

   return 0;
}

// Ïðîâåðêà íà àëüÿíñ
int faction_check_alliance(struct block_list* bl, struct block_list* t_bl)
{
   struct faction_data* db, *t_db;

   db = faction_search(faction_get_id(bl));
   t_db = faction_search(faction_get_id(t_bl));

   if( db == NULL || t_db == NULL )
       return 0;

   if( db->alliance_id > 0 && db->alliance_id == t_db->alliance_id )
       return 1;

   return 0;
}

// Ïðèñâàèâàíèå ðàñû, ýåëåìåíòà, óð. ýëåìåíòà, ðàçìåðà è îïðåäåë¸ííîãî áîíóñà
void faction_calc(struct map_session_data *sd)
{
   struct status_data *status = &sd->base_status;
   struct status_change *sc = &sd->sc;
   struct faction_data* db;

   if( (db = faction_search(sd->status.faction_id)) == NULL )
       return;

   status->race     = db->race;                // Ðàñà
   status->def_ele    = db->ele;                // Ýëåìåíò
   status->ele_lv     = db->ele_lvl;            // Óðîâåíü ýëåìåíòà
   status->size    = db->size;                // Ðàçìåð
   if( db->script )
       run_script(db->script,0,sd->bl.id,0);    // Áîíóñ

   if( sc && sc->data[sC_FACTION_AURA] && sc->data[sC_FACTION_AURA]->val2 )
   {
       struct faction_data* mdb = faction_search(sc->data[sC_FACTION_AURA]->val2);
       if( mdb->aura_bonus )
           run_script(mdb->aura_bonus,0,sd->bl.id,0);    // Áîíóñ àóðû
   }

   {
       struct item_data *item_data;
       int i;

       for( i = 0; i < MAX_RELIC; i++ )
       {
           if( (item_data = itemdb_exists(db->relic[i])) )
           {
               if( item_data->script )
                   run_script(item_data->script,0,sd->bl.id,0);    // Áîíóñ ðåëèêâèè
           }
       }
   }

}

// ×òåíèå ôàéëà êîíôèãóðàöèè
// <ID>,<Íàçâàíèå ôðàêöèè>,<Ðàñà>,<Ýëåìåíò>,<Óðîâåíü ýëåìåíòà>,<Ðàçìåð>,<ID Àëüÿíñà>,<ID Àóðû>,<Öâåò ñîîáùåíèé â ÷àòå>,<{ Áîíóñ }>,<{ Áîíóñ àóðû }>
static int faction_readdb(void)
{
   struct faction_data* db;
   const char* filename = "faction_db.txt";
   uint32 lines = 0, count = 0;
   char line[1024], path[256];
   FILE* fp;

   sprintf(path, "%s/%s", db_path, filename);
   if((fp = fopen(path, "r")) == NULL )
   {
       ShowWarning("faction_readdb: Ôàéë íå íàéäåí \"%s\", ïðîïóñê.\n", path);
       return 0;
   }

   while(fgets(line, sizeof(line), fp))
   {
       char *str[32], *p;
       int i, id, race, ele, ele_lvl, all_id, aura, size;
       unsigned long chat_color;

       lines++;
       if(line[0] == '/' && line[1] == '/')
           continue;
       memset(str, 0, sizeof(str));

       p = line;

       while( ISSPACE(*p) )
           ++p;
       if( *p == '\0' )
           continue;
       for( i = 0; i < 9; ++i )
       {
           str[i] = p;
           p = strchr(p,',');
           if( p == NULL )
               break;
           *p = '\0';
           ++p;
       }

       if( p == NULL )
       {
           ShowError("faction_readdb: Ïóñòûå ïîëÿ â ñòðîêå %d ôàéëà \"%s\" (ðàñà %d), ïðîïóñê.\n", lines, path, atoi(str[0]));
           continue;
       }

       // Óíèêàëüíûé ID
       id = atoi(str[0]);
       if( id < 1 || id > MAX_FACTION )
       {
           ShowError("faction_readdb : Íåâåðíûé ID ôðàêöèè %d.\n", id);
           continue;
       }
       else if( faction_search(id) )
       {
           ShowError("faction_readdb : Äóáëèðîâàíèå ID %d, ñòðîêà %d.\n", id, lines);
           continue;
       }

       // Ðàñà
       race = atoi(str[2]);
       if( race < RC_FORMLESS || race > RC_DRAGON )
       {
           ShowError("faction_readdb : Íåèçâåñòíàÿ ðàñà %d.\n", race);
           continue;
       }

       // Ýëåìåíò
       ele = atoi(str[3]);
       if( ele < ELE_NEUTRAL || ele > ELE_UNDEAD )
       {
           ShowError("faction_readdb : Íåèçâåñòíûé ýëåìåíò %d.\n", ele);
           continue;
       }

       // Óðîâåíü ýëåìåíòà
       ele_lvl = atoi(str[4]);
       if( ele_lvl < 1 || ele_lvl > 4 )
       {
           ShowError("faction_readdb : Íåâåðíûé óðîâåíü ýëåìåíòà %d.\n", ele_lvl);
           continue;
       }

       // Ðàçìåð
       size = atoi(str[5]);
       if( size < 0 || size > 2 )
       {
           ShowError("faction_readdb : Íåâåðíûé ðàçìåð %d.\n", size);
           continue;
       }

       // ID àëüÿíñà
       all_id = atoi(str[6]);
       if( all_id < 0 )
       {
           ShowError("faction_readdb : Íåâåðíûé ID àëüÿíñà %d\n", all_id);
           continue;
       }

       all_id += MIN_FACTION_ALLIANCE;

       // ID àóðû
       aura = atoi(str[7]);
       if( aura < 0 )
       {
           ShowError("faction_readdb : Íåâåðíûé ID àóðû %d.\n", aura);
           continue;
       }

       // Öâåò ñîîáùåíèé â ÷àòå
       chat_color = strtoul(str[8],NULL,0);
       // RGB -> BGR
       chat_color = (chat_color&0x0000FF)<<16|(chat_color&0x00FF00)|(chat_color&0xFF0000)>>16;

       // Áîíóñ
       if( *p != '{' )
       {
           ShowError("faction_readdb: Íåâåðíûé ôîðìàò (Ïîëå áîíóñà) â ñòðîêå %d ôàéëà \"%s\" (ðàñà %d), ïðîïóñê.\n", lines, path, atoi(str[0]));
           continue;
       }
       str[9] = p;
       p = strstr(p+1,"},");
       if( p == NULL )
       {
           ShowError("faction_readdb: Invalid format (OnEquip_Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0]));
           continue;
       }
       p[1] = '\0';
       p += 2;
       // Áîíóñ àóðû
       if( *p != '{' )
       {
           ShowError("faction_readdb: Invalid format (OnUnequip_Script column) in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0]));
           continue;
       }
       str[10] = p;
       p = strstr(p+1,"}");
       if ( strchr(p,',') != NULL )
       {
           ShowError("faction_readdb: Extra columns in line %d of \"%s\" (item with id %d), skipping.\n", lines, path, atoi(str[0]));
           continue;
       }

       CREATE(db,struct faction_data,1);                                                        // Ñîçäàíèå
       db->id                                            = id;                                    // Óíèêàëüíûé ID
       safestrncpy(db->name,str[1],sizeof(db->name));                                            // Íàçâàíèå ôðàêöèè
       db->race                                        = race;                                    // Ðàñà
       db->ele                                            = ele;                                    // Ýëåìåíò
       db->ele_lvl                                        = ele_lvl;                                // Óðîâåíü ýëåìåíòà
       db->size                                        = size;                                    // Ðàçìåð
       db->alliance_id                                    = all_id;                                // ID àëüÿíñà
       db->aura_id                                        = aura;                                    // ID àóðû
       db->chat_color                                    = chat_color;                            // Öâåò ñîîáùåíèé â ÷àòå
       db->script                                        = parse_script(str[9],path,lines,0);    // Áîíóñ
       db->aura_bonus                                    = parse_script(str[10],path,lines,0);    // Áîíóñ àóðû

       idb_put(faction_db,id,db);                                                                // Ñîõðàíåíèå

       count++;
   }

   fclose(fp);

   ShowStatus("Çàêîí÷åíî ÷òåíèå '"CL_WHITE"%lu"CL_RESET"' ñòðîê â ôàéëå '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);

   return 0;
}

// ×òåíèå ôàéëà êîíôèãóðàöèè
// <ID àóðû>,<ýôôåêò #1>,<ýôôåêò #2>,<ýôôåêò #3>
static int faction_readauradb(void)
{
   struct aura_data* db;
   const char* filename = "faction_aura_db.txt";
   uint32 lines = 0, count = 0;
   char line[1024], path[256];
   FILE* fp;

   sprintf(path, "%s/%s", db_path, filename);
   if((fp = fopen(path, "r")) == NULL )
   {
       ShowWarning("faction_readauradb: Ôàéë íå íàéäåí \"%s\", ïðîïóñê.\n", path);
       return 0;
   }

   while(fgets(line, sizeof(line), fp))
   {
       char *str[32], *p;
       int i, id;

       lines++;
       if(line[0] == '/' && line[1] == '/')
           continue;
       memset(str, 0, sizeof(str));

       p = line;

       while( ISSPACE(*p) )
           ++p;
       if( *p == '\0' )
           continue;
       for( i = 0; i < 3; ++i )
       {
           str[i] = p;
           p = strchr(p,',');
           if( p == NULL )
               break;
           *p = '\0';
           ++p;
       }

       if( p == NULL )
       {
           ShowError("faction_readauradb: Ïóñòûå ïîëÿ â ñòðîêå %d ôàéëà \"%s\" (ID: %d), ïðîïóñê.\n", lines, path, atoi(str[0]));
           continue;
       }

       // Óíèêàëüíûé ID
       id = atoi(str[0]);
       if( id < 1 )
       {
           ShowError("faction_readauradb : Íåâåðíûé ID àóðû %d.\n", id);
           continue;
       }
       else if( aura_search(id) )
       {
           ShowError("faction_readauradb : Äóáëèðîâàíèå ID %d, ñòðîêà %d.\n", id, lines);
           continue;
       }

       str[3] = p;

       CREATE(db,struct aura_data,1);                        // Ñîçäàíèå
       db->id                            = id;                // Óíèêàëüíûé ID
       db->effect_1                    = atoi(str[1]);        // Ýôôåêò #1
       db->effect_2                    = atoi(str[2]);        // Ýôôåêò #2
       db->effect_3                    = atoi(str[3]);        // Ýôôåêò #3

       idb_put(aura_db,id,db);                                // Ñîõðàíåíèå

       count++;
   }

   fclose(fp);

   ShowStatus("Çàêîí÷åíî ÷òåíèå '"CL_WHITE"%lu"CL_RESET"' ñòðîê â ôàéëå '"CL_WHITE"%s"CL_RESET"'.\n", count, filename);

   return 0;
}

// Î÷èñòêà ïàìÿòè
static int faction_db_destroy(DBKey key, DBData *data, va_list ap)
{
   struct faction_data *db = (struct faction_data*)data;

   if( db->script )
   {
       script_free_code(db->script);
       db->script = NULL;
   }

   return 0;
}

// Çàãðóçêà ñèñòåìû ôðàêöèé
void do_init_faction(void)
{
   faction_db     = idb_alloc(DB_OPT_BASE);
   aura_db     = idb_alloc(DB_OPT_BASE);
   faction_readdb();                        // ×òåíèå äàííûõ î ôðàêöèÿõ
   faction_readauradb();                    // ×òåíèå äàííûõ îá àóðàõ
}

// Î÷èñòêà ïàìÿòè
void do_final_faction(void)
{
   faction_db->destroy(faction_db,faction_db_destroy);
   aura_db->destroy(aura_db,NULL);
}

Edited by backtea
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

You guys experiencing random crash with this?.. :)

Thanks

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

You guys experiencing random crash with this?.. :)

Thanks

I want to know that too, but seems like Lilith stopped to update this :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  69
  • Topics Per Day:  0.02
  • Content Count:  592
  • Reputation:   31
  • Joined:  11/14/11
  • Last Seen:  

hope if lilith will be back he will update this ~

- just tell here the explanation of error or bugs or crash.. for easily fix..

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  19
  • Topics Per Day:  0.00
  • Content Count:  713
  • Reputation:   70
  • Joined:  11/08/11
  • Last Seen:  

hope if lilith will be back he will update this ~

- just tell here the explanation of error or bugs or crash.. for easily fix..

I currently got no live server so I can't really test, but seems like no one is giving feedback :(

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  66
  • Reputation:   3
  • Joined:  04/02/12
  • Last Seen:  

I have error while compiling

clif.c(8163): error C2084: function 'void clif_displaymessagecolor(map_session_data *,const char *,unsigned long)' already has a body

anyone knows how to fix this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

guys how to add in mysql? query?anybody knows?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  66
  • Reputation:   3
  • Joined:  04/02/12
  • Last Seen:  

guys how to add in mysql? query?anybody knows?

google sir

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  147
  • Reputation:   26
  • Joined:  11/19/11
  • Last Seen:  

request on the next update, can u add the faction chat filter?

For example:

Angel 1 says Hey guys

Angel 2 will understand what Angel 1 says

Devil 1 will read it as Syug yeh

or something like that :D

if its only possible though ;o

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

request on the next update, can u add the faction chat filter?

For example:

Angel 1 says Hey guys

Angel 2 will understand what Angel 1 says

Devil 1 will read it as Syug yeh

or something like that :D

if its only possible though ;o

it's work on your svn?

guys why in recompile process map-sql not found?it's work on svr rathena?or not?what's revision can run this src?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  147
  • Reputation:   26
  • Joined:  11/19/11
  • Last Seen:  

request on the next update, can u add the faction chat filter?

For example:

Angel 1 says Hey guys

Angel 2 will understand what Angel 1 says

Devil 1 will read it as Syug yeh

or something like that :D

if its only possible though ;o

it's work on your svn?

guys why in recompile process map-sql not found?it's work on svr rathena?or not?what's revision can run this src?

can I see your recompile errors? everything works pretty fine for me, and I don't have any errors because I manually patched it ;o

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

request on the next update, can u add the faction chat filter?

For example:

Angel 1 says Hey guys

Angel 2 will understand what Angel 1 says

Devil 1 will read it as Syug yeh

or something like that :D

if its only possible though ;o

yeah this is possible with integration of the language system of eamod, :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

Begin to use rAmod. rAmod already has this feature.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  112
  • Topics Per Day:  0.03
  • Content Count:  388
  • Reputation:   4
  • Joined:  05/01/12
  • Last Seen:  

request on the next update, can u add the faction chat filter?

For example:

Angel 1 says Hey guys

Angel 2 will understand what Angel 1 says

Devil 1 will read it as Syug yeh

or something like that :D

if its only possible though ;o

it's work on your svn?

guys why in recompile process map-sql not found?it's work on svr rathena?or not?what's revision can run this src?

can I see your recompile errors? everything works pretty fine for me, and I don't have any errors because I manually patched it ;o

nah it's my eror erorcompile.jpg

why always it...do you have svn default with this patch?@@a..or can u help me buil miror svn with this patch(has been ur complie)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  147
  • Reputation:   26
  • Joined:  11/19/11
  • Last Seen:  

Begin to use rAmod. rAmod already has this feature.

Really? I'm already using rAthena and I don't know about that xD where can I find that? :o

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  66
  • Reputation:   3
  • Joined:  04/02/12
  • Last Seen:  

Begin to use rAmod. rAmod already has this feature.

hello may i ask how to fix the cliff.c error ? it says already has body :/

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  14
  • Topics Per Day:  0.00
  • Content Count:  407
  • Reputation:   159
  • Joined:  11/18/11
  • Last Seen:  

hello may i ask how to fix the cliff.c error ? it says already has body :/

Remove the clif_displaymessagecolor function in clif.c. You already have this function.

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...