Jump to content
  • 0
Sign in to follow this  
utofaery

Specific Monster count on a map ( not mobcount command)

Question

Spoiler

-    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.

 

Edited by AnnieRuru
just edit the post so its easier to read, you can remove this msg any time

Share this post


Link to post
Share on other sites

5 answers to this question

Recommended Posts

  • 0
-	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;
}

 

On 2/8/2019 at 6:01 PM, utofaery said:

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.

 

12 hours ago, utofaery said:

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

Edited by AnnieRuru

Share this post


Link to post
Share on other sites
  • 0
41 minutes ago, AnnieRuru said:

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.

Edited by utofaery

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

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

Edited by SuyinVC

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.