| Mirage Source http://miragesource.net/forums/ |
|
| Tutorials please http://miragesource.net/forums/viewtopic.php?f=210&t=432 |
Page 1 of 1 |
| Author: | Shadow Dragon [ Fri Aug 25, 2006 8:57 pm ] |
| Post subject: | Tutorials please |
Hey guys I was wondering if anyone had a tutorial for black smithing, fishing; cooking and the other things along that line. |
|
| Author: | Matt [ Fri Aug 25, 2006 9:03 pm ] |
| Post subject: | |
Not that I know of. Those things are not hard to do though. There was a somewhat fishing tut, on the old forums. |
|
| Author: | funkynut [ Fri Aug 25, 2006 9:05 pm ] |
| Post subject: | |
Not that hard, I'm sure we at least used to have a tut like that but nevermind Have you started coding it? I'm sure we can help if you give us an example of what you've done so far |
|
| Author: | Shadow Dragon [ Sat Aug 26, 2006 1:05 am ] |
| Post subject: | |
I don't have much... Code: Public Const TILE_TYPE_FISH = 9 If .Type = TILE_TYPE_FISH Then Call DrawText(TexthDC, x * PIC_X + 8, y * PIC_Y + 8, "F", QBColor(Green)) optFish - value=false, caption Fishing Code: If frmMirage.optFish.Value = True Then And I'm not sure on how to do the rest of it, but is that correct so far?
.Type = TILE_TYPE_FISH .Data1 = 0 .Data2 = 0 .Data3 = 0 End If |
|
| Author: | funkynut [ Sun Aug 27, 2006 5:22 pm ] |
| Post subject: | |
erg, forgot to reply to this, nevermind thats a start i Guess, but all that'll do is show the tile attrib when your in map editor, your quite far off maknig it actually do anything lol |
|
| Author: | Shadow Dragon [ Mon Aug 28, 2006 12:48 am ] |
| Post subject: | |
Ok I have improved my code a little, This seems to be going correctly SERVER SIDE::::::::::::::::::::::::::::::: Code: Public Const TILE_TYPE_FISH = 9
Public Const MAX_FISH = 255 Sub SaveFish(ByVal FishNum As Long) Dim FileName As String Dim i As Long FileName = App.Path & "\data\fishies.ini" Call PutVar(FileName, "FISH" & FishNum, "Name", Trim(Fish(FishNum).Name)) Call PutVar(FileName, "FISH" & FishNum, "ClassReq", Trim(Fish(FishNum).ClassReq)) Call PutVar(FileName, "FISH" & FishNum, "LevelReq", Trim(Fish(FishNum).LevelReq)) Call PutVar(FileName, "FISH" & FishNum, "MaxLevel", Trim(Fish(FishNum).MaxLevel)) Call PutVar(FileName, "FISH" & FishNum, "Item", Trim(Fish(FishNum).Item)) End Sub Sub SaveFishies() Dim i As Long For i = 1 To MAX_Fishies Call SaveFish(i) Next i End Sub Sub LoadFishies() Dim FileName As String Dim i As Long Call CheckFishies FileName = App.Path & "\data\Fishies.ini" For i = 1 To MAX_FISHIES Fish(i).Name = GetVar(FileName, "FISH" & i, "Name") Fish(i).ClassReq = Val(GetVar(FileName, "FISH" & i, "ClassReq")) Fish(i).LevelReq = Val(GetVar(FileName, "FISH" & i, "LevelReq")) Fish(i).MaxLevel = Val(GetVar(FileName, "FISH" & i, "MaxLevel")) Fish(i).Item = Val(GetVar(FileName, "Fish" & i, "Item")) DoEvents Next i End Sub Sub CheckFishies() If Not FileExist("data\fishies.ini") Then Call SaveFishies End If End Sub Sub ClearFishies(ByVal Index As Long) Fish(Index).Name = "" Fish(Index).ClassReq = 0 Fish(Index).LevelReq = 0 Fish(Index).MaxLevel = 0 Fish(Index).Item = 0 End Sub Sub CleaFishies() Dim i As Long For i = 1 To MAX_FISHIES Call ClearFish(i) Next i End Sub Sub CanPlayerFish(ByVal Index As Long, ByVal FishNum As Long) Dim c As Integer If Fish(FishNum).ClassReq = 0 Then If GetPlayerLevel(Index) <= Fish(FishNum).MaxLevel Then c = Int((Rnd * Fish(FishNum).MaxLevel) + 1) - GetPlayerLevel(Index) If c <= Fish(FishNum).LevelReq Then Call GiveItem(Index, Val(Fish(FishNum).Item), 1) Call PlayerMsg(Index, "You found some " & Trim(Fish(FishNum).Name) & "!", BrightBlue) Else Call PlayerMsg(Index, "You found nothing!", BrightRed) End If Else Call PlayerMsg(Index, "You are not skilled enough to fish " & Trim(Fish(FishNum).Name) & "!", Red) End If Else If GetPlayerClass(Index) <> Fish(FishNum).ClassReq Then If GetPlayerLevel(Index) <= Fish(FishNum).MaxLevel Then c = Int((Rnd * Fish(FishNum).MaxLevel) + 1) - GetPlayerLevel(Index) If c <= Fish(FishNum).LevelReq Then Call GiveItem(Index, Val(Fish(FishNum).Item), 1) Call PlayerMsg(Index, "You found some " & Trim(Fish(FishNum).Name) & "!", BrightBlue) Else Call PlayerMsg(Index, "You found nothing!", BrightRed) End If Else Call PlayerMsg(Index, "You are not skilled enough to fish " & Trim(Fish(FishNum).Name) & "!", Red) End If Else Call PlayerMsg(Index, "You cannot fish here because you are not the required class!", Red) End If End If End Sub Although I'm now trying to make it so there's no class restrictions, you can be anything(it's just another one of your side skills.) And I have been doing other things over the weekend so thats as much of it as I have worked out, is any of that right |
|
| Author: | Matt [ Mon Aug 28, 2006 12:55 am ] |
| Post subject: | |
I didn't look over it really. But if you try it, and it works, then apparently, it works. ^^ |
|
| Page 1 of 1 | All times are UTC |
| Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |
|