Jump to content
  • 0
kizz

[718 Matrix] Cannot get RockCrabs to walk and they cannot be attacked

Question

Greetings gentlemen and gentleladies,

I have become extremely frustrated with matrix at this point. A few hours of searching have pretty well resulted in the same issue over and over.


First I simply added the spawns in packedspawns.txt, deleted the .p and restarted. All dandy, they spawned. They didn't move however, and I wasn't able to attack them.

Then I began to tweak the combat definitions, still with no luck. Moved onto the NPC.java to enable walking.

Added:

[code]if(id == 1265)
setRandomWalk(false); //also tried true
if(id == 1267)
setRandomWalk(false); //also tried true
[/code]
Above:
[code]if (isForceWalking()) {[/code]

Still won't move. Tried various other solutions. Then I tried this tutorial: [url]https://www.moparscape.org/smf/index.php?topic=553733.0[/url]

Still nothing.

Am I missing something, as that tutorial added the spawns via an old method, why am I unable to make them move?

Is there some method somewhere stopping their movement that I need to override?

I also tried adding a case here in NPC.java:

[code]private static boolean forceRandomWalk(int npcId) {
switch (npcId) {
case 11226:
return true;
case 3341:
case 3342:
case 3343:
case 1267:
case 1265:
return true;
default:
return false;
/*
* default: return NPCDefinitions.getNPCDefinitions(npcId).name
* .equals("Icy Bones");
*/
}
}[/code]

Again no luck for movement.

Thanks for the help fellas!

[s]EDIT: NPC 1267 is attackable, but not 1265.[/s] Nevermind, only attackable when spawned by command.


[B][U]SOLVED![/U][/B]

To fix this issue, go into your unpackedspawns.txt, and remove any inline comments from your spawns:

From:
[code]
580 - 2588 3088 0 //MAGE TRADER 2 BANK
[/code]

To:
[code]
//MAGE TRADER 2 BANK
580 - 2588 3088 0
[/code] Edited by kizz

Share this post


Link to post
Share on other sites

25 answers to this question

Recommended Posts

  • 0
[quote name='kizz']Greetings gentlemen and gentleladies,

I have become extremely frustrated with matrix at this point. A few hours of searching have pretty well resulted in the same issue over and over.


First I simply added the spawns in packedspawns.txt, deleted the .p and restarted. All dandy, they spawned. They didn't move however, and I wasn't able to attack them.

Then I began to tweak the combat definitions, still with no luck. Moved onto the NPC.java to enable walking.

Added:

[code]if(id == 1265)
setRandomWalk(false); //also tried true
if(id == 1267)
setRandomWalk(false); //also tried true
[/code]
Above:
[code]if (isForceWalking()) {[/code]

Still won't move. Tried various other solutions. Then I tried this tutorial: [url]https://www.moparscape.org/smf/index.php?topic=553733.0[/url]

Still nothing.

Am I missing something, as that tutorial added the spawns via an old method, why am I unable to make them move?

Is there some method somewhere stopping their movement that I need to override?

I also tried adding a case here in NPC.java:

[code]private static boolean forceRandomWalk(int npcId) {
switch (npcId) {
case 11226:
return true;
case 3341:
case 3342:
case 3343:
case 1267:
case 1265:
return true;
default:
return false;
/*
* default: return NPCDefinitions.getNPCDefinitions(npcId).name
* .equals("Icy Bones");
*/
}
}[/code]

Again no luck for movement.

Thanks for the help fellas!

[s]EDIT: NPC 1267 is attackable, but not 1265.[/s] Nevermind, only attackable when spawned by command.[/QUOTE]

im not entirely sure, but when I added rock crabs to a 718, I had the same problem. Turns out there was two npcs, one for when it was just a rock thing and one for when it could be attacked. Not sure if you have the same problem though

Share this post


Link to post
Share on other sites
  • 0
[quote name='kizz']Greetings gentlemen and gentleladies,

I have become extremely frustrated with matrix at this point. A few hours of searching have pretty well resulted in the same issue over and over.


First I simply added the spawns in packedspawns.txt, deleted the .p and restarted. All dandy, they spawned. They didn't move however, and I wasn't able to attack them.

Then I began to tweak the combat definitions, still with no luck. Moved onto the NPC.java to enable walking.

Added:

[code]if(id == 1265)
setRandomWalk(false); //also tried true
if(id == 1267)
setRandomWalk(false); //also tried true
[/code]
Above:
[code]if (isForceWalking()) {[/code]

Still won't move. Tried various other solutions. Then I tried this tutorial: [url]https://www.moparscape.org/smf/index.php?topic=553733.0[/url]

Still nothing.

Am I missing something, as that tutorial added the spawns via an old method, why am I unable to make them move?

Is there some method somewhere stopping their movement that I need to override?

I also tried adding a case here in NPC.java:

[code]private static boolean forceRandomWalk(int npcId) {
switch (npcId) {
case 11226:
return true;
case 3341:
case 3342:
case 3343:
case 1267:
case 1265:
return true;
default:
return false;
/*
* default: return NPCDefinitions.getNPCDefinitions(npcId).name
* .equals("Icy Bones");
*/
}
}[/code]

Again no luck for movement.

Thanks for the help fellas!

[s]EDIT: NPC 1267 is attackable, but not 1265.[/s] Nevermind, only attackable when spawned by command.[/QUOTE]

Rock Crabs are already set to auto walk via cache. I suggest you remove all rock crab IDs from NPC.java and wherever else you can find them and redo it. Btw what server was it?

Share this post


Link to post
Share on other sites
  • 0
[quote name='Chronicscape']Rock Crabs are already set to auto walk via cache. I suggest you remove all rock crab IDs from NPC.java and wherever else you can find them and redo it. Btw what server was it?[/QUOTE]

Will give this a shot. Thanks! Also the server is a 718 Matrix base.

I doubt re-doing it will help. Removing all references of rock crabs and relying only on unpakedspawns doesn't seem to help, as it was what I originally tried.

As I said, spawning them in via command makes them work perfect. I just don't get why they have two different methods for spawning in this base -.- Edited by kizz
Failed :(

Share this post


Link to post
Share on other sites
  • 0
[quote name='kizz']Will give this a shot. Thanks! Also the server is a 718 Matrix base.

I doubt re-doing it will help. Removing all references of rock crabs and relying only on unpakedspawns doesn't seem to help, as it was what I originally tried.

As I said, spawning them in via command makes them work perfect. I just don't get why they have two different methods for spawning in this base -.-[/QUOTE]

Add my skype if you still would like some help. I believe I know what the issue is and you are gonna wanna RQ because of how simple the fix is lol.

Share this post


Link to post
Share on other sites
  • 0
Can do once I am home from work.

Share this post


Link to post
Share on other sites
  • 0
[quote name='kizz']Can do once I am home from work.[/QUOTE]

Alright just let me know

Share this post


Link to post
Share on other sites
  • 0
Still no luck here. Haven't been able to get on skype for the time being.

Is there any way you could point me to the correct class/method that I need to be messing with to get these crabs attackable and killable?

Share this post


Link to post
Share on other sites
  • 0
Perhaps it's something simple; have you checked their ID via examining them?

Share this post


Link to post
Share on other sites
  • 0
[quote name='Game Master']Perhaps it's something simple; have you checked their ID via examining them?[/QUOTE]

Yes. Their ID is correct: 1265 and 1267

Their static rocks are 1266 and 1268.

They do spawn, and do seem to have an animation playing where they just bounce up and down as they normally do when not walking. However, they will not walk and cannot be attacked.

Again, I can use the 'npc' command to spawn them, they will walk and can be attacked. But when spawned with the unpackedspawns, they don't move and are not attackable. Edited by kizz

Share this post


Link to post
Share on other sites
  • 0
[quote name='kizz']Yes. Their ID is correct: 1265 and 1267

Their static rocks are 1266 and 1268.

They do spawn, and do seem to have an animation playing where they just bounce up and down as they normally do when not walking. However, they will not walk and cannot be attacked.

Again, I can use the 'npc' command to spawn them, they will walk and can be attacked. But when spawned with the unpackedspawns, they don't move and are not attackable.[/QUOTE]

Since you want to do this the hard way... List all files that contain the ID 1265 and I will tell you what to change. I assume you may have them in NPCHandler.java if so you need to remove them from that.

Share this post


Link to post
Share on other sites

×