Jump to content

blazerza

Members
  • Posts

    42
  • Joined

  • Last visited

2 Followers

Profile Information

  • Gender
    Male

Recent Profile Visitors

2315 profile views

blazerza's Achievements

Poring

Poring (1/15)

2

Reputation

  1. I want to buy his script and try to contact him with message here and also add his discord pajodex#1328 and it's still pending. So I want to know that anybody who already be friend with Pajodex in discord Please tell him to accept my discord (oakzircon#4777) or tell him to check message in rathena. Anybody please help me T^T
  2. @Technoken Thank you sir I will try to make it too and I will share here if it works
  3. What if I want to change it from zeny to item how can I do it sir ?example : if I want to bet with my cash coin/card/etc.
  4. Thank you very much for your a lot of interesting file
  5. Hi Sir Please accept my skype or add me [email protected] (Banana Bananaman) I want to buy your Gepard :)

  6. How'd you managed to fix your Cell_PvP would you mind to share it with me?

  7. Actually I don't know what should I update because like I said I got a problem when I use these skill while my hp is more than 330 k . I tried to edit some src but it won't work and I'm quite not good at src and I also tried to use skill.c of rAthena GitHub 19343 to replace it then it got the same problem when my hp is more than 330k . That's all for information that I got it -0- . I'm really sorry for late reply.
  8. Anybody know how can I set a Clearance skill affect to everyone on screen ? Because when I test it with my server (rA17726,pre) , it can use with only one person who be the target but when I read a description it said Affects all party members and enemies on screen and removes all of their buffs, debuffs, and status ailments. So Is it a bug? how can I fix it ? If you have any question please ask me and I will answer but please help me to fix it cause my player ask me and I don't know how can I answer them
  9. my server is rA17726 and pre. Actually when I test it if my hp isn't more than 330k it doesn't have any problem but if it's more than that it got a problem so I don't know why is it happen ? Sorry for late reply if you have any question please ask me and help me to solve it please
  10. Last night my friend sent these src to me and he said that he want to use it but when he compile these code it got many error then he told me to help him but I know nothing about src so I want to ask you all anybody know how to fix it until it can be use ? Index: atcommand.c =================================================================== --- atcommand.c (revision 2809) +++ atcommand.c (working copy) @@ -3542,13 +3542,13 @@ *------------------------------------------*/ ACMD_FUNC(reload) { - const char *opt[] = { "item_db", "mob_db", "skill_db", "status_db", "pc_db", "groups", "quest_db", "homunculus_db", "pet_db", "motd", "cashshop", "buffspecial" }; + const char *opt[] = { "item_db", "mob_db", "skill_db", "status_db", "pc_db", "groups", "quest_db", "homunculus_db", "pet_db", "motd", "cashshop", "buffspecial", "folder" }; int option; memset(atcmd_output, '\0', sizeof(atcmd_output)); if(!message || !*message) { - clif_displaymessage(fd, "Op็๕es: item_db, mob_db, skill_db, status_db, pc_db, groups, quest_db, homunculus_db, pet_db, motd, cashshop & buffspecial"); + clif_displaymessage(fd, "Op็๕es: item_db, mob_db, skill_db, status_db, pc_db, groups, quest_db, homunculus_db, pet_db, motd, folder, cashshop & buffspecial"); clif_displaymessage(fd, "Modo de uso: @reload <op็ใo>"); return false; } @@ -3672,7 +3672,14 @@ clif_displaymessage(fd, msg_txt(255)); return true; } - +int check_npc_folder(char * path){ + folder * aux; + for(aux=ptr;aux!=NULL;aux=aux->next){ + if(strcmp(aux->name+4,path)==0) + return 1; + } + return 0; +} /*========================================== * @reloadscript - reloads all scripts (npcs, warps, mob spawns, ...) *------------------------------------------*/ @@ -3714,6 +3721,34 @@ return true; } +ACMD_FUNC(reloadfolder) +{ + char npc_choice[100]; + int v_type=0; + folder * aux; + char npc_path[100]; + + if(!message || !*message || sscanf(message, "%s",npc_choice) < 1) { + clif_displaymessage(fd,"Como usar: <pasta> - Reload de NPCs presentes na pasta." ); + for(aux=ptr;aux!=NULL;aux=aux->next){ + clif_displaymessage(fd,aux->name+4); + } + clif_displaymessage(fd,"reloadfolder - Por favor especifique uma op็ใo."); + } + else if(check_npc_folder(npc_choice)){ + sprintf(npc_path,"npc/%s",npc_choice); + if(npc->reload_folder(npc_path)) + return false; + else{ + clif_displaymessage(fd,"Scripts Recarregados."); + return true; + } + } + else return false; + + return true; +} + /*========================================== * @mapinfo [0-3] <map name> by MC_Cameri * => Shows information about the map [map name] @@ -9603,6 +9638,7 @@ ACMD_DEF(localbroadcast), // + /lb and /nlb ACMD_DEF(recallall), ACMD_DEF(reloadscript), + ACMD_DEF(reloadfolder), ACMD_DEF(reloadatcommand), ACMD_DEF(reloadbattleconf), ACMD_DEF(mapinfo), Index: map.c =================================================================== --- map.c (revision 2809) +++ map.c (working copy) @@ -5503,6 +5503,19 @@ SERVER_TYPE = SERVER_TYPE_MAP; } +// Free Folder LList +void free_folder(folder * ptr) +{ + folder * aux, * aux2; + aux=ptr; + while(aux!=NULL){ + aux2=aux; + aux=aux->next; + free(aux2->name); + free(aux2); + } + return; +} /// Called when a terminate signal is received. void do_shutdown(void) @@ -5513,15 +5526,18 @@ { struct map_session_data *sd; struct s_mapiterator *iter = mapit_getallusers(); + free_folder(ptr); for(sd = (TBL_PC *)mapit_first(iter); mapit->exists(iter); sd = (TBL_PC *)mapit_next(iter)) clif_GM_kick(NULL, sd); mapit->free(iter); flush_fifos(); + } chrif->check_shutdown(); } } + bool map_arg_next_value(const char* option, int i, int argc, bool must) { if(i >= argc-1) { Index: map.h =================================================================== --- map.h (revision 2809) +++ map.h (working copy) @@ -29,6 +29,7 @@ #include <stdarg.h> + struct npc_data; struct item_data; struct raChSysCh; @@ -325,6 +326,13 @@ ATF_MISC=0x40, }; +typedef struct _folder{ + struct _folder * next; + char * name; +} folder; +folder * npc_new_folder(size_t size,folder * ptr,const char * filepath); +folder * ptr; + struct block_list { struct block_list *next,*prev; int id; Index: npc.c =================================================================== --- npc.c (revision 2809) +++ npc.c (working copy) @@ -2165,7 +2165,7 @@ nullpo_ret(nd); - npc->remove_map(nd); + npc->remove_map(nd); map->deliddb(&nd->bl); if(single) strdb_remove(npc->name_db, nd->exname); @@ -2188,7 +2188,7 @@ aFree(nd->path);/* remove now that no other instances exist */ } } - +/// if(single && nd->bl.m != -1) map->remove_questinfo(nd->bl.m,nd); @@ -2973,6 +2973,7 @@ nd->src_id = src_id; nd->bl.type = BL_NPC; nd->subtype = (enum npc_subtype)type; + switch(type) { case SCRIPT: ++npc_script; @@ -3908,7 +3909,20 @@ return strchr(start,'\n');// continue } - +folder * npc_new_folder(size_t size,folder * ptr, const char * filepath){ + folder * new; + int i; + new= (struct _folder*) malloc(sizeof(struct _folder)); + for(i=4;filepath[i]!='/';i++); + if(filepath[i]!='/') + return ptr; + new->name= (char*) malloc(sizeof(char)*(i+1)); + strncpy(new->name,filepath,i); + new->name[i]='\0'; + new->next = ptr; + + return new; +} //Read file and create npc/func/mapflag/monster... accordingly. //@runOnInit should we exec OnInit when it's done ? int npc_parsesrcfile(const char *filepath, bool runOnInit) @@ -3919,7 +3933,26 @@ size_t len; char *buffer; const char *p; - + int has_folder = 0; + static folder * aux; + + if(ptr==NULL) + ptr = npc_new_folder(sizeof(filepath),ptr,filepath) ; + + //Folder Information - [GreenStage] + //Check if NPC belongs to an existing folder + for(aux=ptr;aux!=NULL;aux=aux->next){ + if(strncmp(filepath,aux->name,strlen(aux->name))==0){ + has_folder=1; + + break; + } + } + //NPC seems to belong to a new folder, add folder info. + if(!has_folder){ + ptr=npc_new_folder(sizeof(filepath),ptr,filepath); + ShowNpc("Pasta Encontrada: %s \n",ptr->name); + } // read whole file to buffer fp = fopen(filepath, "rb"); if(fp == NULL) { @@ -4223,7 +4256,6 @@ linkdb_final(label_linkdb); // linked data (struct event_data*) is freed when clearing npc->ev_db return 0; } - //Clear then reload npcs files int npc_reload(void) { @@ -4328,6 +4360,33 @@ return 0; } +int npc_reload_folder(char * folder_path) +{ + struct npc_src_list *nsl; + DBIterator *iter = db_iterator(npc->name_db); + struct npc_data *nd = NULL; + unsigned int count=0; + + for(nd = dbi_first(iter); dbi_exists(iter); nd = dbi_next(iter)) { + if(nd->path && strncmp(nd->path,folder_path,strlen(folder_path)) == 0) { + npc->unload_duplicates(nd);/* unload any npcs which could duplicate this but be in a different file */ + npc->unload(nd, true); + } + } + dbi_destroy(iter); + + for(nsl = npc->src_files; nsl; nsl = nsl->next) { + if(strncmp(nsl->name,folder_path,strlen(folder_path))==0){ + count++; + ShowNpc("Carregando arquivo de NPC: %s"CL_CLL"\r", nsl->name); + npc->parsesrcfile(nsl->name,false); + } + } + /* refresh event cache */ + npc->read_event_script(); + ShowNpc("'"CL_WHITE"%d"CL_RESET"' arquivos na pasta '"CL_WHITE"%s"CL_RESET"' recarregados\n",count,folder_path); + return 0; +} //Unload all npc in the given file bool npc_unloadfile(const char *filepath) { @@ -4591,6 +4650,7 @@ npc->path_db_clear_sub = npc_path_db_clear_sub; npc->ev_label_db_clear_sub = npc_ev_label_db_clear_sub; npc->reload = npc_reload; + npc->reload_folder = npc_reload_folder; npc->unloadfile = npc_unloadfile; npc->do_clear_npc = do_clear_npc; npc->debug_warps_sub = npc_debug_warps_sub; Index: npc.h =================================================================== --- npc.h (revision 2809) +++ npc.h (working copy) @@ -265,6 +265,7 @@ int (*path_db_clear_sub) (DBKey key, DBData *data, va_list args); int (*ev_label_db_clear_sub) (DBKey key, DBData *data, va_list args); int (*reload) (void); + int (*reload_folder) (char * folder_path); bool (*unloadfile) (const char *filepath); void (*do_clear_npc) (void); void (*debug_warps_sub) (struct npc_data *nd);
  11. I found some bug that it will happen if you have hp more than 330 k . it's a WE_MALE or I will protect you skill. This skill will give your character HP 10% to your wife/husband so that means when you use these skill your hp will decrease 10 % and your wife/husband hp will increase 10% . But when I test it with hp more than 330k , it won't decrease my character hp 10% and it's increase both of character hp 10% so I don't know what's happen ? and how to fix it ? Anybody can help me please ? more information :my server is a rebirth server that's why my character hp is more than 330k
  12. Nobody know it ? Please help me . . . .
  13. I found some bug that it will happen if you have hp more than 330 k . it's a WE_MALE or I will protect you skill. This skill will give your character HP 10% to your wife/husband so that means when you use these skill your hp will decrease 10 % and your wife/husband hp will increase 10% . But when I test it with hp more than 330k , it won't decrease my character hp 10% and it's increase both of character hp 10% so I don't know what's happen ? and how to fix it ? Anybody can help me please ? more information :my server is a rebirth server that's why my character hp is more than 330k
×
×
  • Create New...