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

Slasheree

Members
  • Posts

    588
  • Joined

  • Last visited

    Never

Posts posted by Slasheree

  1. taken from wikipedia

    > In mathematics and computer science, an algorithm is a self-contained step-by-step set of operations to be performed. Algorithms exist that perform calculation, data processing, and automated reasoning.

    in this case

    > calculate which parts of your upside-down sprite touch the water tile

    answering your question "Would you really need an algorithm for this?" yes xP
  2. > Under
    >
    > ```
    >
    > ' render the actual sprite
    > Call BltSprite(Sprite, x, y, recSprite)
    >
    > ```
    > Add
    >
    > ```
    >
    > Call BltHair(Hair, x, y, recHair)
    > ```

    you sure you put this below the BltSprite ? :

    ```

    Call BltHair(Hair, x, y, recHair)

    ```
  3. This program was made by request of Sherwin ;)

    Basically this program will help you create your own font image (not the .png though) and that weird font.dat (that no one else understands)

    Features:

    - Lists all fonts available in your system, if you select one that doesn't work it will beep (because of some settings)

    - Allows you to change the font size, some fonts are too small other too big, so you can adjust that

    - Shows the base image to create the font.png (learn to use image editing tools :P *cough* Paint.NET *cough*)

    - Allows to edit the character's width so everything looks nice (basically all the info in the font.dat)

    Download Link: [https://mega.co.nz/#!mVI1nDyY!_DZtjaizx9zhQEqKpH3Htp1bhhT3m23bK9L0y9R8Q_Y](https://mega.co.nz/#!mVI1nDyY!_DZtjaizx9zhQEqKpH3Htp1bhhT3m23bK9L0y9R8Q_Y)

    Screenshot:

    >! ![](http://s1.postimg.org/qyezc5mnj/fontcreatorscreenie.png)
  4. just wrote this from the top of my head, backup your project and try this:

    All client-side

    > Go to config.ini and add IP2=[2nd IP here]
    >
    > Add 'IP2 As String' to the bottom of OptionsRec in modTypes
    >
    > Add Options.IP2 = GetVar(filename, "Options", "IP2") to the bottom of Sub LoadOptions()
    >
    > Add Call PutVar(filename, "Options", "IP2", Options.IP2) to the bottom of Sub SaveOptions()
    >
    > change your ConnectToServer with this one:
    >
    > ```
    >
    > Public Function ConnectToServer(Optional i As Long) As Boolean
    > Dim Wait As Long
    >
    >     ' If debug mode, handle error then exit out
    >     If Options.Debug = 1 Then On Error GoTo errorhandler
    >     
    >     ' Check to see if we are already connected, if so just exit
    >     If IsConnected Then
    >         ConnectToServer = True
    >         Exit Function
    >     End If
    >     
    >     Wait = GetTickCount
    >     frmMain.Socket.Close
    >     frmMain.Socket.Connect
    >     
    >     SetStatus "Connecting to server 1…"
    >     
    >     ' Wait until connected or 3 seconds have passed and report the server being down
    >     Do While (Not IsConnected) And (GetTickCount <= Wait + 3000)
    >         DoEvents
    >     Loop
    >     
    >     ConnectToServer = IsConnected
    >     
    >     If Not IsConnected then 'try second ip
    >         Wait = GetTickCount        
    >         frmMain.Socket.Close
    >         frmMain.Socket.IP = Options.IP2
    >         frmMain.Socket.Connect
    >         
    >         SetStatus "Connecting to server 2..."
    >         
    >         ' Wait until connected or 3 seconds have passed and report the server being down
    >         Do While (Not IsConnected) And (GetTickCount <= Wait + 3000)
    >             DoEvents
    >         Loop
    >         
    >         ConnectToServer = IsConnected
    >     End If
    >
    >     ' Error handler
    >     Exit Function
    > errorhandler:
    >     HandleError "ConnectToServer", "modClientTCP", err.number, err.Description, err.Source, err.HelpContext
    >     err.Clear
    >     Exit Function
    > End Function
    > ```
  5. as Sherwin said:

    > replace "Colour" to "Color"

    in

    > 'Evilbunnie's DrawChat system
    > Public Sub ReOrderChat(ByVal nText As String, nColor As Long)
    > Dim i As Integer
    >
    >     For i = 19 To 1 Step -1
    >         Chat(i + 1).text = Chat(i).text
    >         Chat(i + 1).Color = Chat(i).Color
    >     Next
    >
    >     Chat(1).text = nText
    >     Chat(1).colour
    > = nColor
    > End Sub

    I'm only guessing this could be your error
  6. for anyone who comes across this thread and wants to know how it got done, here it is: (It's all done client-side)

    Step 1: Add a label in the picCharacter named "lblStatistics"

    Step 2: Client-side

    add these functions to the bottom of modGameLogic

    >! ```
    >! Function GetPlayerDamage(ByVal index As Long) As Long
    If index <= 0 Or index > MAX_PLAYERS Then Exit Function
    Dim weaponNum As Long

    GetPlayerDamage = 0

    ' Check for subscript out of range
    If IsPlaying(index) = False Or index <= 0 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
    End Function
    >! Function GetPlayerBlockChance(ByVal index As Long) As Long

    Dim i As Long
    Dim n As Long

    If index <= 0 Or index > MAX_PLAYERS Then Exit Function

    GetPlayerBlockChance = 0

    If GetPlayerEquipment(index, shield) > 0 Then
    i = (GetPlayerStat(index, Stats.Endurance) \ 2) + (GetPlayerLevel(index) \ 2)
    >! GetPlayerBlockChance = i
    End If
    End Function
    >! Function GetPlayerCriticalHitChance(ByVal index As Long) As Long
    >! Dim i As Long
    Dim n As Long

    If index <= 0 Or index > MAX_PLAYERS Then Exit Function

    GetPlayerCriticalHitChance = 0

    If GetPlayerEquipment(index, Weapon) > 0 Then
    i = (GetPlayerStat(index, Stats.Strength) \ 2) + (GetPlayerLevel(index) \ 2)
    >! GetPlayerCriticalHitChance = i
    End If
    End Function
    >! Function GetPlayerProtection(ByVal index As Long) As Long
    Dim Armor As Long
    Dim Helm As Long
    Dim Whetstone As Long ' New
    Dim Boots As Long ' New
    Dim Glove As Long ' New
    Dim Ring As Long ' New
    Dim Enchant As Long ' New
    >! GetPlayerProtection = 0
    >! ' Check for subscript out of range
    If IsPlaying(index) = False Or index <= 0 Or index > Player_HighIndex Then
    Exit Function
    End If
    >! Armor = GetPlayerEquipment(index, Equipment.Armor)
    Helm = GetPlayerEquipment(index, Equipment.Helmet)
    Whetstone = GetPlayerEquipment(index, Equipment.Whetstone) ' New
    Boots = GetPlayerEquipment(index, Equipment.Boots) ' New
    Glove = GetPlayerEquipment(index, Equipment.Glove) ' New
    Ring = GetPlayerEquipment(index, Equipment.Ring) ' New
    Enchant = GetPlayerEquipment(index, Equipment.Enchant) ' New
    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
    ' New
    If Whetstone > 0 Then
    GetPlayerProtection = GetPlayerProtection + Item(Whetstone).Data2
    End If
    >! If Boots > 0 Then
    GetPlayerProtection = GetPlayerProtection + Item(Boots).Data2
    End If
    >! If Glove > 0 Then
    GetPlayerProtection = GetPlayerProtection + Item(Glove).Data2
    End If
    >! If Ring > 0 Then
    GetPlayerProtection = GetPlayerProtection + Item(Ring).Data2
    End If
    >! If Enchant > 0 Then
    GetPlayerProtection = GetPlayerProtection + Item(Enchant).Data2
    End If
    ' /New
    End Function
    >! 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 <= 0 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
    >! ```

    Step 3: still in modGameLogic search for "Sub gameLoop()" and in this part I wanted to use tmr500 but Kaymak only had tmr250 available (next to what I wanted)

    let's refer to the timers as tmr### where ### is 500 or 250 depending on what you have, 500 being preferable

    above "tmr### = Tick + ###" paste:

    >! ```
    >! If frmMain.picCharacter.Visible Then
    Dim spd As Double
    spd = 1
    If GetPlayerEquipment(MyIndex, Weapon) > 0 Then
    spd = Item(GetPlayerEquipment(MyIndex, Weapon)).Speed / 1000
    End If

    'update statistics
    frmMain.lblStatistics.Caption = "Dmg Per Second: " & (GetPlayerDamage(MyIndex) / spd) & vbCrLf & "Dmg Reduction: " & GetPlayerProtection(MyIndex) & vbCrLf & _
    "Critical Chance: " & GetPlayerCriticalHitChance(MyIndex) & "%" & vbCrLf & "Block Chance: " & GetPlayerBlockChance(MyIndex) & "%" & vbCrLf & _
    "Health Regen: " & GetPlayerVitalRegen(MyIndex, HP)
    End If
    >! ```

    And you're done, I know… simple !  ;D

    If you come across any errors, please note that this was made 'especially' for Kaymak which used an engine that is based of EO 2.0, probably those errors could be because he has added stuff to it, like the extra equipment slots, and remember that the formulas might be changed, the formulas were 'ripped' from the server-side and changed a bit to give only the chance/etc

    [EDIT] final result should look something like this:

    ![](http://s3.postimg.org/aux4jcthv/new_char_window.png)
  7. > Look for "Public Sub InitMessages()" and anywhere in that sub, put there
    >
    > ```
    >
    > HandleDataSub(CToggleAfk) = GetAddress(AddressOf HandleToggleAfk)
    >
    > ```

    you put CToggleAfk here, which is right, but you use SToggleAfk in the rest of the code…  :x

    ```

    Sub HandleToggleAfk(ByVal index As Long, ByRef Data() As Byte, ByVal StartAddr As Long, ByVal ExtraVar As Long)
    If Player(index).afk = 1 Then
    Player(index) = 0 <-- didn't you mean Player(index).afk = 0 ?
    Else
    Player(index).afk = 1
    End If

    SendPlayerToggledAfk (index)
    End Sub

    ```
    :)
×
×
  • Create New...