Jump to content

M4karov

Members
  • Posts

    149
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by M4karov

  1. Hello everyone, I would like help adding this command to my emulator, I am using the current version of the emulator. Index: src/map/clif.c =================================================================== --- src/map/clif.c (revision 1122) +++ src/map/clif.c (working copy) @@ -10488,10 +10488,12 @@ *------------------------------------------*/ void clif_parse_SolveCharName(int fd, struct map_session_data *sd) { - int charid; + int charid = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); - charid = RFIFOL(fd,packet_db[sd->packet_ver][RFIFOW(fd,0)].pos[0]); - map_reqnickdb(sd, charid); + if(charid >= 150000) map_reqnickdb(sd, charid); + else if(charid == STUFF_BTG_FLAG) clif_solved_charname(fd,charid,"[BTG]"); // Sistema de Consumiveis [CarlosHenrq] + else if(charid == STUFF_GVG_FLAG) clif_solved_charname(fd,charid,"[GVG]"); // Sistema de Consumiveis [CarlosHenrq] + else if(charid == STUFF_PVP_FLAG) clif_solved_charname(fd,charid,"[PVP]"); // Sistema de Consumiveis [CarlosHenrq] } /*========================================== Index: src/map/itemdb.c =================================================================== --- src/map/itemdb.c (revision 1122) +++ src/map/itemdb.c (working copy) @@ -1088,3 +1088,15 @@ return 0; } +/*========================================== + * Sistemas de Consumiveis [CarlosHenrq] + *------------------------------------------*/ +int itemdb_is_stuff(struct item * item) { + int flag = 0; + if(item->card[0] != CARD0_CREATE || item->card[2] < STUFF_BTG_FLAG){ + return -1; + } + flag = 32767-item->card[2]; + + return (flag+1); +} Index: src/map/itemdb.h =================================================================== --- src/map/itemdb.h (revision 1122) +++ src/map/itemdb.h (working copy) @@ -39,6 +39,11 @@ //Use apple for unknown items. #define UNKNOWN_ITEM_ID 512 +// Sistema de Consumiveis [CarlosHenrq] +#define STUFF_PVP_FLAG 32767 +#define STUFF_GVG_FLAG 32766 +#define STUFF_BTG_FLAG 32765 + struct item_data { int nameid; char name[ITEM_NAME_LENGTH],jname[ITEM_NAME_LENGTH]; @@ -144,4 +149,7 @@ void do_final_itemdb(void); int do_init_itemdb(void); +// Sistema de Consumiveis [CarlosHenrq] +int itemdb_is_stuff(struct item * item); + #endif /* _ITEMDB_H_ */ Index: src/map/pc.c =================================================================== --- src/map/pc.c (revision 1122) +++ src/map/pc.c (working copy) @@ -3350,7 +3350,7 @@ int i; nullpo_retr(-1, sd); - ARR_FIND( 0, MAX_INVENTORY, i, sd->inventory.u.items_inventory[i].nameid == item_id && (sd->inventory.u.items_inventory[i].amount > 0 || item_id == 0) ); + ARR_FIND(0,MAX_INVENTORY,i,sd->inventory.u.items_inventory[i].nameid == item_id && (sd->inventory.u.items_inventory[i].amount > 0 || item_id == 0) && ((itemdb_is_stuff(&sd->inventory.u.items_inventory[i]) == 1) == map[sd->bl.m].flag.pvp || (itemdb_is_stuff(&sd->inventory.u.items_inventory[i]) == 2) == map[sd->bl.m].flag.gvg || (itemdb_is_stuff(&sd->inventory.u.items_inventory[i]) == 3) == map[sd->bl.m].flag.battleground)); return ( i < MAX_INVENTORY ) ? i : -1; } @@ -3572,6 +3572,9 @@ if( !item->script ) //if it has no script, you can't really consume it! return 0; + if(!map[sd->bl.m].flag.pvp && itemdb_is_stuff(&sd->inventory.u.items_inventory[n]) == 1 || !map[sd->bl.m].flag.gvg && itemdb_is_stuff(&sd->inventory.u.items_inventory[n]) == 2 || !map[sd->bl.m].flag.battleground && itemdb_is_stuff(&sd->inventory.u.items_inventory[n]) == 3) + return 0; + switch( nameid ) { case 605: // Anodyne Index: src/map/script.c =================================================================== --- src/map/script.c (revision 1122) +++ src/map/script.c (working copy) @@ -14947,9 +14947,45 @@ clif_showdigit(sd, (unsigned char)type, value); return 0; +} + +/*========================================== + * Sistemas de Consumiveis [CarlosHenrq] + * getstuffitem(<item_id>,<amount>,<flag>{,"<Char Name>"}); + *------------------------------------------*/ +BUILDIN_FUNC(getstuffitem) { + struct map_session_data * sd = (( script_hasdata(st,5) ) ? map_nick2sd(script_getstr(st,5)):script_rid2sd(st)); + int amount = script_getnum(st,3), flag = STUFF_BTG_FLAG + script_getnum(st,4), f; + struct script_data * data = NULL; + struct item_data * item_data = NULL; + struct item item; + + data = script_getdata(st,2); + get_val(st,data); + + if(data_isstring(data) && (item_data = itemdb_searchname(conv_str(st,data))) == NULL || (item_data = itemdb_exists(conv_num(st,data))) == NULL){ + ShowError("O Item enviado não existe.\n"); + return 0; + }else if(amount <= 0){ + ShowError("O valor enviado para números de itens enviado é inválido.\n"); + return 0; + }else if(!itemdb_isstackable2(item_data)){ + ShowError("Só é possivel enviar itens consumiveis.\n"); + return 0; + } + + memset(&item,0,sizeof(item)); + item.nameid = item_data->nameid; + item.identify = 1; + item.card[0] = CARD0_CREATE; + item.card[2] = flag; + + if((f = pc_additem(sd,&item,amount))) + clif_additem(sd,0,0,f); + + return 0; } - // declarations that were supposed to be exported from npc_chat.c #ifdef PCRE_SUPPORT BUILDIN_FUNC(defpattern); @@ -15357,5 +15393,9 @@ //brAthena Modificações BUILDIN_DEF(sc_check,"i"), + + // Sistema de Consumiveis [CarlosHenrq] + BUILDIN_DEF(getstuffitem,"vii*"), + {NULL,NULL,NULL}, }; error: http://prntscr.com/e8ubbb
  2. Please could you upgrade the system to work with the current emulator? ttp://prntscr.com/e8nmy3
  3. Hmm.. I also get this.. Already added item_db, reload script.. But when we click the ores, just popup empty and nothing happens..
  4. Esse que eu estou usando não tem esse problema não.
  5. Eu utilizo a versão 2015-11-04 há uns 6 meses e até agora não tive problemas.
  6. Thanks for answering. My renewal.h file looks like this: // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL // For more information, see LICENCE in the main folder #ifndef _CONFIG_RENEWAL_H_ #define _CONFIG_RENEWAL_H_ //quick option to disable all renewal option, used by ./configure #define PRERE #ifndef PRERE /** * rAthena configuration file (http://rathena.org) * For detailed guidance on these check http://rathena.org/wiki/SRC/config/ **/ /** * @INFO: This file holds general-purpose renewal settings, for class-specific ones check /src/config/classes folder **/ /// Game renewal server mode /// (disable by commenting the line) /// /// Leave this line to enable renewal specific support such as renewal formulas #define RENEWAL /// Renewal cast time /// (disable by commenting the line) /// /// Leave this line to enable renewal casting time algorithms and enable fixed cast bonuses. /// See also default_fixed_castrate in conf/battle/skill.conf for default fixed cast time (default is 20%). /// Cast time is altered be 2 portion, Variable Cast Time (VCT) and Fixed Cast Time (FCT). /// By default FCT is 20% of VCT (some skills aren't) /// - VCT is decreased by DEX * 2 + INT. /// - FCT is NOT reduced by stats, reduced by equips or buffs. /// Example: /// On a skill whos cast time is 10s, only 8s may be reduced. the other 2s are part of a FCT #define RENEWAL_CAST /// Renewal drop rate algorithms /// (disable by commenting the line) /// /// Leave this line to enable renewal item drop rate algorithms /// While enabled a special modified based on the difference between the player and monster level is applied /// Based on the http://irowiki.org/wiki/Drop_System#Level_Factor table #define RENEWAL_DROP /// Renewal exp rate algorithms /// (disable by commenting the line) /// /// Leave this line to enable renewal item exp rate algorithms /// While enabled a special modified based on the difference between the player and monster level is applied #define RENEWAL_EXP /// Renewal level modifier on damage /// (disable by commenting the line) /// // Leave this line to enable renewal base level modifier on skill damage (selected skills only) #define RENEWAL_LVDMG /// Renewal ASPD [malufett] /// (disable by commenting the line) /// /// Leave this line to enable renewal ASPD /// - shield penalty is applied /// - AGI has a greater factor in ASPD increase /// - there is a change in how skills/items give ASPD /// - some skill/item ASPD bonuses won't stack #define RENEWAL_ASPD /// Renewal stat calculations /// (disable by commenting the line) /// /// Leave this line to enable renewal calculation for increasing status/parameter points #define RENEWAL_STAT #endif #endif // _CONFIG_RENEWAL_H_ And yet it continues with the Restoration Calculation turned on. I already recompile using the commands: ./configure make clean make server
  7. Hi! How to disable Restoration Calculation in pre-renewal? http://irowiki.org/wiki/Restoration_Calculation
  8. Hello everybody, I would like to ask your help so that I can use that system vote for points, with the current fluxcp. Can someone help me? Here the image of the error. Vote for point used: https://rathena.org/board/topic/80121-vote-for-points-for-fluxcp-free/
  9. @bodystyle Released the command to transclasse characters. Then I created costumes for transclasse with a new number on pallets. _2
  10. Is there a way I can use the command bodystyle in pre-renewal? In tranclasse characters?
  11. É o mesmo sistema de presença só que modificado para realizar a contagem automaticamente, quanto ao comando @fidelidade, você pode estar criando um comando custom com bindatcmd.
  12. I found this warning at compile time: Use rAthena review of the day 07/07/2016. 1>c:\users\douglas\desktop\rathena-master\src\map\skill.c(7310): warning C4013: 'clif_vend' undefined; assuming extern returning int 2> login-server.vcxproj -> C:\Users\Douglas\Desktop\rathena-master\vcproj-10\..\login-server.exe
  13. M4karov

    Kafrapoints

    You are using an updated version of rathena ? so tests : prontera,150,150,5 pointshop Shop Kafra 68,#kafrapoints,607:10,608:10
  14. M4karov

    Kafrapoints

    prontera,150,150,5 pointshop Shop Kafra 68,#KAFRAPOINTS,607:10
  15. Same thing. [Error]: buildin_isbegin_quest: Player with char id '1' is not found. [Debug]: Source (NPC): Runane#sara at moc_para01 (29,95) but I managed to solve in another way. I changed the npc Runane#sara by the NovaRO and worked without error. Thanks to everyone who tried to help me .
  16. same thing. [Error]: buildin_isbegin_quest: Player with char id '1' is not found. [Debug]: Source (NPC): Runane#sara at moc_para01 (29,95) [Info]: [Instance] Created: Nightmarish Jitterbug (1).
  17. error: [Error]: Loading NPC file: npc/re/instances/NightmarishJitterbug.txt script error on npc/re/instances/NightmarishJitterbug.txt line 144 parse_callfunc: expected ')' to close argument list 139 : mes "^ff0000This dimensional portal cannot be accessed for 23 hours after your last access.^000000"; 140 : close2; 141 : cutin "lunain01",255; 142 : end; 143 : } else { * 144 : .@party_id = getcharid(2'{',strcharinfo(0)}); 145 : .@ins_mas = getpartyleader(.@party_id,2); 146 : .@p_name$ = getpartyname(.@party_id); 147 : .@p_reader$ = strcharinfo(0); 148 : .@md_name$ = "Nightmarish Jitterbug"; 149 : if (!.@party_id) {
  18. same thing. [Error]: buildin_isbegin_quest: Player with char id '1' is not found. [Debug]: Source (NPC): Runane#sara at moc_para01 (29,95) [Info]: [Instance] Created: Nightmarish Jitterbug (1).
  19. console return: [Error]: buildin_isbegin_quest: Player with char id '1' is not found. [Debug]: Source (NPC): Runane#sara at moc_para01 (29,95)
  20. What's mean the number 13181 ? quest_db // Nightmarish Jitterbug 13181,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Nightmarish Jitterbug" 13182,82800,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Nightmarish Jitterbug: Waiting" 13183,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,"Nightmarish Jitterbug: Completed"
  21. In your script have some line which is telling char id = 1, change or just add this -> // In the begining of the line. You're welcome actually has no line so, what is wrong is the scan time if the player is already doing the quest, if already made ​​, something.
  22. That error has been resolved , is now giving this one when I click the npc: Runane#sara [Error]: buildin_isbegin_quest: Player with char id '1' is not found. [Debug]: Source (NPC): Runane#sara at moc_para01 (29,95) is probably that part of the script: if (isbegin_quest(13181) == 1) { Antes de mais nada, obrigado pela ajuda.
  23. Hello Felipe , instantiates it works okay, except that only the error in this part . My instance_db is correct , so I believe. I'll put it here. ID,Name,LimitTime,IdleTimeOut,EnterMap,EnterX,EnterY,Map2,...,Map255 15,Nightmarish Jitterbug,3600,300,1@jtb,16,18,1@jtb Hello Felipe , instantiates it works okay, except that only the error in this part . My instance_db is correct , so I believe. I'll put it here.
×
×
  • Create New...