Tio Akima

Members
  • Content count

    222
  • Joined

  • Last visited

  • Days Won

    3

Tio Akima last won the day on April 18

Tio Akima had the most liked content!

About Tio Akima

  • Rank
    Advanced Member

Profile Information

  • Gender
    Not Telling
  • Emulator:
    Hercules
  • Github
    Tio Akima

Recent Profile Visitors

1786 profile views
  1. yes, skill window! I use the skill in the area .. and then do the whole process right. My skill ALL_TEST case is in skill_castend_pos2
  2. hey man.... I tried this ... I got a mistake ... he is saying that in status.c Val3 was not declared struct block_list *src = map->id2bl(val3); so I tried to put it this way: struct block_list *src = map->id2bl(sce->val3); The Status.c code looks like this: case SC_RUN: { struct unit_data *ud = unit->bl2ud(bl); bool begin_spurt = true; // Note: this int64 value is stored in two separate int32 variables (FIXME) int64 starttick = (int64)sce->val3&0x00000000ffffffffLL; starttick |= ((int64)sce->val4<<32)&0xffffffff00000000LL; if (ud) { if(!ud->state.running) begin_spurt = false; printf("enter 1 \n"); //console debug ud->state.running = 0; if (ud->walktimer != INVALID_TIMER) unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS); printf("enter 1 \n"); //console debug struct block_list *src = map->id2bl(sce->val3); if(bl->type == BL_MOB && (src && src->type == BL_PC)){ // check to make sure source is available and a pc type skill->castend_nodamage_id(src, bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0); //active bomb printf("enter 3 \n"); //console debug } } if (begin_spurt && sce->val1 >= 7 && DIFF_TICK(timer->gettick(), starttick) <= 1000 && (!sd || (sd->weapontype1 == 0 && sd->weapontype2 == 0)) ) sc_start(bl, bl,SC_STRUP,100,sce->val1,skill->get_time2(status->sc2skill(type), sce->val1)); } break; but it's not working I'm using printf to debug ... And he is not going through the BL and SRC check take a look and tell me if I'm doing something wrong
  3. Okay, I'll post the code here. This is my custom skill .. in skill.c She summons a MOB and uses SC in the same monster case ALL_TEST: { int mob_id = 1142; //marina sphere struct mob_data *md; md = mob->once_spawn_sub(src, src->m, x, y, clif->get_bl_name(src), mob_id, "", SZ_BIG, AI_SPHERE); if (md) { mob->spawn (md); //summon mob sc_start4(src,&md->bl,SC_RUN,100,skill_lv,dir,0,0,0); }// end if } break; in status.c, within the function responsible for terminating this status (SC) in status_change_end_ case SC_RUN: { struct map_session_data *pl_sd = map->nick2sd(bl); struct unit_data *ud = unit->bl2ud(bl); bool begin_spurt = true; // Note: this int64 value is stored in two separate int32 variables (FIXME) int64 starttick = (int64)sce->val3&0x00000000ffffffffLL; starttick |= ((int64)sce->val4<<32)&0xffffffff00000000LL; if (ud) { if(!ud->state.running) begin_spurt = false; printf("enter 1 \n"); //console debug ud->state.running = 0; if (ud->walktimer != INVALID_TIMER) unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS); printf("enter 2 \n"); //console debug skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0); //cast skill if(bl->type == BL_PC) printf("BL_PC \n"); //console debug if(bl->type == BL_MOB) printf("BL_MOB \n"); //console debug } if (begin_spurt && sce->val1 >= 7 && DIFF_TICK(timer->gettick(), starttick) <= 1000 && (!sd || (sd->weapontype1 == 0 && sd->weapontype2 == 0)) ) sc_start(bl, bl,SC_STRUP,100,sce->val1,skill->get_time2(status->sc2skill(type), sce->val1)); printf("enter 3 \n"); //console debug } break; I'm using the function skill->castend_nodamage_id that way it works but it works wrong .. Instead of blasting the target (MOB) she explodes the player
  4. how can i use bl to call them? I already tried to use only bl in the two arguments of the function: skill->castend_nodamage_id(bl, bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0); but it does not work Oh yes... I made the following debug I put an if () to know the contents of bl: if(bl->type == BL_MOB) printf("this is BL_MOB \n"); //msg in console so, he enters into this condition, and shows the message. @benching @4144 @Happy Look at an example in this command it uses map_session_data in the atcommando.c file, look for this function: // command to blow up a player if I'm not mistaken ACMD (nuke) { But this command uses a string (typed by the player) it uses the following form: skill->castend_nodamage_id(&pl_sd->bl, &pl_sd->bl, NPC_SELFDESTRUCTION, 99, timer->gettick(), 0); I tried to follow the example .. It worked, but as I said above it explodes the player and not the target. I thought it would be so easy ... I believed that, just passing BL as an argument that the target would already be found
  5. Yes, I did it. I also put in both arguments BL and the error is the same ... the map server crashed
  6. 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
  7. 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.
  8. 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 function struct 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 PLAYER his 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
  9. 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?
  10. 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_walktoxy When it finds a non-walking cell, it displays the message. I put this condition if ( 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 mob There in bl->m, bl, bl->x, bl->y How can I do this?
  11. Thanks for the message fxfreitas I'll test this. 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
  12. 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.
  13. 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
  14. 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?