Maybe post some code
|
I'm looking for a bait and feather fix as it won't delete them when a fish is caught? Anyone that can help?
Yeah...there are oodles of tutorials out there for this
to delete an item you do something like this
Code:c.deleteItem(xxx, c.getItemSlot(xxx), 1);
i'll show you what i have...
Code:if (c.fishing && c.fishtimer <= 0 && c.getItems().freeSlots() > 0) { if (c.getItems().playerHasItem(c.fishitem)) { if (c.playerLevel[10] >= c.fishreqt) { if(c.fishitem == 335|| c.fishitem == 339|| c.fishitem == 327|| c.fishitem == 345){ if(c.getItems().playerHasItem(313, 1)){ c.getItems().deleteItem(313, 1); }else{ c.sendMessage("You need bait to catch this fish."); } } else if (c.fishitem == 309 && !c.getItems().playerHasItem(314)) { c.sendMessage("You need feathers to fish here!"); c.fishing = false; } else {
this is the part of the code that does what you are looking for I assume, I don't see any issue with it from a quick glance
Have you tested your deleteItem and playerHasItem methods with other codes to confirm they are working as they should? (such as other object interactions that require the same functionality)Code:if(c.fishitem == 335|| c.fishitem == 339|| c.fishitem == 327|| c.fishitem == 345){ if(c.getItems().playerHasItem(313, 1)){ c.getItems().deleteItem(313, 1);
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |