Jump to content

Tio Akima

Members
  • Content Count

    349
  • Joined

  • Last visited

  • Days Won

    31

Posts posted by Tio Akima


  1. 31 minutes ago, meko said:

    if you explain what you are trying to accomplish I could help you find a suitable solution

    In skill.c
    I did an area skill. This skill summon a mob.
    I sumono a mob and make him walk (I shoot this mob in one direction) with unit-> walktoxy ();

    That is, because of the unit-> walktoxy (), this mob will go through the functions:

    unit-> walktoxy ();
    unit-> walktoxy_sub ();
    unit-> walktoxy_timer ();

    right?

    When this mob dies (or stops walking) I want to call a skill ... skill Lord of Vermilion (WZ_VERMILION)

    The function that defines whether the mob has stopped walking is unit-> walktoxy_timer ();

    So, I need to call the skill (WZ_VERMILION) inside the function
    unit-> walktoxy_timer ();

    But for this skill to work, I need the data from the player.

    The information that arrives to unit-> walktoxy_timer (); are data from the MOB that walked and stopped ...
    The skill (WZ_VERMILION) will only work, if I call it with player data.

    This is a way of doing a skillshot ... Throwing the mob in one direction, and when it hits an enemy, an area skill is invoked.
    It sounds complicated, but it's a simple logic up to it. @meko
    If you can help me, I'll be very grateful. <3


  2. 2 hours ago, meko said:

    You can't just get the player ID (account id) out of thin air, you have to get it from somewhere.

    • If you have a ScriptState (st) you can get it from st->rid
    • if you have a block_list (bl) you can get it from bl->id
    • if you have a map_session_data (sd) you can get it from sd->bl.id
    • if you have a nickname you can get the sd with map->nick2sd(nick) and then get the id with sd->bl.id

    that is, there is no solution to my problem.

    =/


  3. Hi guys,
    in map.c I want to create a basic function
    a function that returns the player ID, without parameters
    only with return ID from the player.
    If anyone knows

    Something like this:

    int map_get_id() {
        struct map_session_data* sd;
    
        sd = map->id2sd(?);
        return sd->bl.id;
    }

    EDIT: It does not have to be exactly in map.c
    but must be a function that returns the player ID

    Can someone help me?


  4. 10 hours ago, Blinzer said:

    where do i go to change this stuff?

     

    sUAmhUO.png

     

    Do you want to change the class of an item?

    There are two places you can set this information (if I'm not mistaken).
    In item_db.conf 
    in the argument: 

    Subtype: "W_1HSWORD"

    And also in the file itemInfo.lub (in lua files)
    in the argument:

    ClassNum = 4

    If you want to check information on the types of weapons
    You can look at the files: weapontable.lub (at your date)
    and also in item_db.txt (emulator / doc)


  5. 14 minutes ago, 4144 said:

    then yes this is your issue. you cast player to mob. and calling mod skill on player.

    memory corruption is hercules issue, but normally no one call mob skill on player.

     

    I understand...
    I'm calling SC_RUN on a mob ... And then, when SC_RUN stops, I call that function highlighted in red.

    The skill is: the player calling SC_RUN in mob.
    But this is working. The memory problem is when I put the highlighted call in red.

    Is there any way to fix it? any way to make that call without error?
    Thanks for that help. <3


  6. 21 minutes ago, 4144 said:

    you using any plugins or mods? if yes, try on clean hercules.

    error mostly mean memory corruption, but it not say where and why. In windows i not sure what exists any simple way to debug this.

    Thanks for answering.
    This error is coming from the TK skill.
    TK_RUN ...

    I put a function in the skill. in Status.c
    in case SC_RUN I put this call:

    struct mob_data *md = bl;
    skill->castend_nodamage_id(&md->bl, &md->bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0);		//mob explode	

    and it was thus:

    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 message
                        ud->state.running = 0;

                            struct mob_data *md = bl;               
                            skill->castend_nodamage_id(&md->bl, &md->bl, NPC_SELFDESTRUCTION, 1, timer->gettick(), 0);      
     //mob explode            
                    
                        if (ud->walktimer != INVALID_TIMER){
                            unit->stop_walking(bl, STOPWALKING_FLAG_FIXPOS);
                            printf("enter 2 \n");  //console message                        
                            clif->specialeffect(bl, 223, AREA);        
                             printf("enter 3 \n");  //console message

                        }
                        
                    }
                    if (begin_spurt && sce->val1 >= 7
                     && DIFF_TICK(timer->gettick(), starttick) <= 1000
                     && (!sd || (sd->weapontype1 == W_FIST && sd->weapontype2 == W_FIST))
                    )
                        sc_start(bl, bl,SC_STRUP,100,sce->val1,skill->get_time2(status->sc2skill(type), sce->val1));    
                }
                break;

    -----------------------------------------------------------------------------------------------------------------------

    Is it possible to correct this error?
    Am I making the wrong call?


  7. On 17/02/2018 at 4:43 PM, Pedroooo said:

    Does anyone know how to add a custom effect to be used by the specialeffect () command ?

    add in SRC?

    Example:

    clif->specialeffect(&sd->bl, 609, AREA);

    target, effect number, effect type )

    If I'm not mistaken, it's in that order
    Someone correct me if I'm wrong, please.


  8. Hello, I added a two-handed sword and put it for all classes to use.

    However, ASPD falls to zero when equipping the sword.
    Only the swordman class and superiors who use normal.

    Why does it happen..?
    In what part of the SRC is the class weapons defined?
    I want to release the use of two-handed swords for everyone without this ASPD error


  9. 3 hours ago, tathanvocuc017 said:

    i add prt_in_bot01.bmp  but it still not working... 

    I very like this map... 

    http://xzxx.jpg


    I honestly do not know where you're going wrong.

    @EDIT 
    One minut... 
    I'll upload a new version

    @EDIT 2
    Is ready... 
    Version 1.2 is with the texture path error corrected
    throw the old map out and get the new version ...
    Test the map and let me know, please


  10. Hello guys..

    the question is a bit complex.

    'm looking at SRC, where it talks about how each class attacks.

    each class has 3 ways to attack (which change according to the weapon it is using)

    She attacks in a way when using a spear, attacks otherwise when she is using a sword ... And attacks otherwise when she is not using weapons ...


    Another example:

    The monk when it is without weapon, uses the sprite attack 3 (NOT COULD BE ... should be the sprite ataq 2) ... 
    The archer, uses the sprite attack 3 only when he has a bow and arrow equipped. (Its OK)
    teste_ataqs_sprites.png


    I want to edit this to be uniform, all the same way.
    Can someone tell me where to find this information in SRC?

    It must be something about the BASIC ATTACK of each class.
    All sprites (ACT) are standard
    However, each  class react in different ways.
    each class has a basic attack that reacts in a way ...
    Where can I find it at SRC?


    It's a little complex, but I believe that by changing ownership of the basic attack, I can make uniform for all classes.


  11. Special Room - 1.0 [FREE MAP]


    Special Room (s_room)

    Map created by TioAkima and distributed (without any cost) by the author himself.
    It is a customized room that can have several functions, such as room for Quest's, Market (shop's), VIP room, meetings, etc ...

    The trade in this map is permanently prohibited.

    [I have not yet tested the map .. I have finished recently so .. Any mistake, please let me know.]


    Att,
    TioAkima


     


  12. Hi, I'm TioAkima.

    Small tutorial to help add the new fucking SIGNBOARDs that are available to new clients.
    If I'm not mistaken, it's for client's 2016+

    For those who do not know, I'm talking about these new chat/shop on the NPC:


    2016-09-20_17_56_09_zpsk7rvnpa7.jpg

     

    They are cool and leave the server with a nice face. <3

    it is quite simple.
    Go in your data folder, and in your LUA files (luafiles514)

    search for file signboardlist.lub

    data\luafiles514\lua files\signboardlist.lub

    Now let's understand how this file works to add a SIGNBOARD (cute little window with icon) like this:


    For_Snsscreen012.jpg

    The structure of the file is as follows:

    {" prontera", 150, 193, 5, IT_BMP, "유저인터페이스\\information\\over_kafra.bmp", " KAFRA Tools ","#0x00FFFFFF"}

       {
            "prontera", = map name
            150, = x
            193, = y
            5, = height you want the window (can be zero if you want)
            IT_SIGNBOARD, = window type
           "유저인터페이스\\information\\over_kafra.bmp",  = here is the directory where your icon is
            "KAFRA Tools", = chat  name
            "#0x00FFFFFF" = letter color
        },

    Just add another line following this format. Remembering that the last window does not have the comma in the end ... It is good to pay attention to this.

    Now to add icons in this other way>


    For_Snsscreen015.jpg

    The format is very similar, but it has some minimal difference ... And it's also in the same file.
    It's pretty much the same thing, but one or the other function argument changes.

    The structure is this:

    {"prontera", 150, 193, 1, IT_BMP, "유저인터페이스\\information\\over_kafra.bmp"}, 

       {
            "prontera", = map name
            150, = x
            193, = y
            1, = height you want the icon (can be zero if you want)
            IT_BMP, = Only place the icon (without the window)
           "유저인터페이스\\information\\over_kafra.bmp"  = here is the directory where your icon is
        },

    READY!
    Note that for this, you do not put the name of the chat nor the color of the letter! (you do not have these two arguments, okay?) ..
    That's it .. I hope it helps anyone who wants to put these windows.

    att,
    Tio akima


  13. 6 hours ago, malufett said:

    change 

    
    sc_start4(src,&md->bl,SC_RUN,100,skill_lv,dir,0,0,0);

    to

    sc_start4(src,&md->bl,SC_RUN,100,skill_lv,dir,src->id,0,0);

     

    then remove your changes on status.c then add this instead...put after

    
    int64 starttick

    add this

    struct block_list *src = map->id2bl(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

    
    }

    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


  14. 9 hours ago, malufett said:

    it is because it first search for that string name if that user exist on the server once found it will pass that player's instance to pl_sd and use to that function(map->nick2sd(bl))..and take note sd or session_data is for players only the one you must look for is md or mob_data...

    show us your whole code for that part and we will gladly pinpoint the issue and fix that...

    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

     

     

     

     

     

     


  15. 2 hours ago, 4144 said:

    In function status_change_end_ sd already present. In this function only one pair of bl/sd from caster, and here no any targets.

    This mean in

    
    skill->castend_nodamage_id

    you can use bl for call it.

     

    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
     

    17 minutes ago, benching said:

    Make sure that bl is a monster,

    Make sure that bl is not null,

    Its crashing prolly because of that bl being null,

    I dont think mobs needs the map_session_data, so drop the pl_sd,

    Find a way to get the mob_data->bl to that function,

    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

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.