Jump to content
  • 0

How to change style detail (@mi)


saovarott159

Question


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

Hello guys.

      How to change style detail on atcommand  @mi 

222.JPG.42c7e972ea0a5166a08898efff849ca3.JPG

to

1111.JPG.230deced7150def76f33dbf395ea5cfe.JPG

 

Thank you

Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

The easiest way to achieve this would be to bindatcmd @mi to a script, so you can then control every aspect of the command.

For example:

-	script	atcmd_mi	-1,{
OnInit:
	bindatcmd "mi",strnpcinfo(3)+"::OnAtcommand";
	end;
OnAtcommand:
	if(.@atcmd_numparameters == 0){ dispbottom "Usage: @mi <id>"; end;}
	.@id = atoi(.@atcmd_parameters$[0]);
	if(getmonsterinfo(.@id,MOB_NAME) == -1){ dispbottom "Monster ID not found"; end; }
	mes "Name:" + getmonsterinfo(.@id,MOB_NAME);
	mes "Lv:" + getmonsterinfo(.@id,MOB_LV);
	mes "HP:" + getmonsterinfo(.@id,MOB_MAXHP);
	mes "Base EXP:" + getmonsterinfo(.@id,MOB_BASEEXP);
	mes "Job EXP:" + getmonsterinfo(.@id,MOB_JOBEXP);
	end;
}
Quote

*getmonsterinfo(<mob ID>,<type>)

This function will look up the monster with the specified ID number in the
mob database and return the info set by TYPE argument.
It will return -1 if there is no such monster (or the type value is invalid),
or "null" if you requested the monster's name.

Valid types are:
	MOB_NAME - monster's name, if there is no such monster "null" is returned
	MOB_LV - monster's level
	MOB_MAXHP - monster's maximum hp
	MOB_BASEEXP - monster's base experience
	MOB_JOBEXP - monster's job experience
	MOB_ATK1 - monster's atk
	MOB_ATK2 - monster's atk2
	MOB_DEF - monster's def
	MOB_MDEF - monster's mdef
	MOB_STR - monster's str
	MOB_AGI - monster's agi
	MOB_VIT - monster's vit
	MOB_INT - monster's int
	MOB_DEX - monster's dex
	MOB_LUK - monster's luk
	MOB_RANGE - monster's range
	MOB_RANGE2 - monster's range2
	MOB_RANGE3 - monster's range3
	MOB_SIZE - monster's size
	MOB_RACE - monster's race
	MOB_ELEMENT - monster's element(doesn't return the element level, only the element ID)
	MOB_MODE - monster's mode
	MOB_MVPEXP - monster's mvp experience

For more details, see the sample in 'doc/sample/getmonsterinfo.txt'.

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

-	script	atcmd_mi	-1,{
OnInit:
	bindatcmd "mi",strnpcinfo(3)+"::OnAtcommand";
	end;
OnAtcommand:
	if(.@atcmd_numparameters == 0){ dispbottom "Usage: @mi <id>"; end;}
	.@id = atoi(.@atcmd_parameters$[0]);
	if(getmonsterinfo(.@id,MOB_NAME) == -1){ dispbottom "Monster ID not found"; end; }
	mes "Name:" + getmonsterinfo(.@id,MOB_NAME);
	mes "Lv:" + getmonsterinfo(.@id,MOB_LV);
	mes "HP:" + getmonsterinfo(.@id,MOB_MAXHP);
	mes "Base EXP:" + getmonsterinfo(.@id,MOB_BASEEXP);
	mes "Job EXP:" + getmonsterinfo(.@id,MOB_JOBEXP);
	end;
}

Thank you but it's work.../sob

4444.JPG.f6a771316a2c692bbbc17541e4014b75.JPG

Edited by saovarott159
Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

Change:

if(getmonsterinfo(.@id,MOB_NAME) == -1){ dispbottom "Monster ID not found"; end; }

To:

 

if (getmonsterinfo(.@id, MOB_LV) < 0 || getmonsterinfo (.@id, MOB_NAME) == "null") { dispbottom "Monster ID not found"; end; }
  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

24 minutes ago, Akkarin said:

Change:


if(getmonsterinfo(.@id,MOB_NAME) == -1){ dispbottom "Monster ID not found"; end; }

To:

 


if (getmonsterinfo(.@id, MOB_LV) < 0 || getmonsterinfo (.@id, MOB_NAME) == "null") { dispbottom "Monster ID not found"; end; }

thank you it work.. /kis

If i want show detail item drop and %drop ..

mes "Job EXP:" + getmonsterinfo(.@id,MOB_?????);
Link to comment
Share on other sites

  • 0

  • Group:  Forum Manager
  • Topic Count:  282
  • Topics Per Day:  0.06
  • Content Count:  3123
  • Reputation:   1617
  • Joined:  03/26/12
  • Last Seen:  

For drops data you can use "getmobdrops". You can find an example in https://raw.githubusercontent.com/rathena/rathena/master/doc/script_commands.txt

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

7 hours ago, Akkarin said:

For drops data you can use "getmobdrops". You can find an example in https://raw.githubusercontent.com/rathena/rathena/master/doc/script_commands.txt

OK thank you so much 

the last question help me please

How to convert (example in picture)

1.50  to 1.25

0.02 to 0.01

 

script :

mes "^FF0000" + getitemname(.@item[.@i]) + " = " + .@rate[.@i]/200 + ((.@rate[.@i]%100 < 10) ? ".0":".") + .@rate[.@i]%100 + "%^000000";

5555.JPG.cceb9ac8e273cc2faef1d03074e0427d.JPG

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  744
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

2 hours ago, saovarott159 said:

OK thank you so much 

the last question help me please

How to convert (example in picture)

1.50  to 1.25

0.02 to 0.01

 

script :


mes "^FF0000" + getitemname(.@item[.@i]) + " = " + .@rate[.@i]/200 + ((.@rate[.@i]%100 < 10) ? ".0":".") + .@rate[.@i]%100 + "%^000000";

5555.JPG.cceb9ac8e273cc2faef1d03074e0427d.JPG

 

do you mind share the complete script Sir Thanks

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

// get a Mob ID from the user
	input .@mob_id;
	
	if (getmobdrops(.@mob_id)) {	// 'getmobdrops' returns 1 on success
		.@count = $@MobDrop_count;
		copyarray .@item[0],$@MobDrop_item[0],.@count;
		copyarray .@rate[0],$@MobDrop_rate[0],.@count;
		
		mes getmonsterinfo(.@mob_id,MOB_NAME) + " - " + .@count + " drops found:";
		for( .@i = 0; .@i < .@count; .@i++ ) {
			mes .@item[.@i] + " (" + getitemname(.@item[.@i]) + ") " + .@rate[.@i]/200 + ((.@rate[.@i]%100 < 10) ? ".0":".") + .@rate[.@i]%100 + "%";
		}
	} else {
		mes "Unknown monster ID.";
	}
	close;

 

Edited by saovarott159
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

at conf/msg_conf/map_msg.conf

