Jump to content
  • 0

R> bindatcmd


Question

4 answers to this question

Recommended Posts

  • 1
Posted

what what what .... OMFG forgotten about *getmobdrops

rep up

and move back to script request ( shame on myself ... )

-    script    test123    -1,{
OnInit:
   bindatcmd "alootnoitem", strnpcinfo(0)+"::OnAtcommand";
   end;
OnAtcommand:
   .@nodropitemid = atoi( .@atcmd_parameters$[0] );
   .@mob_id = atoi( .@atcmd_parameters$[1] );
   if ( !.@nodropitemid || !.@mob_id ) {
       message strcharinfo(0), "@alootnoitem <Item ID> <Mob ID>";
       end;
   }
   if ( getitemname( .@nodropitemid ) == "null" ) {
       message strcharinfo(0), "@alootnoitem -> Invalid Item ID";
       end;
   }
   if ( !strmobinfo( 3, .@mob_id ) ) {
       message strcharinfo(0), "@alootnoitem -> Invalid Mob ID";
       end;
   }
   atcommand "@alootid reset"; // reset
   getmobdrops .@mob_id;
   for ( .@i = 0; .@i < $@mobdrop_count; .@i++ )
       if ( .@nodropitemid != $@mobdrop_item[.@i] )
           atcommand "@alootid +"+ $@mobdrop_item[.@i];
//    atcommand "@alootid"; //show list <-- its already display in the list
   end;
}

  • Upvote 1
Posted
-    script    test123    -1,{

OnInit:
   bindatcmd "alootnoitem",strnpcinfo(3)+"::OnAtcommand";
   end;
OnAtcommand:
   set .@mobid,atoi(.@atcmd_parameters$[1]);
   set .@nodropitemid,atoi(.@atcmd_parameters$[0]);
   if(.@mobid <=0 || .@nodropitemid <=0)end;
   atcommand "@alootid reset";
   set $@MobDrop_item,0;
   getmobdrops(.@mobid);
   set .@size,getarraysize($@MobDrop_item);
   copyarray .@MDIA[0],$@MobDrop_item[0],.@size;
   for(;.@i<.@size;.@i++){
        if(.@nodropitemid != .@MDIA[.@i])       
           atcommand "@alootid +"+.@MDIA[.@i];
   }
   atcommand "@alootid"; //show list

end;

}

  • Upvote 1

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.   Paste as plain text instead

  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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...