11-04-2009, 07:09 PM
Nean Wrote:Matt Wrote:Nean Wrote:So I would use a loop?
No, that's what this does:
Code:If GetPlayerInvItemNum(Index, GetPlayerEquipmentSlot(Index, Weapon)) = FishRod Then
Well that's all good and whatnot, however when I try to attack on a fish tile, without the fishing tool, it gives me a packet error (Packet Modification), and then it just says that I have lost my connection with MIrage Source. But when I just have it [code] If GetPlayerEquipMentSlot(index, Weapon) = FishRod Then [code], it works fine. Maybe there's something wrong with the GetPlayerInvItemNum function.
The problem is, when you equip the fishing rod, it fills the weapon's slot. So basically, you equip the rod as a weapon. Which is fine. Good idea, imo anyways. Now, when you use your check, you're just getting the slot in the inventory that your weapon is in.
So, if you have your fishing rod as item number 200 and you have it in your inventory as item number 2, it'll never work. It would need to be in inventory slot 200 to work. See what I mean? By changing it to what I posted, you're checking the actual weapon's item number against the rod's item number, not the inventory slot it's in.
Hopefully that explains it a bit better. Lol.