/̶/̶ ̶@̶m̶o̶b̶i̶n̶f̶o̶ ̶
1̶2̶3̶9̶:̶ ̶P̶l̶e̶a̶s̶e̶ ̶e̶n̶t̶e̶r̶ ̶a̶ ̶m̶o̶n̶s̶t̶e̶r̶ ̶n̶a̶m̶e̶/̶I̶D̶ ̶(̶u̶s̶a̶g̶e̶:̶ ̶@̶m̶o̶b̶i̶n̶f̶o̶ ̶<̶m̶o̶n̶s̶t̶e̶r̶_̶n̶a̶m̶e̶_̶o̶r̶_̶m̶o̶n̶s̶t̶e̶r̶_̶I̶D̶>̶)̶.̶
1̶2̶4̶0̶:̶ ̶M̶V̶P̶ ̶M̶o̶n̶s̶t̶e̶r̶:̶ ̶'̶%̶s̶'̶/̶'̶%̶s̶'̶/̶'̶%̶s̶'̶ ̶(̶%̶d̶)̶
1̶2̶4̶1̶:̶ ̶M̶o̶n̶s̶t̶e̶r̶:̶ ̶'̶%̶s̶'̶/̶'̶%̶s̶'̶/̶'̶%̶s̶'̶ ̶(̶%̶d̶)̶
1̶2̶4̶2̶:̶ ̶ ̶L̶v̶:̶%̶d̶ ̶ ̶H̶P̶:̶%̶d̶ ̶ ̶B̶a̶s̶e̶ ̶E̶X̶P̶:̶%̶u̶ ̶ ̶J̶o̶b̶ ̶E̶X̶P̶:̶%̶u̶ ̶ ̶H̶I̶T̶:̶%̶d̶ ̶ ̶F̶L̶E̶E̶:̶%̶d̶ ̶
1̶2̶4̶3̶:̶ ̶ ̶D̶E̶F̶:̶%̶d̶ ̶ ̶M̶D̶E̶F̶:̶%̶d̶ ̶ ̶S̶T̶R̶:̶%̶d̶ ̶ ̶A̶G̶I̶:̶%̶d̶ ̶ ̶V̶I̶T̶:̶%̶d̶ ̶ ̶I̶N̶T̶:̶%̶d̶ ̶ ̶D̶E̶X̶:̶%̶d̶ ̶ ̶L̶U̶K̶:̶%̶d̶ ̶
1̶2̶4̶4̶:̶ ̶ ̶A̶T̶K̶:̶%̶d̶~̶%̶d̶ ̶ ̶R̶a̶n̶g̶e̶:̶%̶d̶~̶%̶d̶~̶%̶d̶ ̶ ̶S̶i̶z̶e̶:̶%̶s̶ ̶ ̶R̶a̶c̶e̶:̶ ̶%̶s̶ ̶ ̶E̶l̶e̶m̶e̶n̶t̶:̶ ̶%̶s̶ ̶(̶L̶v̶:̶%̶d̶)̶ ̶
1̶2̶4̶5̶:̶ ̶ ̶D̶r̶o̶p̶s̶:̶ ̶1̶2̶4̶6̶:̶ ̶T̶h̶i̶s̶ ̶m̶o̶n̶s̶t̶e̶r̶ ̶h̶a̶s̶ ̶n̶o̶ ̶d̶r̶o̶p̶s̶.̶ ̶
1̶2̶4̶7̶:̶ ̶ ̶M̶V̶P̶ ̶B̶o̶n̶u̶s̶ ̶E̶X̶P̶:̶%̶u̶
1̶2̶4̶8̶:̶ ̶ ̶M̶V̶P̶ ̶I̶t̶e̶m̶s̶:̶
1̶2̶4̶9̶:̶ ̶T̶h̶i̶s̶ ̶m̶o̶n̶s̶t̶e̶r̶ ̶h̶a̶s̶ ̶n̶o̶ ̶M̶V̶P̶ ̶p̶r̶i̶z̶e̶s̶.̶

 

EDIT:

Sorry I didn't read the topic carefully. /sry

 

Edited by Technoken
Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.04
  • Content Count:  744
  • Reputation:   47
  • Joined:  03/12/14
  • Last Seen:  

9 hours ago, saovarott159 said:

// get a Mob ID from the user
	input .@mob_id;
	
	if (getmobdrops(.@mob_id)) {	// 'getmobdrops' returns 1 on success
		.@count = $@MobDrop_count;
		copyarray .@item[0],$@MobDrop_item[0],.@count;
		copyarray .@rate[0],$@MobDrop_rate[0],.@count;
		
		mes getmonsterinfo(.@mob_id,MOB_NAME) + " - " + .@count + " drops found:";
		for( .@i = 0; .@i < .@count; .@i++ ) {
			mes .@item[.@i] + " (" + getitemname(.@item[.@i]) + ") " + .@rate[.@i]/200 + ((.@rate[.@i]%100 < 10) ? ".0":".") + .@rate[.@i]%100 + "%";
		}
	} else {
		mes "Unknown monster ID.";
	}
	close;

 

is this the full script?

Link to comment
Share on other sites

  • -1

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

 

/help

Edited by saovarott159
  • Upvote 1
Link to comment
Share on other sites

  • -2

  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  53
  • Reputation:   1
  • Joined:  10/06/16
  • Last Seen:  

@Bringer  

/hmm

 

 

Edited by saovarott159
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...