import com.speljohan.rsbot.script.Random; import com.speljohan.rsbot.script.wrappers.RSNPC; /** * Created by IntelliJ IDEA. * User: had07josjolj * Date: 2008-feb-04 * Time: 08:50:35 * To change this template use File | Settings | File Templates. */ public class Talker extends Random { private RSNPC talker; private static final String[] randomNames = { "Mysterious Old Man", "Drunken Dwarf", "Genie", "Security Guard", "Rick Turpentine", "Dr Jekyll", "Cap'n Hand" }; public int getVersion() { return 1; } public String getAuthor() { return "Speljohan"; } public String getName() { return "Talker"; } public boolean activateCondition() { if(!isLoggedIn()) { return false; } talker = getNearestNPCByName(randomNames); if(talker != null && talker.getMessage().contains(getMyPlayer().getName())) { return true; } return false; } public int loop() { if(talker != null) { if(atNPC(talker, "Talk")) { wait(random(500, 1000)); while(canContinue()) { clickContinue(); } return -1; } } return -1; } }