Jump to content

Hyroshima

Members
  • Posts

    189
  • Joined

  • Last visited

  • Days Won

    24

Posts posted by Hyroshima

  1. On 11/16/2024 at 10:34 PM, playniks said:

    Hi @Hyroshima! This work is absolutely brilliant. This is truly the best resolution of the nightmare I am currently experiencing. The ActiveInstance on my server has never been working. So, this is very useful to my server. However! I tried to apply both file A and B on my server. But both have the same outcome. 

    skill_max_trap: 5
    global_max_trap: 

    Global_max_trap works perfectly fine. but skill_max_trap doesn't seem to work. I ensure that activeinstance of my anklesnare trap is set to default or 0 in both pre-re/skilldb.yml and in import but I am still able to spam the trap multiple times greater than 5, even 20.

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

    Since my activeinstance is never working on my server. I wish someone could modify this file to make every skill I set will work independently with each other just like activeinstance do. 

    example: (These are the most important skills I need)
    ankle_snare_trap: 5
    fogwall: 3
    quagmire: 3
    firepillar: 5
    spiderweb: 3

     

    I hope you can help me or someone can help me of my agony. Very much appreciated to those who could help me. Thank you so much.

    Could you please tell me which revision you are using, if there were any errors or warnings when compiling after applying the diff?
    Now, to get more detailed, could you record a video?
    You show the skill that is not being affected by the diff, as it is there in skill_db.yml, maybe it is something specific in pre-re mode, after you send me this information I will analyze it as soon as I have time and then I will make an update in the mod.

  2. Allows you to send private messages to a player (char_id), you can use the char_id or a title as the sender.

    /** [Hyroshima]
     * whisper <CHAR_ID_TARGET>,<MESSAGE>,<CHAR_ID_SENDER/TITLE>};
     * @return: 0 success, 1 target not found, 2 sender not found.
     **/
    BUILDIN_FUNC(whisper){
    
    	map_session_data *ssd,*tsd;
    	char message[70] = {0};
    	char wisp_title[NAME_LENGTH] = {0};
    	uint8 len = strlen(script_getstr(st,3));
    
    	if(!script_charid2sd(2,tsd))
    	{
    		//Target not found / offline
    		script_pushint(st,1);
    		return SCRIPT_CMD_SUCCESS;
    	}
    
    	if(atoi(script_getstr(st,4)))
    	{
    		if(!script_charid2sd(4,ssd))
    		{
    			//Sender not found. / offline
    			script_pushint(st,2);
    			return SCRIPT_CMD_SUCCESS;
    		}
    		else
    			safestrncpy(wisp_title,ssd->status.name,NAME_LENGTH);
    	}
    	else
    		safestrncpy(wisp_title,script_getstr(st,4),NAME_LENGTH);
    
    	script_pushint(st,0);
    	safestrncpy(message,script_getstr(st,3),len);
    	clif_wis_message(tsd,wisp_title,message,len,0);
    
    	return SCRIPT_CMD_SUCCESS;
    }

     

    BUILDIN_DEF(whisper, "is?"), //Hyroshima

    Example:

    *whisper 150001,"message test","Tester";
    *whisper(150001,"message test",150002;

    Capturadetela2024-10-14081545.jpg.87f2632e5dddddffdac6afb166ce5a03.jpg

     

    A member had asked me if I would do it, I ended up doing it but then he had replied that he had already done it, so I am making available what I did.

    • Upvote 1
    • MVP 1
  3. 1 hour ago, Mitosky said:

    Hello, very grateful and I would like to put this on my server but when I compile it it gives the following error:

     

    image.png.f87505bfd342ae622910db15bf4effce.png

    if you added it manually you probably added a few lines above where it really should be, attach your clif.cpp or pastebin.com so I can take a look.

  4. 19 minutes ago, jimboy092032 said:

    I hate people always suggesting like you are paying the dev just be happy because this is for free. if Shakto will make this I think it will be 60$ or more but Hyroshima releasing cool staff for free so donat ask too much just be happy we have this cool feature. 

    I think on both sides, I believe that making free content available is essential to influence other people too, or even inspire other people.

    in a way, there are many mods/scripts that require a lot of time to develop and test, in addition to having to provide support when necessary.

    suggestions are also important, both for me and for those who will be able to benefit from them.
    but I understand what you are saying, I also think it is valid but don't be too hard on them, many could help if they knew how, we cannot let a minority affect us when we talk about those who only want to consume without participating

    Anyway, thanks to everyone lol, I will soon update the mod, if I had more time available (or if I could manage my time better lol) I will make more systems and mods available in the future. 😁

    • Upvote 2
    • MVP 1
  5. 7 hours ago, Reloadscript said:

    If you can choose:
    1- Show only icon
    2- Show element name
    3- Show element name+level
    4- Show all

    I would like to comment.

    i will change the current enable/disable option for this format soon.

     

    7 hours ago, Questune said:

    Thanks for the cool feature!,

     

    Suggestion: If possible can we add monster hp 🙂

    apparently it is not possible, I checked even without this mod, add the show_mob_info option to show the hp or lvl and then apply a title or groupid (icon/emblem) and it has no effect when show_mob_info is being used, the values are in different packages, but I will do some more analysis, if I can't do it, stay here in case someone has a solution lol.

     

    7 hours ago, WhiteEagle said:

    I am also in favor of this, but I would like to see more information added that would be important for leveling.
    Such as race, class, size.

    Nice work btw.

    i will see how safe it is, as there is a character limit.

    • Love 2
  6. 3 hours ago, williamII said:

    I think that the RO should indicate the elements of the mob from the beginning, since some classes are productive using elements and having to use a database or sense is a waste of time. Thanks for the contribution 😉

    A friend is creating the elemental icons in a standardized way and much better than these exemplary models that I used.
    when I upload an update to the mod I will improve the description, adding the mob's race and level, maybe the icon will be in gif showing the element in one frame and the element's level in another frame.

  7. Mob Element View


    A small mod that allows you to display a custom icon and a title referring to the element and element level of the mob.

    It can be disabled by changing it in monster.conf

    // Show Element Info [Hyroshima]
    // 0= Off, 1= On
    mob_ele_view: 1

     

    I have an observation to inform, if any of the information related to show_mob_info is enabled the mod will behave as disabled.

    // Display some mob info next to their name? (add as needed)
    // (does not works on guardian or Emperium)
    // 1: Display mob HP (Hp/MaxHp format)
    // 2: Display mob HP (Percent of full life format)
    // 4: Display mob's level
    show_mob_info: 0

     

    Obs: i am making 2 diff files available:

    • _A = Closest to current revision.
    • _B = A little older compared to the current review

     

    The video quality is not very good (sorry), watch the preview video in fullscreen 😅

     


     

    • Love 6
    • MVP 2
  8. On 9/14/2024 at 5:06 PM, Diana said:

    How can I make monster name with information like this?

     

    i just uploaded a mod that does something similar (I just didn't add the mob race), wait for Staff to accept the mod and you can test it.
    unfortunately if you use any of the options in show_mob_info you cannot use these changes.

    In the meantime you can test using a script like this to show a title on the mob:

    prontera,155,169,5	script	teste_mob_title	113,{
    	monster("prontera",156,170,"--ja--",1002,1);
    	.@mobrid = $@mobid;
    	setunitdata .@mobrid,UMOB_GROUP_ID,1;	//add a group icon
    	setunittitle .@mobrid,"Test Title";	//add a title
    	end;
    }

    remembering that you need to leave show_mob_info with value 0

  9. AnyMapDrops


    This mod made in map_drops.yml now allows you to add drops globally (without specifying a map), I also added a parameter where the added item can go directly to the player's inventory if there is space.

    Example of use ( db\import\map_drops.yml )

    Header:
      Type: MAP_DROP_DB
      Version: 2
    
    Body:
     - Map: ANY
       GlobalDrops:
        - Index: 0
          Item: Union_Token
          Rate: 50000
          DirectInventory: true
        - Index: 1
          Item: Flower
          Rate: 100000
       SpecificDrops:
         - Monster: Fabre
           Drops:
             - Index: 0
               Item: White_Gold_Coin
               Rate: 50000
               DirectInventory: true
             - Index: 1
               Item: Izidor
               Rate: 50000
         - Monster: Poring
           Drops:
             - Index: 0
               Item: Crystal_Jewel__
               Rate: 50000

    Note 1: To be valid across all maps, set the map name to ANY.

    Note 2: The new parameter DirectInventory ( false | true ) allows the item to go directly to the inventory.

    Note 3: I created 2 new mapflags (nomapdrops and mapdrops), the first is self-explanatory (does not drop any items from map_drops 😅), the second will be effective for instances, as now map_drops does not drop items in instances, so just apply the second mapflag on the instance (in the instance maps) to make it work again.
      Example of use:

    OnInstanceInit:
    	setmapflag instance_mapname("1@nyd"),mf_mapdrops;
    	setmapflag instance_mapname("2@nyd"),mf_mapdrops;
    


    Next updates I will add a parameter to mapdrops.yml if you want the item to be dropped in instances too instead of having to use the mapdrops mapflag.
     

    Quote

    Obs: i am making 2 diff files available:

    • _A = Closest to current revision.
    • _B = A little older compared to the current review

    As there have been some changes to how some functions receive/send parameters, I will try to maintain this standard when sending diff files.


     

    • Upvote 1
    • Love 6
  10. Max Trap Control


    This mod allows you to control the number of traps that the player can use.

    conf/battle/skill.conf

    // Max Trap [Hyroshima]
    // Functionality to control the number of active traps.
    // Note:
    //  skill_max_trap > Controls the number of individual active trap skills that were not been to defined parameter ActiveInstance in skill_db.yml
    //  global_max_trap > Controls the maximum active trap skills for all skill traps (listed in skill.cpp -> trap_skill_id), this option overrides skill_max_trap if the definer is smaller than it
    //-
    // skill_max_trap: 0 (disabled)
    // global_max_trap: 0 (disabled)
    //-
    skill_max_trap: 0
    global_max_trap: 0
    • the option skill_max_trap only affects skills that do not have the parameter ActiveInstance in skill_db.yml
    • the option global_max_trap affects all trap skills mentioned above in the code box, the skills are listed in the function as I also inform in the description of the code box above.

     

    Note: i am making 2 diff files available:

    • _A = Closest to current revision.
    • _B = A little older compared to the current review

    As there have been some changes to how some functions receive/send parameters, I will try to maintain this standard when sending diff files.

     


    • Submitter
    • Submitted
      06/10/24
    • Category
    • Video
      https://www.youtube.com/watch?v=l5Sr42myq40
    • Content Author
      Hyroshima

     

    • Upvote 2
  11. Extra Mapflags [nofalcon, noriding, nomadogear, nowug, nocart]


    They are simple mapflags but I believe they can be very useful in general.

    Note: noriding affects pecopeco, dragon, gryphon.

    prontera	mapflag	nofalcon
    prontera	mapflag	noriding
    prontera	mapflag	nomadogear
    prontera	mapflag	nocart
    prontera	mapflag	nowug

     


     

  12. On 6/6/2024 at 2:55 AM, JinYuichi said:

    I have a question for this system, can this same method be implemented to obtain random option?

    it would be possible, but I would need to write new code exclusively for this, maybe when I have more time available I can add this functionality to the NPC too.

    • Love 2
  13. 2 hours ago, KeiGardev said:

    Hello I made a Script, the idea is to have a NPC, maybe later a @command , that counts the number of cards that the Player adquired for the first time.
    but total cards is always returning 1

    I have tried using ("SELECT COUNT(DISTINCT card_id) an then I got -1 


     

    prontera,140,174,4	script	Personal storage2#prt	113,{
    OnInit:
            // Query of obtained cards
            totalCards = query_sql("SELECT COUNT(*) FROM player_cards WHERE account_id = '" + getcharid(3) + "'");
            // totalCards = query_sql("SELECT COUNT(card_id) FROM player_cards WHERE account_id = '" + getcharid(3) + "'");
            mes "[Card Album]";
            mes "Here, let me open";
            mes "your Card record.";
            mes "You have collected " + totalCards + " cards out of 1009.";
            mes "Thank you for using";
            mes "the Kafra Service.";
            close;
    }

    (I am using PHPMYADMIN to Run the server locally)this table records when you get a card, the name of the table is player_cards and is together with the other tables of Rathena_DB
    it looks like this:
    image.png.6679ee150dbf437cbcb009ae4099f48e.png

    what I am doing wrong?

     

    Let's use in here script_commands.txt example: https://github.com/rathena/rathena/blob/master/doc/script_commands.txt#L9179

    you use it like this:

    totalCards = query_sql("SELECT COUNT(*) FROM player_cards WHERE account_id = '" + getcharid(3) + "'");

    basically totalCards will receive 1 if the query_sql is executed successfully or 0 in case of failure, now the values to which you are doing the SELECT need a scope in which they will always be an array of values, in your case as a sum of all the values in the table referring to the account id, so the array will only have one index with the result, so you would have to do it like this:

    prontera,140,174,4	script	Personal storage2#prt	113,{
    OnInit:
            // Query of obtained cards
            query_sql("SELECT COUNT(*) FROM player_cards WHERE account_id = '" + getcharid(3) + "'",.@totalCards);
            // totalCards = query_sql("SELECT COUNT(card_id) FROM player_cards WHERE account_id = '" + getcharid(3) + "'");
            mes "[Card Album]";
            mes "Here, let me open";
            mes "your Card record.";
      	//Ex1
            mes "You have collected " + .@totalCards + " cards out of 1009.";
      	//Ex2
            mes "You have collected " + .@totalCards[0] + " cards out of 1009.";
            mes "Thank you for using";
            mes "the Kafra Service.";
            close;
    }

    Remembering that you cannot use the OnInit label and then use commands that are common to rid (player) without attaching rid (player) as in the case of the "mes","getcharid(3)" and "close" commands, this will cause an error on the stating emulator  that there is no rid attached, I hope you understand what I tried to explain 🙂

    • Love 1
  14. Search for this function:

    	function	gviewid	{
    		set .@n,getarraysize(.viewid);
    		while(1)
    		{
    			set .@zt,.@zt+1;
    			if(.@zt&13)sleep2(1);
    			if(set(.@u,.viewid[set(.@t,rand(.@n))]))
    				break;
    		}
    
    		for(;.@t<.@n;set .@t,.@t+1)
    			set .viewid[.@t],.viewid[.@t+1];
    		return .@u;
    	}

     

    and replace with this:

    	function	gviewid	{
    		set .@n,getarraysize(.viewid);
    		if(.@n<=1) set .@rnd,0;
    		else  set .@rnd,rand(.@n);
    		//dispbottom "."+getarraysize(.viewid)+"";
    		while(1)
    		{
    			set .@zt,.@zt+1;
    			if(.@zt&13)sleep2(1);
    			if(set(.@u,.viewid[set(.@t,.@rnd)]))
    				break;
    		}
    
    		for(;.@t<.@n;set .@t,.@t+1)
    			set .viewid[.@t],.viewid[.@t+1];
    		return .@u;
    	}

     

     

    • MVP 1
  15. 5 hours ago, Rexona said:

    Hi Hiroshima, how are you? I hope so, my friend, I'm having trouble with this error, could you help me?

     

     

    image.png.5b47a8604ffb869715adf1b20ff4c13e.png

    Did you change the script?
    This line you mention is incomplete, the version in the script I sent is like this:

    	getinventorylist;
    	
    	for(set .@i,0; .@i<getarraysize(.itens); set .@i,.@i+1)
    	{	
    		if(inarray(@inventorylist_id[0],.itens[.@i]) > -1)
    		{
    			setarray .@invitm[getarraysize(.@invitm)],.itens[.@i];
    			setarray .@invitm$[getarraysize(.@invitm$)],""+getitemname(.itens[.@i])+"";
    		}
    	}

    The revision of your emulator is so old that it doesn't have the inarray() command and have you tried to remove it?

  16. 11 hours ago, Israel said:
    Hello, how are you? I have these errors, can you help?

    image.png.e64da8c3293b72027cd6a431ff88ffc3.png

    Sorry, but this error is not from the Baron Of Cards system.

    getarrayindex() it's a Hercules command!

    I believe that this script you are trying to use was made to run on Herc, to run on rA you need to properly convert the commands and maintain the logic.

  17. On 7/15/2023 at 11:34 PM, Frost Diver said:

    It's coming from the npc script in this line:

    specialeffect(EF_FIREWALL2, AREA, .@cid);

    and this line:

    specialeffect(EF_HEAL, AREA, getcharid(3));

     

    Alter:

    specialeffect(EF_FIREWALL2, AREA, .@cid);

    To:

    specialeffect(EF_FIREWALL2, AREA, convertpcinfo(.@cid,CPC_NAME));

     

    And:

    specialeffect(EF_HEAL, AREA, getcharid(3));

    To:

    specialeffect(EF_HEAL, AREA, strcharinfo(0));

     

×
×
  • Create New...