Black Box
-
Content Count
42 -
Joined
-
Last visited
Posts posted by Black Box
-
-
-
You have to compile server with PCRE enabled.
@@Oxxy. I managed to solve, but when I type the word near the npc, nothing happens.
You have to compile server with PCRE enabled.
Solved, i had forgotten to set up with pcre. Thanks.
-
The image describes the error.
@Edit
I managed to solve
PS: When I type the word near the npc, nothing happens.
-
Try to include first before you define..
#include <stdio.h>#include <stdlib.h>#include <string.h> #include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"#include "../common/HPMDataCheck.h" #ifndef COMMON_HPMI_H //Added#define COMMON_HPMI_H //Added#ifndef MAP_SCRIPT_H //Added#define MAP_SCRIPT_H //Added#ifndef MAP_PC_H //Added#define MAP_PC_H //Added#ifndef HPM_DATA_CHECK_H //Added#define HPM_DATA_CHECK_H //Added
@@Mhalicot i followed his advice and did not work.
I did that way and now the error is smaller:
#include <stdio.h>#include <stdlib.h>#include <string.h> #define COMMON_HPMI_H //Added#define MAP_SCRIPT_H //Added#define MAP_PC_H //Added#define HPM_DATA_CHECK_H //Added#ifndef HPM_DATA_CHECK_H //Added #include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"#include "../common/HPMDataCheck.h"
Error:
addrid.c(136): fatal error C1004: unexpected end-of-file found
What would this error?
-
Error compiling plugins with the latest revision of Hercules. I tried to adapt but I did not succeed
Plugin addrid:
#include <stdio.h>#include <stdlib.h>#include <string.h> #ifndef COMMON_HPMI_H //Added#define COMMON_HPMI_H //Added#ifndef MAP_SCRIPT_H //Added#define MAP_SCRIPT_H //Added#ifndef MAP_PC_H //Added#define MAP_PC_H //Added#ifndef HPM_DATA_CHECK_H //Added#define HPM_DATA_CHECK_H //Added #include "../common/HPMi.h"#include "../map/script.h"#include "../map/pc.h"#include "../common/HPMDataCheck.h" /*1.0 Initial Plugin Release [Mhalicot]*/HPExport struct hplugin_info pinfo = { "addrid", // Plugin name SERVER_TYPE_MAP, // Which server types this plugin works with? "1.0", // Plugin version HPM_VERSION, // HPM Version (don't change, macro is automatically updated)}; /*========================================================================= * Attaches a set of RIDs to the current script. [digitalhamster] * addrid(<type>{,<flag>{,<parameters>}}); * <type>: * 0 : All players in the server. * 1 : All players in the map of the invoking player, or the invoking NPC if no player is attached. * 2 : Party members of a specified party ID. * [ Parameters: <party id> ] * 3 : Guild members of a specified guild ID. * [ Parameters: <guild id> ] * 4 : All players in a specified area of the map of the invoking player (or NPC). * [ Parameters: <x0>,<y0>,<x1>,<y1> ] * Account ID: The specified account ID. * <flag>: * 0 : Players are always attached. (default) * 1 : Players currently running another script will not be attached. *-------------------------------------------------------------------------*/ static int buildin_addrid_sub(struct block_list *bl,va_list ap){ int forceflag; struct map_session_data *sd = (TBL_PC *)bl; struct script_state* st; st=va_arg(ap,struct script_state*); forceflag=va_arg(ap,int); if(!forceflag||!sd->st) if(sd->status.account_id!=st->rid) script->run(st->script,st->pos,sd->status.account_id,st->oid); return 0;} BUILDIN(addrid){ struct s_mapiterator* iter; struct block_list *bl; TBL_PC *sd; if(st->rid<1){ st->state = END; bl=map->id2bl(st->oid); } else bl=map->id2bl(st->rid); //if run without rid it'd error,also oid if npc, else rid for map iter = mapit_getallusers(); switch(script_getnum(st,2)){ case 0: for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter)){ if(!script_getnum(st,3)||!sd->st) if(sd->status.account_id!=st->rid) //attached player already runs. script->run(st->script,st->pos,sd->status.account_id,st->oid); } break; case 1: for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter)){ if(!script_getnum(st,3)||!sd->st) if((sd->bl.m == bl->m)&&(sd->status.account_id!=st->rid)) script->run(st->script,st->pos,sd->status.account_id,st->oid); } break; case 2: if(script_getnum(st,4)==0){ script_pushint(st,0); return 0; } for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter)){ if(!script_getnum(st,3)||!sd->st) if((sd->status.account_id!=st->rid)&&(sd->status.party_id==script_getnum(st,4))) //attached player already runs. script->run(st->script,st->pos,sd->status.account_id,st->oid); } break; case 3: if(script_getnum(st,4)==0){ script_pushint(st,0); return 0; } for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter)){ if(!script_getnum(st,3)||!sd->st) if((sd->status.account_id!=st->rid)&&(sd->status.guild_id==script_getnum(st,4))) //attached player already runs. script->run(st->script,st->pos,sd->status.account_id,st->oid); } break; case 4: map->foreachinarea(buildin_addrid_sub, bl->m,script_getnum(st,4),script_getnum(st,5),script_getnum(st,6),script_getnum(st,7),BL_PC, st,script_getnum(st,3));//4-x0 , 5-y0 , 6-x1, 7-y1 break; default: if((map->id2sd(script_getnum(st,2)))==NULL){ // Player not found. script_pushint(st,0); return 0; } if(!script_getnum(st,3)||!map->id2sd(script_getnum(st,2))->st) { script->run(st->script,st->pos,script_getnum(st,2),st->oid); script_pushint(st,1); } return 0; } mapit->free(iter); script_pushint(st,1); return true;}HPExport void plugin_init (void){ /* map-server interfaces */ script = GET_SYMBOL("script"); map = GET_SYMBOL("map"); mapit = GET_SYMBOL("mapit"); addScriptCommand("addrid","i?????",addrid);}
Image of error:
Ps: It worked before
-
I implemented a label as in the example below:
https://github.com/MrKeiKun/Hercules/commit/a7280f7e1e1f3f78288d60df0fd7b77748c63fc7
The aim was to display a message when the character is attacking.
Ps: It works, but is only displayed when the target dies.
How can I make her be exbida when the char attacking or when selecting the target?
The call of label is implemented here:
clif.c:
if( battle_config.idletime_criteria & BCIDLE_ATTACK ) npc->script_event(sd, NPCE_ATTACK); //Here sd->idletime = sockt->last_tick; unit->attack(&sd->bl, target_id, action_type != 0);
-
Very very thank. It is very valuable, I will study hard.
As far as I know, these are commonly struct pointers used in source to point to structs like: map_session_data, etc..
you first need to learn the basis of C language, I suggest you this site:
http://www.programiz.com/c-programming
then you're able to understanding the source code of Hercules, you can find some info about it in her's wiki:
and I did a long time ago a little doc with a few explanations about eAthena's Source Code, it's outdated but can be helpful for learning:
https://xp-dev.com/svn/tecnocronus_scripts/docs/EN/source_documentation.txt
the best way to learn hercule's or eAthena source code is to studying C language a lot and looking source snippets, see what they can do a good way to learn too.
Very very thank. It is very valuable, I will study hard.
-
Hi guys! Would you like to learn more about the source, could explain to me what siginica these variables?
sd
fd
bl
val
&sd
-
OnPCKillEvent was added in time of eathena and different src struct from now ,
all you have to do is to search NPCE_KILLPC and kill_pc_event_name ,then
you can see the implementations of OnPCKillEvent
Thank @@Angelmelody, the implementations are in pc.c.
-
Thank @@Angelmelody but to stay perfect, how can I find the implementation of OnPCKillEvent?Ps: I tried to search for these labels in every files and not i found. The reason is to base myself in this implementation to create others. -
Which files change, to add new labels and where I find the implementation of existing?example:OnPCKillEventPs: I found the statements, but not i found the implementations. -
Fixed in last revision!
-
-
Nice, Thanks.
-
I'll try
-
I wonder if the script commands work in the source. On the body of a skill can use a "month", for example?If you can not, how can I use these commands in the source or where I find? -
*** You review these Steps***
1.- SKILL RANGES:
- Player Skills
-
Slots available: 5020 skills (mmo.h::MAX_SKILL)
-
-
From: 0
-
-
To: 5019 (max. to 5019)
-
[*]
-
Slots available: 5020 skills (mmo.h::MAX_SKILL)
Note: mmo.h::MAX_SKILL is 5020, if using ID more than 5019, ID will be invalid for player's skill, or can use the values more than 5019 but need to add the src/common/mmo.h #define MAX_SKILL value. (the current MAX_SKILL is kind of waste space! Even in Renewal, skill is less than 200)
2.- EDIT SRC.
yourserver/src/map/skill.h = YOU_SKILL = 5020,
yourserver/src/map/skill.c = Case YOU_SKILL;
yourserver/src/map/battle.c = Case YOU_SKILL: skillratio += 10*(skill_lv-1); break;
3.- LUA FILES.
a) skillinfolist.lub
[sKID.YOU_SKILL] = {"YOU_SKILL";SkillName = "Custom skill",MaxLv = 10,SpAmount = {8, 8, 8, 8, 8, 15, 15, 15, 15, 15},bSeperateLv = true,AttackRange = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1}},b ) skillid.lub
YOU_SKILL = 5020,
c) skilldescript.lub
[sKID.YOU_SKILL] = {"Custom skill","Max Level: 10","Skill Form: ^FF0000Offensive^000000","Target: ^777777Enemy^000000","Description: ^777777Hit an enemy with crushing force.","If the Fatal Blow skill is learned, Bash will have","an added ^702180Stun^777777 effect at level 6 and higher.^000000","[Lv 1]: ^777777130% ATK^000000","[Lv 2]: ^777777160% ATK^000000","[Lv 3]: ^777777190% ATK^000000","[Lv 4]: ^777777220% ATK^000000","[Lv 5]: ^777777250% ATK^000000","[Lv 6]: ^777777280% ATK^000000","[Lv 7]: ^777777310% ATK^000000","[Lv 8]: ^777777340% ATK^000000","[Lv 9]: ^777777370% ATK^000000","[Lv 10]: ^777777400% ATK^000000"},4.- TEXTURE
a) data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/item/YOU_SKILL.bmp
I checked the processes and everything was correct, i managed to solve with the topic below. Thank you.
http://herc.ws/board/topic/512-skill-id-processing-overhaul/
- Player Skills
-
I followed this tutorial of detailed manner:
http://herc.ws/wiki/Adding_new_skills
See below, everything is correct, but the custom skill does not work. It's like she had disabled. The luasfiles are updated and are all correct, as the tutorial. What can I do to fix?
PS: The custom skill is working in my clone. (Using @clone), but how is possible? because for me it happens the error where in my record video up. I tested too one sound in this skill custom, and now its working too i think the problem would in the .lua files, but for now all my files ( lua and data ), are up to date. @@Ind
-
It is thus!
and weapontable.lub it is thus:
WEAPONTYPE_longsword = 98 [Weapon_IDs.WEAPONTYPE_longsword] = "_longsword" [Weapon_IDs.WEAPONTYPE_longsword] = Weapon_IDs.WEAPONTYPE_SWORD
-
My problem persisting even after being recompiled...
I said to just ignore it, it is not like anything in your server is not working
Ok, Sorry.
-
My problem persisting even after being recompiled...
-
-
When I acess with a char has the following errors:
How fix it?
I use the last revision of hercules !
-
item_db2.conf : Slots: 1iteminfo.lub : slotCount = 2change both to 2.[Weapon_IDs.WEAPONTYPE_longsword] = Weapon_IDs.WPCLASS_WEAPONTYPE_SWORD change to[Weapon_IDs.WEAPONTYPE_longsword] = Weapon_IDs.WEAPONTYPE_SWORDthank so much, very nice, it's working. :)
luis.seifert reacted to this
Problem in limit of the id of the skills of homunculus.
in Source Support
Posted
I create a custom skill for homunculus and work correctly with id 8044. The problem is that with id 8045 forth, the skills not are shown in tree of skills of homunculus.
I went on src/common/mmo.h and changed of:
for:
Not generated none erro in the compilation nor in emulator but even so the skill no is showed. I would like to know if exist something to do for increase this limit.