Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Zeno

Members
  • Posts

    289
  • Joined

  • Last visited

    Never

Everything posted by Zeno

  1. For anything in mod DirectDraw you'll need to find the similar subs in mod Graphics. The code in question here should be the same, only the name of the subs would be different. bltnpc -> DrawNPC bltPlayer -> DrawPlayer
  2. Zeno

    Player stats

    > Thanks > > So, if I use > > ``` > > Vital = Spell(spellnum).Vital + GetPlayerStat(index, Willpower) / 7 > > ``` > This would add 1 dmg per 7 will points? Yes, if replacing the similar line in Sub CastSpell. My bad, this has a minor flaw. IIRC, automatic type conversions round towards the nearest even number. You won't see your first bonus until 7 willpower, but then the second at 11, and the third at 21, fourth at 25, … A little wonky. You can use Int(GetPlayerStat(Index,Willpower)/7) to round down ( + 1 at 7, 14, 21, 28, ...), or Int((GetPlayerStat(Index,Willpower)/7)+.5) to round up (+1 at 4, 11, 18, 25, ...). > And if I use this in the End code > > ``` > > Case HP > > I = (GetPlayerStat(Index, Stats.Willpower) * 0.8) + 6 > > ``` > This would add HP regen? If you're talking about spells, this wouldn't add regen. To add hp regen in spells, you want vitals-over-time, (which is already built into EFF - the engine you're on yeah?) All this does is change the value of the variable I. How that variable is used still depends on the context.
  3. Yes and no. The code itself will work. Where to put the code will not work. For example, instead of sub bltPlayer (the dx7 sub), use sub DrawPlayer (the dx8 sub). Yes, DX8 or EO3.0 tutorials should work for EFF.
  4. > 8-Directional movement by no means relates to DX8 or DX7\. it only uses background logic which only moves the sprite lol. you can use it regardless That background logic is implemented in mod DirectDraw's subs (aka Direct7 graphics). You can't use it regardless - only if you change in which subs you put it, using draw instead of blt. Trivial, but also misleading to someone who's new to coding an engine. That is, you can use it to move your player. Completely ignoring how it will look because you haven't bothered to edit any graphics and your character will face either up or down when going diagonally, it'll work.
  5. Hi Vortigem, I ran into this exact problem. You need to add in EqOffsetY as a variable, and add it into the y calculation line. Here's what I used. ``` y = GUIWindow(GUI_CHARACTER).y + EqTop + EqOffsetY*Int((I-1)/EqColumn) ``` Since int always rounds down, this will place the first EqColumn number of items in the first row, then the next EqColumn number in the next row, and so on. Without the -1 you'd only get EqColumn-1 on the first row, since the last one wouldn't be inclusive (e.g. 1/2 would return 0, but 2/2 would return 1)
  6. Hi Hutter! You could use batch processes in [Adobe Photoshop](http://graphicssoft.about.com/od/digitalphotography/l/blps_batch.htm) or [Corel Paint Shop Pro](http://designertoday.com/tutorials/paint.shop.pro/1402/batch.process.images.with.a.script.corel.paint.shop.pro.tutorial.aspx) to do the whole thing in about 2 minutes. I've done it dozens of times to put 3x4 sprites into 4x4 and to add transparencies. Switching filetypes would be a joke! ![;)](http://www.touchofdeathforums.com/community/public/style_emoticons//wink.png) Those linked tutorials are for other batch processes, but you basically just hit record, do it for one, save the process, and then apply the process to all of your files. You can either overwrite the file, rename them, or create them in a new folder. I recommend a new folder, because mistakes happen. You can also use the free image editor GIMP if you [code a command line procedure](http://docs.gimp.org/en/plug-in-dbbrowser.html) starting with "-b" to do a batch process, but it doesn't compete with the convenience of recording a process in the programs above. If you don't have either Adobe or Corel, and aren't looking to code a procedure (I've never wanted to either), send me a link to your graphics and I can batch process them for you tomorrow evening.
  7. Zeno

    Player stats

    Again, it depends on your engine. Somewhere, server-side in modCombat, Sub Cast Spell, you should see a line like``` Vital = Spell(spellnum).Vital ``` This is the damage calculation. It's used for damaging spells as well as healing spells. If you'd like to change all spell damages, replace that with something like:``` Vital = Spell(spellnum).Vital * GetPlayerStat(Index,Willpower)/50 ``` This example would add 2% spell damage per willpower, rounded after the calculation. You'll have to fiddle with it to get something balanced. (IMO 2% per will is overpowered… maybe 1% from /100). You could also do something like:``` Vital = Spell(spellnum).Vital + GetPlayerStat(Index,Willpower)/4 ``` This would add 1 dmg per 4 points of willpower and is similar to the old formula from Mirage Source. If you'd like a different formula for each spell type, find that first vitals formula and stick something like this in right after it: ``` Select Case Spell(spellnum).Type Case SPELL_TYPE_HEALHP Vital = Vital * GetPlayerStat(Index, Willpower) / 30 Case SPELL_TYPE_HEALMP Vital = Vital * GetPlayerStat(Index, Willpower) / 20 Case SPELL_TYPE_DAMAGEHP Vital = Vital * GetPlayerStat(Index, Willpower) / 70 Case SPELL_TYPE_DAMAGEMP Vital = Vital * GetPlayerStat(Index, Willpower) / 40 End Select ``` You'll want to double-check that the type names are correct for your engine. I'm not sure, but I think they're the same across the board.
  8. Zeno

    Player stats

    Considering your mana problem, I'm guessing your Mage class isn't class #2 in your game. Easiest to just edit that part of the code accordingly. Those equations are all server-side, by the way, so no worries about players needing any updated clients! (Excuse the double-post. Post edits seem to ruin code nesting for me.)
  9. Zeno

    Player stats

    Depends on your engine. These are examples. By default, intelligence is used only for MP. For HP/MP: >! ``` >! Function GetPlayerMaxVital(ByVal Index As Long, ByVal Vital As Vitals) As Long >! If Index > MAX_PLAYERS Then Exit Function >! Select Case Vital >! Case HP >! Select Case GetPlayerClass(Index) >! Case 1 ' Warrior >! GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150 >! Case 2 ' Mage >! GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 5 + 65 >! Case Else ' Anything else - Warrior by default >! GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Endurance) / 2)) * 15 + 150 >! End Select >! Case MP >! Select Case GetPlayerClass(Index) >! Case 1 ' Warrior >! GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Intelligence) / 2)) * 5 + 25 >! Case 2 ' Mage >! GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Intelligence) / 2)) * 30 + 85 >! Case Else ' Anything else - Warrior by default >! GetPlayerMaxVital = ((GetPlayerLevel(Index) / 2) + (GetPlayerStat(Index, Intelligence) / 2)) * 5 + 25 >! End Select >! End Select >! End Function >! ``` Endurance increases hp (as in first spoiler) as well as block chance & defence: >! ``` Function CanPlayerBlockHit(ByVal Index As Long) As Boolean >! Dim I As Long >! Dim n As Long >! Dim ShieldSlot As Long >! ShieldSlot = GetPlayerEquipment(Index, Shield) >! If ShieldSlot > 0 Then >! n = Int(Rnd * 2) >! If n = 1 Then >! I = (GetPlayerStat(Index, Stats.Endurance) \ 2) + (GetPlayerLevel(Index) \ 2) >! n = Int(Rnd * 100) + 1 >! If n ! CanPlayerBlockHit = True >! End If >! End If >! End If >! End Function `````` Function GetPlayerProtection(ByVal Index As Long) As Long >! Dim Armor As Long >! Dim Helm As Long >! GetPlayerProtection = 0 >! ' Check for subscript out of range >! If isPlaying(Index) = False Or Index Player_HighIndex Then >! Exit Function >! End If >! Armor = GetPlayerEquipment(Index, Armor) >! Helm = GetPlayerEquipment(Index, Helmet) >! GetPlayerProtection = (GetPlayerStat(Index, Stats.Endurance) \ 5) >! If Armor > 0 Then >! GetPlayerProtection = GetPlayerProtection + Item(Armor).Data2 >! End If >! If Helm > 0 Then >! GetPlayerProtection = GetPlayerProtection + Item(Helm).Data2 >! End If >! End Function ``` Str works to increase dmg >! ``` >! Function GetPlayerDamage(ByVal Index As Long) As Long >! Dim weaponNum As Long >! >! GetPlayerDamage = 0 >! ' Check for subscript out of range >! If isPlaying(Index) = False Or Index MAX_PLAYERS Then >! Exit Function >! End If >! If GetPlayerEquipment(Index, weapon) > 0 Then >! weaponNum = GetPlayerEquipment(Index, weapon) >! GetPlayerDamage = 0.085 * 5 * GetPlayerStat(Index, Strength) * Item(weaponNum).Data2 + (GetPlayerLevel(Index) / 5) >! Else >! GetPlayerDamage = 0.085 * 5 * GetPlayerStat(Index, Strength) + (GetPlayerLevel(Index) / 5) >! End If >! >! For weaponNum = 1 To Equipment.Equipment_Count - 1 >! If Player(Index).Equipment(weaponNum) > 0 Then >! GetPlayerDamage = GetPlayerDamage * (1 + Item(Player(Index).Equipment(weaponNum)).DMGPercent) >! End If >! Next >! End Function >! ``` and ability to parry >! ``` >! Public Function CanPlayerParry(ByVal Index As Long) As Boolean >! Dim rate As Long >! Dim RndNum As Long >! CanPlayerParry = False >! rate = GetPlayerStat(Index, Strength) * 0.25 >! RndNum = rand(1, 100) >! If RndNum ! CanPlayerParry = True >! End If >! End Function >! ``` Agility is for dodge and critical rates: >! ``` Public Function CanPlayerCrit(ByVal Index As Long) As Boolean >! Dim rate As Long >! Dim RndNum As Long >! CanPlayerCrit = False >! rate = GetPlayerStat(Index, Agility) / 52.08 >! RndNum = rand(1, 100) >! If RndNum ! CanPlayerCrit = True >! End If >! End Function >! Public Function CanPlayerDodge(ByVal Index As Long) As Boolean >! Dim rate As Long >! Dim RndNum As Long >! CanPlayerDodge = False >! rate = GetPlayerStat(Index, Agility) / 83.3 >! RndNum = rand(1, 100) >! If RndNum ! CanPlayerDodge = True >! End If >! End Function ``` Willpower only increases regeneration rate: >! ``` Function GetPlayerVitalRegen(ByVal Index As Long, ByVal Vital As Vitals) As Long >! Dim I As Long >! ' Prevent subscript out of range >! If isPlaying(Index) = False Or Index MAX_PLAYERS Then >! GetPlayerVitalRegen = 0 >! Exit Function >! End If >! Select Case Vital >! Case HP >! I = (GetPlayerStat(Index, Stats.Willpower) * 0.8) + 6 >! Case MP >! I = (GetPlayerStat(Index, Stats.Willpower) / 4) + 12.5 >! End Select >! If I < 2 Then I = 2 >! GetPlayerVitalRegen = I >! End Function ```
  10. … ![:mellow:](http://www.touchofdeathforums.com/community/public/style_emoticons//mellow.png) Try looking for where your server saves and loads accounts. VB6 has an excellent search function.
  11. "This is easy." mppidt oj tjiu pe pu eftv fX. Hint: Up and around.
  12. Viper explained it very well… The 0-thinking version: Add "Character Slot" between "Player Name" and "Password" under save. The save list must be identical to the load list.
  13. Hi escfoe2\. Came across something while adding randomized equipment stat modifiers. I'm using an older version, so you might have fixed these by now. In TryPlayerAttackPlayer, Damage = Damage + DMG_Dark is used for the neutral damage calculation instead of DMG_Neut. In TryPlayerAttackNpc, a counterproductive Damage=Damage + tempDMG negates the last applied NPC resistance (calculated by damage = damage - tempDMG). Seems like a leftover line from resistances pooled in tempdmg (great call on changing that). Edit: also, in TryNPCAttackPlayer, the if-check for using resistances uses player's elemental dmg>0 rather than res>0
  14. Yes and no. Most of the code is compatible, but some parts (such as the DX7 graphics) are not. I wouldn't recommend using this tutorial in EFF.
  15. Zeno

    Block Player

    Get familiar with the events system. From modPlayer Sub PlayerMove, Select Case dir, Case dir_up: ``` ' Check to see if the tile is a event and if it is check if its opened If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Type TILE_TYPE_EVENT Then Call SetPlayerY(index, GetPlayerY(index) - 1) SendPlayerMove index, movement, sendToSelf Moved = YES Else If Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1 > 0 Then If Events(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1).WalkThrought = YES Or (Player(index).EventOpen(Map(GetPlayerMap(index)).Tile(GetPlayerX(index), GetPlayerY(index) - 1).Data1) = YES) Then Call SetPlayerY(index, GetPlayerY(index) - 1) SendPlayerMove index, movement, sendToSelf Moved = YES End If End If End If ``` IIRC, you can do a level-based trigger to make the tile not-walkable. If I'm wrong, then you can always mimic this code to make a custom scripted tile, though you'll need one script per direction.
  16. NPC names and the chat box use separate fonts. Can you show an item description, as you mentioned above? Item descriptions use the same font as the chat box. The font files for the chat box by default are texdefault.png and texdefault.dat.
  17. The vitals probably update correctly - it's the stats that don't (str, agi, etc.). There is in fact something missing from the code. In your Case SPELL_TYPE_BUFFs, add Call SendPlayerData(index) or Call SendPlayerData(Target), depending on the context. This will send the player's updated stats, which happen in the updated Sub GetPlayerStats.
  18. Zeno

    My new Artwork !

    Shows definite promise. That person has several light sources. If it helps, draw a little lightbulb or sun to help you get the direction of the shadows down. For example, the head seems lit from above-center, while the arms are lit from below, and the sword from the top left.
  19. The reason playerwarp won't work is because of this near the top of Sub PlayerWarp: ``` If isPlaying(index) = False Or mapnum MAX_MAPS Then Exit Sub End If ``` That's okay though. PlayerWarp is a really simple sub - it just meshes three commands into one with some error checks. Instead of using CallPlayerWarp(Index, 4, 2, 8), use this: ``` Call SetPlayerMap(Index, 4) Call SetPlayerX(Index, 2) Call SetPlayerY(Index, 8) ```
  20. The "full code" would involve anything and everything to do with frmMain.Socket. Anyway, doesn't really matter. Think about this: you haven't touched that bit of code and it's been working for hundreds, if not thousands, of other people. So, no, it's not something in there. It's your inadequate VB6 IDE. It won't even load? Get a proper version.
  21. Although you got them after following the tutorial, your errors aren't really relevant to the tutorial. I know this because they involve things which the tutorial doesn't even touch. You should post them here. > now i get this > > ``` > > ' connect > > frmMain.Socket.RemoteHost = Options.IP > > frmMain.Socket.RemotePort = Options.Port > > ``` > > were it says socket.remotehost is were i cet the complie error it says method or data member not found why is it because of the vb6 im using When you go to type frmMain.Socket.Remote into the IDE, does anything pop up? ![](http://freemmorpgmaker.com/uploadfiles/a01a02129fc239dc23571f1330fdd526.jpg) If nothing pops up, you are missing a winsock named Socket in frmMain. If you see something like above, there is no error in your code or forms. Rather, you are using an improper version of the VB6.0 IDE and will have to download either the enterprise or professional version. Do not get the trial, free, or portable versions. Go for Visual Studio 6.0, Visual Basic 6.0 Enterprise, or Visual Basic 6.0 Professional.
  22. Do not post the same question in multiple threads. You probably have two subs named DrawHair.
  23. > i get this error ambiguous name detected: draw hair You most likely have two subs named Sub DrawHair. **am·big·u·ous** * (of language) Open to more than one interpretation; having a double meaning. * **Unclear or inexact because a choice between alternatives has not been made.**
  24. Look at what the loader says when you first run VB6\. There should be a white box with some text. If you're still at a loss, look under help-> about and read after VBA:
×
×
  • Create New...