saovarott159 Posted February 6, 2017 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 53 Reputation: 1 Joined: 10/06/16 Last Seen: April 17, 2017 Share Posted February 6, 2017 Hello guys. How to change style detail on atcommand @mi to Thank you Quote Link to comment Share on other sites More sharing options...
-1 Technoken Posted February 6, 2017 Group: Members Topic Count: 27 Topics Per Day: 0.01 Content Count: 505 Reputation: 127 Joined: 04/04/16 Last Seen: Friday at 01:56 PM Share Posted February 6, 2017 (edited) 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. Edited February 6, 2017 by Technoken Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted February 6, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Yesterday at 06:27 PM Share Posted February 6, 2017 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'. Quote Link to comment Share on other sites More sharing options...
0 saovarott159 Posted February 7, 2017 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 53 Reputation: 1 Joined: 10/06/16 Last Seen: April 17, 2017 Author Share Posted February 7, 2017 (edited) - 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... Edited February 7, 2017 by saovarott159 Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted February 7, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Yesterday at 06:27 PM Share Posted February 7, 2017 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; } 1 Quote Link to comment Share on other sites More sharing options...
0 saovarott159 Posted February 7, 2017 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 53 Reputation: 1 Joined: 10/06/16 Last Seen: April 17, 2017 Author Share Posted February 7, 2017 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.. If i want show detail item drop and %drop .. mes "Job EXP:" + getmonsterinfo(.@id,MOB_?????); Quote Link to comment Share on other sites More sharing options...
0 Akkarin Posted February 7, 2017 Group: Forum Manager Topic Count: 282 Topics Per Day: 0.06 Content Count: 3144 Reputation: 1630 Joined: 03/26/12 Last Seen: Yesterday at 06:27 PM Share Posted February 7, 2017 For drops data you can use "getmobdrops". You can find an example in https://raw.githubusercontent.com/rathena/rathena/master/doc/script_commands.txt 1 Quote Link to comment Share on other sites More sharing options...
0 saovarott159 Posted February 7, 2017 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 53 Reputation: 1 Joined: 10/06/16 Last Seen: April 17, 2017 Author Share Posted February 7, 2017 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"; Quote Link to comment Share on other sites More sharing options...
0 Bringer Posted February 7, 2017 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: 24 minutes ago Share Posted February 7, 2017 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"; do you mind share the complete script Sir Thanks Quote Link to comment Share on other sites More sharing options...
0 saovarott159 Posted February 8, 2017 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 53 Reputation: 1 Joined: 10/06/16 Last Seen: April 17, 2017 Author Share Posted February 8, 2017 (edited) // 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 February 8, 2017 by saovarott159 Quote Link to comment Share on other sites More sharing options...
-1 Bringer Posted February 8, 2017 Group: Members Topic Count: 162 Topics Per Day: 0.04 Content Count: 748 Reputation: 47 Joined: 03/12/14 Last Seen: 24 minutes ago Share Posted February 8, 2017 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? Quote Link to comment Share on other sites More sharing options...
-1 saovarott159 Posted February 9, 2017 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 53 Reputation: 1 Joined: 10/06/16 Last Seen: April 17, 2017 Author Share Posted February 9, 2017 (edited) Edited February 11, 2017 by saovarott159 1 Quote Link to comment Share on other sites More sharing options...
-2 saovarott159 Posted February 10, 2017 Group: Members Topic Count: 23 Topics Per Day: 0.01 Content Count: 53 Reputation: 1 Joined: 10/06/16 Last Seen: April 17, 2017 Author Share Posted February 10, 2017 (edited) @Bringer Edited February 11, 2017 by saovarott159 Quote Link to comment Share on other sites More sharing options...
Question
saovarott159
Hello guys.
How to change style detail on atcommand @mi
to
Thank you
Link to comment
Share on other sites
12 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.