forked from 2009Scape/Server
commit
13ebe6819a
11 changed files with 950 additions and 832 deletions
|
|
@ -41,7 +41,6 @@ wef6qwe4r561:3:0:0:0:0:0:0:0:0:0:0:0:0:
|
|||
Sister 13:3:12600:9793:0:20590:6186:24325:0:13288:0:0:23285:0:
|
||||
IsidraJr:58:0:0:0:0:0:0:0:0:0:0:0:0:
|
||||
BeDeMaSa0891:3:0:0:0:0:0:0:0:0:0:0:0:0:
|
||||
Jazzy Otto:101:22689:0:22692:1419:22695:0:0:22698:0:0:22701:0:
|
||||
JustSkillezZ:50:1017:0:0:1387:426:0:0:428:0:0:0:0:
|
||||
Elcangri11:39:1017:1007:1727:1381:1035:1199:0:1033:0:1059:1061:0:
|
||||
haroldas 99r:13:1017:1019:1731:843:0:0:0:1015:0:1059:1061:0:
|
||||
|
|
@ -58,7 +57,6 @@ laitukas29:3:0:0:0:0:0:0:0:0:0:0:0:0:
|
|||
AFRODITA-23:38:0:0:0:0:0:0:0:0:0:0:0:0:
|
||||
Monrojas:50:0:1029:1725:1381:0:0:0:1099:0:1065:1061:0:
|
||||
stejler:114:21266:6570:19553:4151:21301:12954:0:21304:0:7462:11840:0:
|
||||
r0cK4eV3r:103:11850:11852:0:0:11854:0:0:11856:0:11858:11860:0:
|
||||
Loamjytuner:3:0:0:0:0:0:0:0:0:0:0:0:0:
|
||||
u smoke mid:92:12293:10499:10364:1387:1121:1197:0:1071:0:1065:11840:0:
|
||||
MIMIYEEET:64:0:10499:0:861:0:0:0:0:0:0:0:0:
|
||||
|
|
|
|||
|
|
@ -1 +1,11 @@
|
|||
sicriona:103:1163:1023:1725:1333:1127:1201:0:1079:0:2922:1061:0:
|
||||
#Format:
|
||||
#name:cblevel:helmet:cape:neck:weapon:chest:shield:unknown:legs:unknown:gloves:boots:
|
||||
sicriona:103:1163:1023:1725:1333:1127:1201:0:1079:0:2922:1061:0:
|
||||
czar:110:1149:6568:1704:4587:10564:6524:0:4585:0:1059:1061:
|
||||
loving puppy:95:11665:6568:1704:4587:8839:14767:0:8840:0:8842:1061:
|
||||
rattle63:83:14096:10499:1704:4151:14094:14767:0:14095:0:8842:1061:
|
||||
baluga:110:10828:6568:10354:4151:3140:6524:0:4087:0:8842:11732:
|
||||
crabcake:115:10828:10446:10354:4151:10564:6524:0:4087:0:8842:11732:
|
||||
Red:94:1163:6568:10354:7158:10564:0:0:4087:0:1059:11732:
|
||||
puglet:120:10828:6568:6585:11696:4757:0:0:8840:0:1059:3105:
|
||||
linux:10000:10828:10069:1725:4151:3140:14767:0:4087:0:1059:3105:
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because it is too large
Load diff
|
|
@ -184,12 +184,11 @@ public class AIPlayer extends Player {
|
|||
++n;
|
||||
String line = sc.nextLine();
|
||||
if (rand.nextInt(n) == 0) { //Chance of overwriting line is lower and lower
|
||||
OSRScopyLine = line;
|
||||
if (line.length() < 3) //probably an empty line
|
||||
if (line.length() < 3 || line.startsWith("#")) //probably an empty line
|
||||
{
|
||||
System.out.println("Something went wrong reading line [" + line + "] from /data/botdata/" + fileName);
|
||||
updateRandomOSRScopyLine(fileName);
|
||||
continue;
|
||||
}
|
||||
OSRScopyLine = line;
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException e) {
|
||||
|
|
@ -199,7 +198,9 @@ public class AIPlayer extends Player {
|
|||
}
|
||||
|
||||
private static String retrieveRandomName(String fileName) {
|
||||
updateRandomOSRScopyLine(fileName);
|
||||
do {
|
||||
updateRandomOSRScopyLine(fileName);
|
||||
} while (OSRScopyLine.startsWith("#")); //Comment
|
||||
return OSRScopyLine.split(":")[0];
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -66,10 +66,12 @@ public class CombatState {
|
|||
bot.tick--;
|
||||
|
||||
bot.eat(379);
|
||||
bot.getSkills().setLevel(Skills.PRAYER, 99);
|
||||
bot.getSkills().setStaticLevel(Skills.PRAYER, 99);
|
||||
if (!(bot.getPrayer().getActive().contains(PrayerType.PROTECT_FROM_MELEE)))
|
||||
bot.getPrayer().toggle(PrayerType.PROTECT_FROM_MELEE);
|
||||
if (bot.randomType < 30) {
|
||||
bot.getSkills().setLevel(Skills.PRAYER, 99);
|
||||
bot.getSkills().setStaticLevel(Skills.PRAYER, 99);
|
||||
if (!(bot.getPrayer().getActive().contains(PrayerType.PROTECT_FROM_MELEE)))
|
||||
bot.getPrayer().toggle(PrayerType.PROTECT_FROM_MELEE);
|
||||
}
|
||||
|
||||
if (!bot.inCombat())
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@ package org.crandor.game.node.entity.player.ai.minigamebots.pestcontrol;
|
|||
import org.crandor.game.node.Node;
|
||||
import org.crandor.game.node.entity.Entity;
|
||||
import org.crandor.game.node.entity.player.ai.pvmbots.PvMBots;
|
||||
import org.crandor.game.node.entity.player.link.prayer.PrayerType;
|
||||
import org.crandor.game.world.map.Location;
|
||||
import org.crandor.net.packet.in.InteractionPacket;
|
||||
import org.crandor.tools.RandomFunction;
|
||||
|
|
@ -88,6 +89,7 @@ public class PestControlTestBot extends PvMBots {
|
|||
}
|
||||
|
||||
private void attackNPCs() {
|
||||
this.getWalkingQueue().setRunning(true);
|
||||
List<Entity> creatures = FindTargets(this, 15);
|
||||
if (creatures == null || creatures.isEmpty())
|
||||
{
|
||||
|
|
@ -96,7 +98,11 @@ public class PestControlTestBot extends PvMBots {
|
|||
this.setCustomState("Going to portals");
|
||||
combathandler.goToPortals();
|
||||
} else {
|
||||
randomWalkAroundPoint(getMyPestControlSession(this).getSquire().getLocation(), 3);
|
||||
try {
|
||||
randomWalkAroundPoint(getMyPestControlSession(this).getSquire().getLocation(), 3);
|
||||
} catch (NullPointerException e) {
|
||||
//Do nothing, game just finished
|
||||
}
|
||||
movetimer = new Random().nextInt(15) + 6;
|
||||
}
|
||||
} else {
|
||||
|
|
@ -121,6 +127,10 @@ public class PestControlTestBot extends PvMBots {
|
|||
if (new Random().nextInt(insideBoatWalks) <= 1)
|
||||
{
|
||||
insideBoatWalks *= 1.5;
|
||||
if (new Random().nextInt(4) == 1)
|
||||
{
|
||||
this.getWalkingQueue().setRunning(!this.getWalkingQueue().isRunning());
|
||||
}
|
||||
if (new Random().nextInt(7) == 1)
|
||||
{
|
||||
this.walkToPosSmart(new Location(2660, 2638));
|
||||
|
|
@ -136,6 +146,10 @@ public class PestControlTestBot extends PvMBots {
|
|||
}
|
||||
|
||||
private void enterBoat() {
|
||||
if (getPrayer().getActive().contains(PrayerType.PROTECT_FROM_MELEE)) {
|
||||
getPrayer().toggle(PrayerType.PROTECT_FROM_MELEE);
|
||||
}
|
||||
|
||||
if (new Random().nextInt(3) <= 1) //Don't join instantly
|
||||
{
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import org.crandor.game.node.entity.player.ai.resource.task.ResourceTasks;
|
|||
import org.crandor.game.node.entity.player.ai.skillingbot.SkillingBotsBuilder;
|
||||
import org.crandor.game.system.task.Pulse;
|
||||
import org.crandor.game.world.GameWorld;
|
||||
import org.crandor.game.world.map.Location;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.Statement;
|
||||
|
|
@ -39,7 +40,6 @@ public class ResourceAIPManager {
|
|||
public void immerseWorld() { //There's probably a better place for this (it adds bot at bootup)
|
||||
PvMBotsBuilder.immersiveSpawns();
|
||||
LumbridgeBotHandler.immersiveLumbridge();
|
||||
//AIPBuilder.immersiveSpawns();
|
||||
//SkillingBotsBuilder.immersiveSpawnsSkillingBots();
|
||||
System.out.println("Loaded immerseWorld");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,8 +40,6 @@ public class SkillingBot extends AIPlayer {
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import org.crandor.game.content.activity.ActivityManager;
|
|||
import org.crandor.game.interaction.OptionHandler;
|
||||
import org.crandor.game.node.Node;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
import org.crandor.game.node.entity.player.ai.pvmbots.PvMBotsBuilder;
|
||||
import org.crandor.game.node.entity.player.info.Rights;
|
||||
import org.crandor.game.node.item.Item;
|
||||
import org.crandor.game.node.object.GameObject;
|
||||
|
|
@ -21,6 +22,8 @@ import org.crandor.plugin.Plugin;
|
|||
*/
|
||||
public final class PCObjectHandler extends OptionHandler {
|
||||
|
||||
public boolean pcbotsSpawned = false;
|
||||
|
||||
@Override
|
||||
public Plugin<Object> newInstance(Object arg) throws Throwable {
|
||||
// Barricades
|
||||
|
|
@ -91,6 +94,12 @@ public final class PCObjectHandler extends OptionHandler {
|
|||
}
|
||||
switch (object.getId()) {
|
||||
case 14315: // Novice
|
||||
if (!pcbotsSpawned) {
|
||||
pcbotsSpawned = true;
|
||||
for (int pestBotsAmount = 0; pestBotsAmount < 20; pestBotsAmount++) {
|
||||
PvMBotsBuilder.createPestControlTestBot(new Location(2657, 2640));
|
||||
}
|
||||
}
|
||||
startActivity(player, "pest control novice", Location.create(2661, 2639, 0));
|
||||
return true;
|
||||
case 25631: // Intermediate
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package plugin.command;
|
||||
|
||||
import org.crandor.game.container.Container;
|
||||
import org.crandor.game.container.impl.EquipmentContainer;
|
||||
import org.crandor.game.content.skill.Skills;
|
||||
import org.crandor.game.interaction.Interaction;
|
||||
import org.crandor.game.node.entity.player.Player;
|
||||
|
|
@ -145,7 +146,7 @@ public final class AIPCommandPlugin extends CommandPlugin {
|
|||
player.setAttribute("aip_legion", PVPAIPActions.pvp_players = new ArrayList<>());
|
||||
}
|
||||
for (int i = 0; i < size; i++) {
|
||||
final AIPlayer aip = AIPBuilder.create( generateLocation(player));
|
||||
final AIPlayer aip = AIPBuilder.create(generateLocation(player));
|
||||
aip.setControler(player);
|
||||
aip.getAppearance().setGender(RandomFunction.random(3) == 1 ? Gender.FEMALE : Gender.MALE);
|
||||
|
||||
|
|
@ -216,6 +217,25 @@ public final class AIPCommandPlugin extends CommandPlugin {
|
|||
case "immersiveworld":
|
||||
case "immersive":
|
||||
ResourceAIPManager.get().immerseWorld();
|
||||
player.sendMessage("Started immersive world, 2");
|
||||
return true;
|
||||
case "botdataform":
|
||||
//Dumps your current character info in the form used by data/botdata
|
||||
//name:cblevel:helmet:cape:neck:weapon:chest:shield:unknown:legs:unknown:gloves:boots:
|
||||
System.out.println(player.getUsername() + ":"
|
||||
+ player.getProperties().getCurrentCombatLevel() + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_HAT) + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_CAPE) + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_AMULET) + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_WEAPON) + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_CHEST) + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_SHIELD) + ":"
|
||||
+ "0" + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_LEGS) + ":"
|
||||
+ "0" + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_HANDS) + ":"
|
||||
+ player.getEquipment().getAsId(EquipmentContainer.SLOT_FEET) + ":"
|
||||
);
|
||||
return true;
|
||||
case "fishtest":
|
||||
SkillingBotsBuilder.spawnTroutLumbridge(new Location(3241, 3242));
|
||||
|
|
@ -254,7 +274,7 @@ public final class AIPCommandPlugin extends CommandPlugin {
|
|||
try {
|
||||
arg2 = Integer.parseInt(args[1]);
|
||||
} catch (Exception e) {
|
||||
arg2 = 123;
|
||||
arg2 = 20;
|
||||
}
|
||||
for (int pestBotsAmount = 0; pestBotsAmount < arg2; pestBotsAmount++) {
|
||||
PvMBotsBuilder.createPestControlTestBot(player.getLocation());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue