Page 1 of 1

Delete Ground Items from telnet [Edited please look]

Posted: Thu Oct 29, 2009 4:26 pm
by iamcypher
L2J Revision 6762:
L2JDP Revision 3668:

Hi mates,
I`m working on a custom command for Game Server`s telnet but i`m a bit lost and i seek some pointers to put me back on the good road. So i need to be able to run ItemsAutoDestroy class from GameStatusThread class. I added

Code: Select all

import net.sf.l2j.gameserver.ItemsAutoDestroy;
in the import list and i changed the access modifier of CheckItemsForDestroy method from protected to public to be able to access it.

Code: Select all

public class CheckItemsForDestroy extends Thread
And here is my Status command i added but it doesn`t work:

Code: Select all

else if (_usrCommand.startsWith("clearitems")) {ItemsAutoDestroy.CheckItemsForDestroy();}
The error that the compiler is giving is:

Code: Select all

cannot find symbol: method CheckItemsForDestroy()location: class net.sf.l2j.status.GameStatusThreadCheckItemsForDestroy();
Please help :( ,
iamcypher

Re: Delete Ground Items from telnet

Posted: Thu Oct 29, 2009 4:31 pm
by janiii
all you need is to import ItemsAutoDestroy

Code: Select all

import net.sf.l2j.gameserver.ItemsAutoDestroy;
and then use this line of code:

Code: Select all

ItemsAutoDestroy.getInstance().removeItems();

Re: Delete Ground Items from telnet

Posted: Thu Oct 29, 2009 4:33 pm
by iamcypher
Thank you so much for you answer. You guys are the best!

EDIT: Command doesn`t work. It doesn`t delete the items!