![]() |
Fishing - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Source Code Development (https://mirage-engine.uk/forums/forumdisplay.php?fid=51) +----- Forum: Mirage Source 4 (Visual Basic 6) (https://mirage-engine.uk/forums/forumdisplay.php?fid=44) +------ Forum: Tutorials (https://mirage-engine.uk/forums/forumdisplay.php?fid=13) +------ Thread: Fishing (/showthread.php?tid=2522) |
Fishing - Nean - 25-01-2009 This is a simple fishing system. Read the code, and find out what it does. xD, It's heavily commented, so it shouldn't be too hard. Download this and add it to your clients source: http://www.mediafire.com/file/mwnjonyzzqt/frmFish.frm Server Side [spoiler]Under: Code: Sub HandleQuit Add: Code: Sub HandleGoFishing(ByVal Index As Long) Under Code: Sub HandleAttack(ByVal Index As Long) Add: Code: If Map(GetPlayerMap(Index)).Tile(GetPlayerX(Index), GetPlayerY(Index)).Type = TILE_TYPE_FISHING Then Find: Code: Public Const TILE_TYPE_KEYOPEN As Byte = 6 Under it add: Code: Public Const TILE_TYPE_FISHING As Byte = 7 Find: Code: Function isNameLegal(ByVal sInput As Integer) As Boolean Under it add: Code: Function Rand(ByVal High As Long, ByVal Low As Long) Client Side [spoiler]Go into your map editor, right click the frame that has Fringe, Ground, Etc, etc. Click Send to back. Now you should see options like: Item, Blocked, ETc, etc. Add an option there and name it OptFishing. Double click it and add: Code: Private Sub OptFishing_Click() Find: Code: Public Const TILE_TYPE_KEYOPEN As Byte = 6 Under it add: Code: Public Const TILE_TYPE_FISHING As Byte = 7 Then find: Code: ' Used for map key open editor Under it add: Code: 'Used for the fish editor Then find: Code: If frmMirage.optKeyOpen.Value Then Under it add: Code: If frmMirage.OptFishing.Value Then Then find: Code: Case TILE_TYPE_KEYOPEN Under it add: Code: Case TILE_TYPE_FISHING Voila, it's done. Re: Fishing - Proxy - 25-01-2009 This is a great tutorial. Everything works 100%. Thanks Nean ![]() Re: Fishing - Nean - 25-01-2009 I edited Sub GoFishing to make bait optional, I also uploaded a new form, so go ahead and download it. This one seems to work a bit better. Re: Fishing - Sylint19 - 31-01-2009 Where the hell is Sub HandleQuit i search for it and it tells me its not there Re: Fishing - Matt - 31-01-2009 Searching the entire project? Re: Fishing - genusis - 01-02-2009 everything worked 100% for me as well Rian could you please move this to working tuts thank you. Re: Fishing - Matt - 01-02-2009 Quit assuming you're the lead on the project. It's still DFA's project, he's lead, he'll say when a tut should be moved. -_- God you annoy me. Re: Fishing - Sylint19 - 01-02-2009 Matt Wrote:Searching the entire project? Yep :O What version of Mirage is this for? Just a question..or...maybe its just me..... Re: Fishing - Nean - 01-02-2009 Well... It is in the MS4 tutorials board.... Re: Fishing - genusis - 02-02-2009 who said anything about me wanting to be lead =P. i just want to make sure the good tutorials are separated form the not working ones. Re: Fishing - Robin - 02-02-2009 Nean, learn when to use commas. Quote:Your attempt at catching a fish, has failed Wrong. Re: Fishing - Matt - 02-02-2009 Shouldn't be any commas unless what's BETWEEN the commas can be removed from the sentence and the sentence STILL makes sense. Of if you're using something with the word and and have more than 2 things involved. Robin and Nean. Robin, Matt and Nean. See? Re: Fishing - Nean - 02-02-2009 I lol'd really hard. I will take this page to heart... When I'm not baked. Re: Fishing - james1992_2006 - 03-02-2009 thanks, added this to 3.0.3 only had to change like 2 lines of coding (Y) Re: Fishing - Nean - 03-02-2009 So while we're still on topic, was there anything that was done badly? Unoptomized? Re: Fishing - Robin - 03-02-2009 Lea Wrote:http://grammar.ccc.commnet.edu/grammar/commas.htm Never trust an American website with teaching you English. Re: Fishing - Matt - 03-02-2009 Fuck English. I prefer to speak American. ![]() Re: Fishing - Robin - 03-02-2009 Matt Wrote:Fuck English. I prefer to speak Gangsta. Re: Fishing - Matt - 03-02-2009 If you heard me speak in real life, I do speak more gangsta than anything, sadly. However, that doesn't make me black. You're gonna make me hook up my damn webcam and prove I'm white. Lol. Re: Fishing - Matt - 03-02-2009 Lea Wrote:color filters to wonderful things matt, you can't lie to us we know the truth! I feel bad for you when we finally meet in person, Lea. You're gonna have to wear sunglasses the entire time just so you don't lose your mind. Lol. Re: Fishing - Acruno - 18-02-2009 How would I be able to add a time constraint so people don't spam fish. I.e. you can only fish once every 10 seconds. Would I use a timer? Re: Fishing - Robin - 18-02-2009 Acruno Wrote:How would I be able to add a time constraint so people don't spam fish. I.e. you can only fish once every 10 seconds. Sure, if you're using Elysium. Re: Fishing - Acruno - 18-02-2009 Heh, thought someone would say that. Then how? Re: Fishing - Robin - 18-02-2009 Use a tickcount check. Re: Fishing - Matt - 24-02-2009 Bug, seems small, but it's a big thing with this system. Find: Code: If GetPlayerEquipmentSlot(Index, Weapon) = FishRod Then Replace with: Code: If GetPlayerInvItemNum(Index, GetPlayerEquipmentSlot(Index, Weapon)) = FishRod Then |