Jump to content
  • 0
Sign in to follow this  
utofaery

1. how to make it not list clone monster? or slaveclone?

Question

-    script    BmapMobList    -1,{
OnInit:
    bindatcmd "mapmoblist2", strnpcinfo(0)+"::Onaaa";
    end;
Onaaa:
    if ( .@atcmd_numparameters ) {
        if ( getmapusers(.@atcmd_parameters$) == -1 ) {
            dispbottom "Map not exist";
            end;
        }
        .@map$ = .@atcmd_parameters$;
    }
    else
        .@map$ = strcharinfo(3);
    .@size = getunits( BL_MOB, .@bl, false, .@map$ );
    freeloop true;
    for ( .@i = 0; .@i < .@size; ++.@i ) {
        .@string$ = rid2name(.@bl[.@i]);
        if ( !getd(".@"+ .@string$) ) {
            .@mobname$[.@c] = .@string$;
            getmapxy .@map$, .@x, .@y, UNITTYPE_MOB, .@bl[.@i];
            .@mobx[.@c] = .@x;
            .@moby[.@c] = .@y;
            .@mobhp[.@c] = getunitdata( .@bl[.@i], UDT_HP );
            .@mobmaxhp[.@c] = getunitdata( .@bl[.@i], UDT_MAXHP );
            ++.@c;
        }
        setd ".@"+ .@string$, getd(".@"+ .@string$) +1;
    }
    dispbottom " === These are monsters in "+ .@map$ +" ===";
    for ( .@i = 0; .@i < .@c; ++.@i )
        if ( getd(".@"+ .@mobname$[.@i]) )
            dispbottom ( ++.@j )+". "+ .@mobname$[.@i] +" : "+ getd(".@"+ .@mobname$[.@i])+"x";
    if ( getgmlevel() < 99 ) end; // Hercules doesn't catch dead monsters as being alive
    dispbottom " === Location of unique monsters === ";
    for ( .@i = 0; .@i < .@c; ++.@i )
        if ( getd(".@"+ .@mobname$[.@i]) == 1 )
            dispbottom .@mobname$[.@i] +" --> X = "+ .@mobx[.@i] +" Y = "+ .@moby[.@i] +" | Hp left = "+ .@mobhp[.@i] +"/"+ .@mobmaxhp[.@i];
    end;
}

As topic

 

as requested don't blame me multi topic spamming..

 

Share this post


Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0

change

if ( !getd(".@"+ .@string$) ) {

into

if ( !getd(".@"+ .@string$) || jobname(getunitdata( .@bl[.@i], UDT_CLASS )) != "Unknown Job" ) {

 

 

Note : 2 things

1st, UDT_CLASS is expected to change some time soon, a PR is already addressing this issue
https://github.com/HerculesWS/Hercules/pull/2382

2nd, we missing a script command to read a line from conf/message.conf

 

and yes, its better to open multiple topic ...

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0
15 hours ago, AnnieRuru said:

1st, UDT_CLASS is expected to change some time soon, a PR is already addressing this issue
https://github.com/HerculesWS/Hercules/pull/2382

2nd, we missing a script command to read a line from conf/message.conf

and yes, its better to open multiple topic ...

1.  What to change if this occur?

2.  can that be created??  somehow?

3.  On the pass some forum restrict people from flooding topic in forum...which is something I faced before so ... the reason I did mashup topic.

this forum encourage flooding then??

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, utofaery said:

1.  What to change if this occur?

2.  can that be created??  somehow?

wait until I do pull request, not all my modification can be accept by hercules staff members

 

4 hours ago, utofaery said:

3.  On the pass some forum restrict people from flooding topic in forum...which is something I faced before so ... the reason I did mashup topic.

this forum encourage flooding then??

all the questions you asked are totally valid
and yes I can answer every single one of them

Share this post


Link to post
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.   Restore formatting

  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.

Loading...
Sign in to follow this  

×
×
  • Create New...

Important Information

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