Page 1 of 1

MDelete

Posted: Sun May 04, 2014 10:39 pm
by Zaksmeer
Looking for anyone who may have the code to this. Used for deleting multiple items, like the copy command, but not deletemulti command.

thanks.

Re: MDelete

Posted: Mon May 05, 2014 12:45 am
by RusseL
Do you mean Nuke? Destroy all items in selected area
Or destroy all by type?
Explain

Re: MDelete

Posted: Mon May 05, 2014 9:21 am
by Zaksmeer
It works like the copy command but in reverse.
You can delete tile after tile, like a grass tile or a floor tile. Then delete multiple tiles by clicking on them one at a time.
Its similar to the mtele command.

Re: MDelete

Posted: Tue May 06, 2014 12:22 pm
by CWO
Something like...

.mdelete
target
destroyitem
target
destroyitem?

Code: Select all

use uo;
use os;

program mdelete(who)
     SendSysMessage(who, "What would you like to destroy?");
     var targ := Target(who, TGTOPT_NOCHECK_LOS);
     while (targ)
          DestroyItem(targ);
          targ := Target(who, TGTOPT_NOCHECK_LOS);
     endwhile
endprogram
I'm thinking this code should work but not sure. I just scripted this blindly just now and I haven't scripted or even done anything with POL in years.