Specific Monster count on a map ( not mobcount command)

utofaery

New member
Messages
101
Points
0
Code:
-    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;
}
I found this script 

1. I hope to know how do I make a script to check for only a specific monster count from script without use bindatcmd?
like directly check for specific monster count in a map but not other monster on the same map.

 
Last edited by a moderator:
- script dsfsfsasda FAKE_NPC,{
OnInit:
bindatcmd "mobcount", strnpcinfo(NPC_NAME)+"::Onaaa";
end;
Onaaa:
if ( !.@atcmd_numparameters ) {
dispbottom "input a mob ID";
end;
}
.@mobid = atoi( .@atcmd_parameters$ );
if ( getmonsterinfo( .@mobid, MOB_LV ) == -1 ) {
dispbottom "invalid monster ID";
end;
}
.@size = getunits( BL_MOB, .@bl, false, strcharinfo(PC_MAP) );
for ( .@i = 0; .@i < .@size; ++.@i )
if ( getunitdata( .@bl[.@i], UDT_CLASS ) == .@mobid )
++.@c;
dispbottom sprintf(_("There are %1$dx %2$s in %3$s."), .@c, getmonsterinfo( .@mobid, MOB_NAME ), strcharinfo(PC_MAP) );
end;
}



I found this script 

1. I hope to know how do I make a script to check for only a specific monster count from script without use bindatcmd?
like directly check for specific monster count in a map but not other monster on the same map.


Is there script way ?? apart from @mobsearch?
why you start your topic by saying NOT using bindatcmd, but then 2nd post says want to use bindatcmd ?
if using script way WITHOUT using bindatcmd, then its impossible

 
Last edited by a moderator:
why you start your topic by saying NOT using bindatcmd, but then 2nd post says want to use bindatcmd ?
if using script way WITHOUT using bindatcmd, then its impossible
May be high on coffee or something lol

any way thanks for that script haven't test it yet.

 
Last edited by a moderator:
Is there a way I can run the command in PRONTERA to find out if a specific mob exists on a specific map?

 
Last edited by a moderator:
Back
Top