Mirage Source
http://miragesource.net/forums/

Fishing
http://miragesource.net/forums/viewtopic.php?f=183&t=5050
Page 4 of 51

Author:  Nean [ Sat Apr 11, 2009 4:22 pm ]
Post subject:  Re: Fishing

So I would use a loop?

Author:  Matt [ Sat Apr 11, 2009 5:38 pm ]
Post subject:  Re: Fishing

Nean wrote:
So I would use a loop?


No, that's what this does:

Code:
If GetPlayerInvItemNum(Index, GetPlayerEquipmentSlot(Index, Weapon)) = FishRod Then

Author:  Nean [ Sat Apr 11, 2009 5:43 pm ]
Post subject:  Re: Fishing

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.

Author:  Matt [ Sat Apr 11, 2009 7:09 pm ]
Post subject:  Re: Fishing

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.

Author:  Nean [ Sat Apr 11, 2009 10:11 pm ]
Post subject:  Re: Fishing

Matt wrote:
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.


Oh, okay I get it. Thanks for the explanation. Any ideas on how to fix this then? I'm pretty clueless ,I don't see why it's causing packet errors.

Author:  Labmonkey [ Sat Apr 11, 2009 10:22 pm ]
Post subject:  Re: Fishing

I assume you are getting "hacking attempt, packet modification" errors. (I am too lazy to look at the other page). I was getting those too recently. It is caused when there is an error in the game from something run from inside the handledata sub (and all subs it calls, and all subs they call, etc). Turn off the error checking and you should see your error.

Author:  Jared [ Mon Apr 13, 2009 3:20 am ]
Post subject:  Re: Fishing

Entire project search cannot find

Code:
' Used for map key open editor
Public KeyOpenEditorX As Long

Public KeyOpenEditorY As Long




using labmonkeys Latest MS4 version.

:ps: everything else was found. except that.

Author:  Nean [ Mon Apr 13, 2009 4:17 am ]
Post subject:  Re: Fishing

Don't mind that, it was taken out. just throw the code up at the top of ModGameEditors, I think it is.

Author:  Tony [ Mon Apr 13, 2009 4:25 am ]
Post subject:  Re: Fishing

Nean wrote:
Matt wrote:
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.


Oh, okay I get it. Thanks for the explanation. Any ideas on how to fix this then? I'm pretty clueless ,I don't see why it's causing packet errors.

Author:  Hyperion [ Fri Jun 19, 2009 7:21 pm ]
Post subject:  Re: Fishing

Well Helloooo There :P

Okay Quick Problem I've run into...
I've put everything in, but now when I click on the opt in the mapeditor and I go to place it it gives me

I've finished the tutorial now.. And I place the fishing attribute down on the map (Is it not supposed to show up like a block ... Eg: Block as a B. Does Fishing have an F?)
Anyways It just gave my Server a Runtime Error 9 when I hit ctrl on the spot

It Specifically highlights this
Code:
Public Function GetPlayerInvItemNum(ByVal Index As Long, ByVal InvSlot As Long) As Long
    GetPlayerInvItemNum = Player(Index).Char(TempPlayer(Index).CharNum).Inv(InvSlot).Num
End Function

Author:  deathknight [ Sat Jun 20, 2009 2:15 am ]
Post subject:  Re: Fishing

First, check your version of MS. This may not work with a different version if they've changes a few things.

Second, are you sure you are copying it correctly? This bit of code Client Side makes it show up on the map as a blue F.

Code:
                       Case TILE_TYPE_FISHING
                            DrawText TexthDC, ((X * PIC_X) - 4) + (PIC_X * 0.5), ((Y * PIC_Y) - 7) + (PIC_Y * 0.5), "F", QBColor(Blue)

Author:  Matt [ Sat Jun 20, 2009 12:51 pm ]
Post subject:  Re: Fishing

InvSlot prolly equals 0.

Author:  Hyperion [ Sat Jun 20, 2009 6:56 pm ]
Post subject:  Re: Fishing

deathknight wrote:
First, check your version of MS. This may not work with a different version if they've changes a few things.

Second, are you sure you are copying it correctly? This bit of code Client Side makes it show up on the map as a blue F.

Code:
                       Case TILE_TYPE_FISHING
                            DrawText TexthDC, ((X * PIC_X) - 4) + (PIC_X * 0.5), ((Y * PIC_Y) - 7) + (PIC_Y * 0.5), "F", QBColor(Blue)


Yeah I fixed that part already and it started showing up and

Matt wrote:
InvSlot prolly equals 0.


What do you suggest I do to fix this?

I feel bad for asking so many questions >.< :P

Author:  Matt [ Sat Jun 20, 2009 8:53 pm ]
Post subject:  Re: Fishing

Hyperion wrote:
deathknight wrote:
First, check your version of MS. This may not work with a different version if they've changes a few things.

Second, are you sure you are copying it correctly? This bit of code Client Side makes it show up on the map as a blue F.

Code:
                       Case TILE_TYPE_FISHING
                            DrawText TexthDC, ((X * PIC_X) - 4) + (PIC_X * 0.5), ((Y * PIC_Y) - 7) + (PIC_Y * 0.5), "F", QBColor(Blue)


Yeah I fixed that part already and it started showing up and

Matt wrote:
InvSlot prolly equals 0.


What do you suggest I do to fix this?

I feel bad for asking so many questions >.< :P


Don't feel bad. First thing, you have to find the line that is passing the wrong number. Then you have to look at the code that gets you the inv slot. Something with it needs tweaked.

Author:  Hyperion [ Sun Jun 21, 2009 2:55 am ]
Post subject:  Re: Fishing

I've searched through some of the code and from what I can tell and what you've told me is that its getting bugged because the Invslot is equalling Zero when its looking for a number? Specifically the number of the fishing rod? If so the only line that would have to do with info about the fishing rod would be

Code:
 'Make sure they have the fishing rod.
    If GetPlayerInvItemNum(Index, GetPlayerEquipmentSlot(Index, Weapon)) = FishRod Then


Am I on the right track here or pulling nothing from no where :P

Author:  Solodev [ Fri Aug 14, 2009 1:02 am ]
Post subject:  Re: Fishing

the form download form the first post is not available any more. can any one else host it?

Author:  wanai [ Wed Dec 01, 2021 8:34 am ]
Post subject:  Re: Fishing

сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайт
сайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтсайтsemiasphalticfluxсайтсайтсайт
сайтсайтсайтсайтсайтсайтhttp://taskreasoning.ruсайтсайтсайтинфосайтсайтtuchkasсайтсайт

Author:  wanai [ Sun Jan 02, 2022 5:16 am ]
Post subject:  Re: Fishing

Econ

Author:  wanai [ Sun Jan 02, 2022 5:17 am ]
Post subject:  Re: Fishing

77.8

Author:  wanai [ Sun Jan 02, 2022 5:19 am ]
Post subject:  Re: Fishing

Bett

Author:  wanai [ Sun Jan 02, 2022 5:20 am ]
Post subject:  Re: Fishing

Bett

Author:  wanai [ Sun Jan 02, 2022 5:21 am ]
Post subject:  Re: Fishing

Anne

Author:  wanai [ Sun Jan 02, 2022 5:22 am ]
Post subject:  Re: Fishing

Bimd

Author:  wanai [ Sun Jan 02, 2022 5:23 am ]
Post subject:  Re: Fishing

Imti

Author:  wanai [ Sun Jan 02, 2022 5:24 am ]
Post subject:  Re: Fishing

Defo

Page 4 of 51 All times are UTC
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/