Chazler Posted February 24, 2015 Share Posted February 24, 2015 (edited) EDIT: Looking back I see I posted this in the wrong section, if someone would be so kind to tell how to move/delete a post that would be wicked. So in my spare time I'm working on a cowkilling script. Now this works up to the part that it attacks a cow. After a kill or when the player is not currently under attack i'd like it to pick up cowhides. Now am I curious as to where my code falters and does not pick up the cowhides either not looted by others or gained from a kill. Cheers, Chazler Edited February 24, 2015 by Chazler Quote Link to comment Share on other sites More sharing options...
Botre Posted February 24, 2015 Share Posted February 24, 2015 (edited) In your getState(): If inventory is full -> BANK Else If not under attack and cowhide exists -> LOOT Else -> KILL Would fix it Edited February 24, 2015 by Botre 1 Quote Link to comment Share on other sites More sharing options...
Apaec Posted February 24, 2015 Share Posted February 24, 2015 (edited) Looks like in your getState, the code is never getting past going into the kill case (cause your inventory is rarely full), remember code is run in the order it appears so it cannot get past the kill case (the code you have for looting looks completely correct so just play with the case definitions a bit. Edited February 24, 2015 by Apaec 1 Quote Link to comment Share on other sites More sharing options...
Chazler Posted February 24, 2015 Author Share Posted February 24, 2015 Cheers lads Quote Link to comment Share on other sites More sharing options...