Mirage Source http://www.miragesource.net/forums/ |
|
Fishing... http://www.miragesource.net/forums/viewtopic.php?f=201&t=5006 |
Page 1 of 1 |
Author: | Nean [ Sun Jan 25, 2009 12:08 am ] |
Post subject: | Fishing... |
I've been working on fishing, and I have run into a snag. Code: Sub HandleGoFishing(ByVal Index As Long) Dim Chance As Long Dim FishRod As Long FishRod = Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Data2 Chance = Rand(100, GetPlayerLevel(Index)) If GetPlayerEquipmentSlot(Index, Weapon) = FishRod Then 'Randomize based on players level. If chance = player level, you caught a fish! If Chance = 100 Then Call PlayerMsg(Index, "THIS IS A TEST", Blue) Else Call PlayerMsg(Index, "NOOO", Red) End If Else Call PlayerMsg(Index, "doing it wrong", BrightRed) End If End Sub Code: If frmMirage.OptFishing.Value Then .Type = TILE_TYPE_FISHING .Data1 = frmFish.scrlFishNo .Data2 = frmFish.scrlToolNo .Data3 = 0 End If Even though< i have the right tool equipped, it still prints "Doing it wrong" Obviously I am doing something wrong, can anyone help me out? |
Author: | Tony [ Sun Jan 25, 2009 12:32 am ] |
Post subject: | Re: Fishing... |
Test something out like.. in the PlayerMsg add in like FishRod and see what that equals? Call PlayerMsg(Index, "doing it wrong BECAUSE FishRod = " & FishRod & " and Tool = " & GetPlayerEquipmentSlot(Index, Weapon, BrightRed) |
Author: | Nean [ Sun Jan 25, 2009 12:34 am ] |
Post subject: | Re: Fishing... |
It returns 0... Must not be saving correctly? Code: FishName = Item(scrlFishNo.Value).Name ToolName = Item(scrlToolNo.Value).Name FishNumber = frmFish.scrlFishNo.Value ToolNumber = frmFish.scrlToolNo.Value Unload Me That's what's in the "Ok" button... |
Author: | Tony [ Sun Jan 25, 2009 12:35 am ] |
Post subject: | Re: Fishing... |
Nean wrote: It returns 0... Must not be saving correctly? Yeah, most likely. |
Author: | Nean [ Sun Jan 25, 2009 12:37 am ] |
Post subject: | Re: Fishing... |
Edited above post. Any ideas? I don't think I'm sending the data to and from the server right. |
Author: | Tony [ Sun Jan 25, 2009 12:40 am ] |
Post subject: | Re: Fishing... |
Your Unloading.. yet you haven't saved it yet. For ex; Cootch = frmStink SendSaveFishyCootch Unload |
Author: | Nean [ Sun Jan 25, 2009 12:42 am ] |
Post subject: | Re: Fishing... |
Tony wrote: Your Unloading.. yet you haven't saved it yet. For ex; Cootch = frmStink SendSaveFishyCootch Unload Great analogy. Thanks, I'll try it out. |
Author: | Nean [ Sun Jan 25, 2009 12:53 am ] |
Post subject: | Re: Fishing... |
Yeah it worked out, thanks a lot tony, I appreciate it. |
Author: | Tony [ Sun Jan 25, 2009 12:55 am ] |
Post subject: | Re: Fishing... |
Nean wrote: Yeah it worked out, thanks a lot tony, I appreciate it. A person's trash is another person's treasure so, a person's pain is another person's pleasure! |
Page 1 of 1 | All times are UTC |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |