-
Content Count
349 -
Joined
-
Last visited
-
Days Won
31
Posts posted by Tio Akima
-
-
8 hours ago, Happy said:try putting bl on first and second since bl is already a block list you probably won't need the pl_sd
I tried to do this...
skill->castend_nodamage_id(bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0);
I put it like you said... but the server crashes
when we store in struct map_session_data and use in the parameter (such for example as pl_sd)
apparently not from error
but if I only use bl
the server map crashed -
6 minutes ago, Happy said:I think you're supposed to put the target on 2nd, but based on your code both src and target parameters are the same which is &pl_sd->bl
Cool that someone answered my topic <3
So, what do you think I should do Happy?I honestly tried several alternatives, but I did not succeed.
-
Hello guys
I made a custom structure in my skill
But I'm messing around somewhere .. Help me out.I call sumono a MOB
struct mob_data *md; md = mob->once_spawn_sub(src, src->m, x, y, clif->get_bl_name(src), mob_id, "", size, type); //example mob->spawn (md); //sumona o mob
Then I use an SC in this mob
sc_start4(src,&md->bl,SC_RUN,100,skill_lv,0,0,0);
in status.c, within the function responsible for terminating this status (SC)
in status_change_end_
I'm putting a function (within the case of SC_RUN)
I'm trying to use this functionstruct map_session_data *pl_sd = map->nick2sd(bl); skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0); //function to call the skill NPC_SELFDESTRUCTION on target
But... But ... Skill_castend is not working correctly
It should call the Selfdestruction skill on the target (the same target I'm using SC)
but he uses selfdestruction in PLAYERhis is the skill_castend structure:
The first or second parameter is responsible for the target//skill castend in skill.c int skill_castend_nodamage_id(struct block_list *src, struct block_list *bl, uint16 skill_id, uint16 skill_lv, int64 tick, int flag){}
I'm pretty sure I'm wrong here:struct map_session_data *pl_sd = map->nick2sd(bl);
Because when compiling it says:
warning C4133: 'function': incompatible types - from 'block_list *' to 'const char *'
map->nick2sd() accepts const char
but bl is block_list
But, I do not know how to do it the right way.
how can I put the correct path to my target (The mob that was summoned)
Help me
-
hi guys
It is possible to execute (call) the NPC_SELFDESTRUCTION skill through the file Status.c
I'm using an SC and would like to run the NPC_SELFDESTRUCTION skill over there
according to one condition, I call this ability.
How can I do this?
-
On 28/08/2017 at 6:42 AM, malufett said:at mob.c look for mob_ai_sub_hard all you need are there regarding mob searching target and attacking..
thanks
-
Hello guys,
I'm using a command in skill.c to make a mob floor
I'm using unit-> walktoxy () inside a for ()
(It is in the file skill.c)unit->walktoxy(&md->bl,sx,sy,0);
(Ie the mob, and where it goes)
Now I would like to display a message when this mob can not walk anymore.
I thought about putting a condition (IF) on unit_walktoxyWhen it finds a non-walking cell, it displays the message.
I put this conditionif ( map->getcell(bl->m, bl, bl->x, bl->y, CELL_CHKWALL) || map->getcell(bl->m, bl, bl->x, bl->y, CELL_CHKNOPASS)) { printf("stop! \n"); // console message break; //end }
This is the logic .. but it still is not working.
Because I need to get the mob reference (from skil.cl) and use this condition
I need to refer to the same mobThere in bl->m, bl, bl->x, bl->y
How can I do this? -
On 28/08/2017 at 10:11 AM, fxfreitas said:you can make the mob agressive, with 3 cell range of attack and 3 cells range of sight, and in mob_skill add NPC_SELFDESTRUCT when Attack or Chase with 100% chance, The mob will self destruct every time someone gets on his attack range, in theory looks very simple.
Thanks for the message fxfreitas
I'll test this.On 28/08/2017 at 7:09 PM, malufett said:fxfreitas answer will do no more source edit needed...
So I do not know if it's going to work out because I'm using the unit-> walktoxy to make the Mob walk ...
So while the mob is walking with this function, it does not attack etc ...
Just walk in the direction .. The idea to make it self destruct is to check if the next cell is a cell "Not walkable" or if there is any wall.
This is looking like a collision test
the mob colliding with something. hahahaha
-
Hi guys
Another doubt:Which function is called when I enter the range of a mob and he attacks me?
This function should check if there is an enemy in the range of the MOB, if it has,
then the mob attacks.
Does anyone know where to find this function in src?
If it is not the job of some function, excuse me.
-
1 hour ago, meko said:You could spawn your monster with the monster() command to get its GID, and then periodically (like every 100ms) check for nearby units using the getunits() command. If a unit is found that matches your criteria (ie type being MOB or PC) you kill it using unitkill() and you can make it spawn a new one after a timeout to begin the cycle again.
If you want something simpler look for NPC_SELFDESTRUCTION in the mob skill db
Thanks Meko for the tip ..
I'm doing everything in SRC myself .. so I guess the NPC_SELFDESTRUCTION might help.
I'm summoning a mob and making it walk in one direction (by skill) ...
And the idea is if this mob finds something on the way, it destroys itself ..
(Auto destroy equal to marine sphere)But I still do not understand how the self-destruct of the Marine Sphere works.
Getunits () and unitkill () are script commands?
Is there any function in src similar to getunits ()?
And also similar to unitkill ()?Does unitkill do the same thing as mob-> dead ()?
Sorry for the many questions, but I have many doubts.
I'm almost finished, I just need to make the mob self-destruct when I find something -
Hello guys
How can I make a MOB that self destructs when someone gets close?
I looked at the Creator's skill (MARINE SPHERE) but I did not understand how self-destruction works.
The idea is to make a mob that walks around the map and when it finds another MOB or player, it self destroys.
Can someone help me?
-
Hi everyone, I'm doing a skill
In which he does some checks, cell by cell ..
However, this is very very fast.I have a FOR () looping
Walking from cell to cell ...But I wanted this FOR () with a delay
Doing the check more slowlyIt's possible????
About the skill:The skill makes a MOB walk on a line ... Then the skill checks cell by cell ...
Upon reaching the end of this line, the MOB dies.
But ... as this loooping is very fast, the MOB dies before reaching the end of the path ....:'(
So, I need a delay in this FOR () so that the MOB can walk to the end and not die before ...
Some skills have this delay ... it has a certain delay to cause damage, etc ...
But I do not know how to do this ...Is there anything related to skill_timerskill ????
Thanks -
On 19/08/2017 at 1:17 AM, yashin16 said:Hello guys! Some know the Death Knight's sprite name? like Knight is 񃯇
Help meaah xD thx
Death Knight's????
Are you talking about the Lord Knight's?
Or Rune Knight's?
Or are you talking about some mob?Knight = ±Â»Ç_³² Lord = ·ÎΜųªÀÌÆ®_³² Rune K. = ·É³ªÀÌÆ®_³²
-
Hello guys,
I have two doubts about editing in SRC.
After summoning a mob using mob->spawn()
What function do I use to kill it?
(I tried to use mob->dead() but it did not work)Second doubt is
I have the coordinate of a cell (x, y)
I want to do a check IF()
if there is any mob or player around that cell.How to do this check?
-
2 hours ago, Easycore said:hand1 = sd->status.inventory[sd->equip_index[EQI_HAND_L]].nameid; hand2 = sd->status.inventory[sd->equip_index[EQI_HAND_R]].nameid;
Thankyou Easycore It worked!
Solved! -
Hello guys
I'm trying to check if the player is donning a certain equipment by hitting a particular MOB.I can not do the check, someone can help me ..
I'm trying something like this.
in file battle.c
Within function battle_check_target()int hand1,hand2 = 0; int item_id = 1201; if(src->type==BL_PC){ sd = BL_UCCAST(BL_PC,src); hand1 = pc->checkequip(sd,script->equip[8]); hand2 = pc->checkequip(sd,script->equip[9]); }
Condition when hitting mob
if(BL_UCCAST(BL_MOB, t_bl)->class_ == 1002 && (hand1 == item_id || hand2 == item_id)){ state |= BCT_ENEMY; //Natural enemy. }
But ... The equipment check is not correct, can anyone help me?
I believe the logic is this ..
-
16 hours ago, Arduino said:Hi!
I recommend you to see the doc/script_commands.txt file and search for unit_walk, unit_attack, unit_emote, etc. Those are the commands that you are looking for and in the same documentation file are examples of how to use them!
Hi Arduino
right! unit_walk, unit_attack, unit_emote
I'm looking at the commands, I'll try to apply my skill ..
I'll edit it later if you have any questions.
@EDIT:
I found this skill in SRC, I believe that is the way!case NPC_RUN: { const int mask[8][2] = {{0,-1},{1,-1},{1,0},{1,1},{0,1},{-1,1},{-1,0},{-1,-1}}; uint8 dir = (bl == src)?unit->getdir(src):map->calc_dir(src,bl->x,bl->y); //If cast on self, run forward, else run away. unit->stop_attack(src); //Run skillv tiles overriding the can-move check. if (unit->walktoxy(src, src->x + skill_lv * mask[dir][0], src->y + skill_lv * mask[dir][1], 2) && md) md->state.skillstate = MSS_WALK; //Otherwise it isn't updated in the AI. } break;
-
Hello everyone, does anyone know if you have some function in SRC to manipulate a mob?
(Make him walk in the directions that you want)I've been looking at mob.c and seen that it has mob->randomwalk()
It makes the floor mob, but for random directions ...
If I do not have any specific commands, I will have to adapt this
To make the mob walkIt is a skill that summon a Mob and move it in the direction the player has selected.
This is the idea ... And when you find a cell "Not walkable", then the mob disappears.Can someone help me with some idea or direction.
-
Hi, I need some help.
Can someone help me with a scrip to summon a mob while using a skill?
You use a certain skill, summon a mob for a few seconds, and after a few seconds that mob disappears.The mob can appear in the same coordinate of the player looking in the same direction if possible
I do not know how to do it
-
7 hours ago, caspe said:Well, it is not src based it is similar to creating custom headgear spirits, it is client based.
here is the link how to add custom weapons
http://herc.ws/wiki/Custom_weapons
This attack effect also are part of sword spirits, take one of those sword .act and .spr file and then open with act editor. Just try it out.
Forgive me for asking, I had forgotten the proper way to point to the sprite of a weapon. Thanks for the link of the wiki, it is well exposed.
7 hours ago, caspe said:i just found u have create custom job and still don't know how weapon spirits works................./swt
hahahaha
And on the second doubt, I'm looking for any function to generate an effect done in .spr
So any chance interests me.
This effect (in .spr) I want to use in a custom skill.
Since the effect has to be in all directions, the specialeffect () function does not work, so I'm looking for other possibilities and ideas.
Thank you for your response. -
Hello,
after creating a custom sword, how can I associate this custom sword with these attack effects?
Has several sprites of sword attack, I wanted to be able to choose one and put in my custom sword.Second doubt:
In SRC, where do I find the code that calls these sprites?
These sprites happen when you use basic attack, right?
In what part of src do I find this?thank you
-
2 hours ago, malufett said:clif->specialeffect() only does is to show and display animation with out attachment with the characters action, direction or target but only the x,y where the character is standing...
if you want to have interactive skill effect use the ff:clif_skill_damage
clif_skill_nodamage
clif_skill_poseffecthowever this is only limited with the existing skills animation
So you can not use these 3 functions in a custom skill.
I just need to display a sprite (which would be the effect of the skill) taking into consideration the direction of the summoner.
So .. I'm thinking of some alternatives.
Maybe I can do this with npcs (effect on sprite as an npc)or...
There are those effects of weapons that appear (sword, shield, bow, etc.) when you give a basic attack .. maybe I can use it.
Using a command to invoke this effect ... but I do not know how ... -
Hi all,
I have a question related to the special effect.
clif->specialeffect()
I'm putting a special effect on a custom skill
But when casting the effect, it ignores the character's direction.I need the effect to take into account the axis of the character.
As the effect is a sprite and an act (with all directions) I thought he would do it automatically.
But only one direction of the effect appears, regardless of the axis of the character.
Maybe the new specialeffect () to do this, then, if anyone knows and can help me.
By the way, how to set the new specialeffect ()
I saw the topic of Meko, but I wanted some practical examples to understand better. -
11 minutes ago, meko said:I guess you meant (x,y) of a cell but if you really want an ID (of map->cell[]) you would do (x + y * map->list[m].xs).
If you just want x,y then you don't need to do anything fancy since skill_castend_pos2 already has access to x,y
Ah yes, I understood.
I'm trying to do the following meko.
Esou trying to make a similar skill LG_CANNONSPEAR
However, the difference is that the click must be in the area.(the LG_CANNONSPEAR the click must be on some mob.)
The idea is to get the x, y of the cell clicked,
Get the x, y of the player
And make a FOR () to go by checking cell by cell during that path.
If find any ENEMY during this path, then it deals damage.
The Cannon Spear skill performs the following function:
And also her for the first Mobs she finds.
It uses a foreachinpath () to traverse this path.skill->area_temp[1] = bl->id; map->foreachinpath(skill->attack_area,src->m,src->x,src->y,bl->x,bl->y, skill->get_splash(skill_id, skill_lv),skill->get_maxcount(skill_id,skill_lv), skill->splash_target(src), skill->get_type(skill_id),src,src,skill_id,skill_lv,tick,flag,BCT_ENEMY);
I'm really confused how to do this.
I've been trying several functions for some days without success. -
Hello guys.
Can someone give support related to the file skill.c?
I want to return the ID of a clicked cell.
This code I know returns a mob id.Skill-> area_temp [1] = bl-> id;
How to return the id of a cell?
PS: Must be within the method skill_castend_pos2(){}
I'm doing a damage skill in area.
thanks
Using skill->castend_nodamage_id [DOUBT]
in Source Support
Posted
Yes, I did it.
I also put in both arguments BL
and the error is the same ... the map server crashed