• 0
Sign in to follow this  
Followers 0
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 ( [email protected]_numparameters ) {
        if ( getmapusers([email protected]_parameters$) == -1 ) {
            dispbottom "Map not exist";
            end;
        }
        [email protected]$ = [email protected]_parameters$;
    }
    else
        [email protected]$ = strcharinfo(3);
    [email protected] = getunits( BL_MOB, [email protected], false, [email protected]$ );
    freeloop true;
    for ( [email protected] = 0; [email protected] < [email protected]; [email protected] ) {
        [email protected]$ = rid2name([email protected][[email protected]]);
        if ( !getd("[email protected]"+ [email protected]$) ) {
            [email protected]$[[email protected]] = [email protected]$;
            getmapxy [email protected]$, [email protected], [email protected], UNITTYPE_MOB, [email protected][[email protected]];
            [email protected][[email protected]] = [email protected];
            [email protected][[email protected]] = [email protected];
            [email protected][[email protected]] = getunitdata( [email protected][[email protected]], UDT_HP );
            [email protected][[email protected]] = getunitdata( [email protected][[email protected]], UDT_MAXHP );
            [email protected];
        }
        setd "[email protected]"+ [email protected]$, getd("[email protected]"+ [email protected]$) +1;
    }
    dispbottom " === These are monsters in "+ [email protected]$ +" ===";
    for ( [email protected] = 0; [email protected] < [email protected]; [email protected] )
        if ( getd("[email protected]"+ [email protected]$[[email protected]]) )
            dispbottom ( [email protected] )+". "+ [email protected]$[[email protected]] +" : "+ getd("[email protected]"+ [email protected]$[[email protected]])+"x";
    if ( getgmlevel() < 99 ) end; // Hercules doesn't catch dead monsters as being alive
    dispbottom " === Location of unique monsters === ";
    for ( [email protected] = 0; [email protected] < [email protected]; [email protected] )
        if ( getd("[email protected]"+ [email protected]$[[email protected]]) == 1 )
            dispbottom [email protected]$[[email protected]] +" --> X = "+ [email protected][[email protected]] +" Y = "+ [email protected][[email protected]] +" | Hp left = "+ [email protected][[email protected]] +"/"+ [email protected][[email protected]];
    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

  • 0

change

if ( !getd("[email protected]"+ .@string$) ) {

into

if ( !getd("[email protected]"+ .@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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0