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

VitinhooxD

Members
  • Posts

    1365
  • Joined

  • Last visited

    Never

Posts posted by VitinhooxD

  1. yeah

    EDIT: current sub
    ```
    Sub JobMode1(index , job ,  mode)
    Dim needtool
    Dim give
    Dim givevalue
    Dim giveexp
    Dim needtoup
    Dim lvl
    Dim exp
    Dim skillaction
    Dim succed
    Dim chance
    Dim rand
    Dim succedmsg

      Call PlayerMsg(Index, "1", WHITE)
    succedmsg = GetVar("Skills\" & job & ".ini" , ""& mode , "SuccedMsg")
    chance = Int(GetVar("Skills\" & job & ".ini" ,  ""& mode , "Chance"))
    skillaction = GetVar("Skills\" & job & ".ini" , "Info" , "SkillAction")
    succed = GetVar("Skills\" & job & ".ini" , "Info" , "Succed")
    lvl = GetVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level")
    needtoup = Int(GetVar("jobexp.ini" , "Exp" , ""& lvl))
    exp = GetVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp")
    needtool = Int(GetVar("Skills\" & job & ".ini" , ""& mode , "NeedTool"))
    give = Int(GetVar("Skills\" & job & ".ini" , ""& mode , "GiveNum"))
    givevalue = Int(GetVar("Skills\" & job & ".ini" , ""& mode , "GiveValue"))
    giveexp = Int(GetVar("Skills\" & job & ".ini" , ""& mode , "GiveExp"))
      Call PlayerMsg(Index, "2", WHITE)
    If GetPlayer1stJob(index) = job Then
    Call PlayerMsg(Index, "3", WHITE)
      If GetPlayerInvItemNum(index , GetPlayerWeaponSlot(index)) = needtool Then
          rand = Rand(Chance , 1)
          Select Case rand

          Case 1
            Call BattleMsg(index , " & succedmsg & "  , GREEN , 1 )
            Call Give_Currency(index , ""& give , ""& givevalue )
            If exp = ""  Then
                Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , ""& giveexp)
                Call BattleMsg(index , "You gained " & giveexp & " in " & job & " ! " , 2 , 1 )
            Else
                exp = exp + giveexp
                Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , ""& exp)
                Call BattleMsg(index , "You gained " & giveexp & " in " & job & " ! " , 2 , 1 )
                If exp >= needtoup Then
                  Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level" , Int(lvl) + 1) 
                  Call BattleMsg(index , "You are in level " & lvl & " in " & job & " ! " , 2 , 1 )
                End If
            End If
          End Select
      Else
          Call BattleMsg(index , "You need te right tool to " & skillaction & " here , please search/buy it!" , 12 , 0)
      End If
    Else
    Call PlayerMsg(Index, "4", WHITE)
      Call BattleMsg(index , "You need to do " & job & " to " & skillaction & " here ! " , 12 ,1 )
    End If
    End Sub

    ```
    Current error type mysmatch line 20
  2. Yeah , i'll try that thanks!

    EDIT: Made some fix but now the error is Subscript out of range line 29

    ```
    Sub JobMode1(index , job ,  mode)
    Dim needtool
    Dim give
    Dim givevalue
    Dim giveexp
    Dim needtoup
    Dim lvl
    Dim exp
    Dim skillaction
    Dim succed
    Dim chance
    Dim rand
    Dim succedmsg

      Call PlayerMsg(Index, "1", WHITE)
    succedmsg = GetVar("Skills\" & job & ".ini" , ""& mode , "SuccedMsg")
    chance = GetVar("Skills\" & job & ".ini" , ""& mode , "Chance")
    skillaction = GetVar("Skills\" & job & ".ini" , "Info" , "SkillAction")
    succed = GetVar("Skills\" & job & ".ini" , "Info" , "Succed")
    lvl = GetVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level")
    needtoup = GetVar("jobexp.ini" , "Exp" , ""& lvl)
    exp =  GetVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp")
    needtool = GetVar("Skills\" & job & ".ini" , ""& mode , "NeedTool")
    give = GetVar("Skills\" & job & ".ini" , ""& mode , "GiveNum")
    givevalue = GetVar("Skills\" & job & ".ini" , ""& mode , "GiveValue")
    giveexp = GetVar("Skills\" & job & ".ini" , ""& mode , "GiveExp")
      Call PlayerMsg(Index, "2", WHITE)
    If GetPlayer1stJob(index) = Trim(job) Then
    Call PlayerMsg(Index, "3", WHITE)
      If GetPlayerInvItemNum(index , GetPlayerWeaponSlot(index)) = needtool Then
          rand = Rand(Chance , 1)
          Select Case rand

          Case 1
            Call BattleMsg(index , " & succedmsg & "  , GREEN , 1 )
            Call Give_Currency(index , ""& give , ""& givevalue )
            If exp = ""  Then
                Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , ""& giveexp)
                Call BattleMsg(index , "You gained " & giveexp & " in " & job & " ! " , 2 , 1 )
            Else
                exp = exp + giveexp
                Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , ""& exp)
                Call BattleMsg(index , "You gained " & giveexp & " in " & job & " ! " , 2 , 1 )
                If exp >= needtoup Then
                  Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level" , Int(lvl) + 1) 
                  Call BattleMsg(index , "You are in level " & lvl & " in " & job & " ! " , 2 , 1 )
                End If
            End If
          End Select
      Else
          Call BattleMsg(index , "You need te right tool to " & skillaction & " here , please search/buy it!" , 12 , 0)
      End If
    Else
    Call PlayerMsg(Index, "4", WHITE)
      Call BattleMsg(index , "You need to do " & job & " to " & skillaction & " here ! " , 12 ,1 )
    End If
    End Sub

    ```
  3. Great but now the error is Type mismatch "string"  on line 19

    gere is the sub

    ```
    Sub JobMode1(index , job ,  mode)
    Dim needtool
    Dim give
    Dim givevalue
    Dim giveexp
    Dim needtoup
    Dim lvl
    Dim exp
    Dim skillaction
    Dim succed
    Dim chance
    Dim rnd
    Dim succedmsg

    succedmsg = GetVar("Skills\" & job & ".ini" , ""& mode , "SuccedMsg")
    chance = Int(GetVar("Skills\" & job & ".ini" , ""& mode , "Chance"))
    skillaction = GetVar("Skills\" & job & ".ini" , "Info" , "SkillAction")
    succed = GetVar("Skills\" & job & ".ini" , "Info" , "Succed")
    lvl = Int(GetVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level"))
    needtoup = Int(GetVar("jobexp.ini" , "Exp" , ""& lvl))
    exp =  Int(GetVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp"))
    needtool = Int( GetVar("Skills\" & job & ".ini" , ""& mode , "NeedTool"))
    give = Int(GetVar("Skills\" & job & ".ini" , ""& mode , "GiveNum"))
    givevalue = Int(GetVar("Skills\" & job & ".ini" , ""& mode , "GiveValue"))
    giveexp = Int(GetVar("Skills\" & job & ".ini" , ""& mode , "GiveExp"))

    If GetPlayer1stJob(index) = Int(job) Then
      If GetPlayerInvItemNum(index , GetPlayerWeaponSlot(index)) = needtool Then
    rnd = Rand(Chance , 1)
    Select Case rnd

    Case 1
    Call BattleMsg(index , " & succedmsg & "  , GREEN , 1 )
    Call Give_Currency(index , ""& give , ""& givevalue )
          If exp = ""  Then
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , ""& giveexp)
    Call BattleMsg(index , "You gained " & giveexp & " in " & job & " ! " , 2 , 1 )
    Else
    exp = Int(exp) + giveexp
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , ""& exp)
    Call BattleMsg(index , "You gained " & giveexp & " in " & job & " ! " , 2 , 1 )
              If Int(exp) >= Int(needtoup) Then
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level" , Int(lvl) + 1) 
    Call BattleMsg(index , "You are in level " & lvl & " in " & job & " ! " , 2 , 1 )
              End If
          End If
    Case Else
    'nothing lol
    End Select
      Else
          Call BattleMsg(index , "You need te right tool to " & skillaction & " here , please search/buy it!" , 12 , 0)
      End If
    Else
    Call BattleMsg(index , "You need to do " & job & " to " & skillaction & " here ! " , 12 ,1 )
    End If

    End Sub
    ```
    +X
  4. no i'll try this , thanks Admiral!

    EDIT: the first sub worked but now this one is not working:
    ```
    Sub JobMode1(index , job ,  mode)
    Dim needtool
    Dim give
    Dim givevalue
    Dim giveexp
    Dim needtoup
    Dim lvl
    Dim exp
    Dim skillaction
    Dim succed
    Dim chance
    Dim rnd
    Dim succedmsg

    succedmsg = GetVar("Skills\" & job & ".ini" , ""& mode , "SuccedMsg")
    chance = GetVar("Skills\" & job & ".ini" , ""& mode , "Chance")
    skillaction = GetVar("Skills\" & job & ".ini" , "Info" , "SkillAction")
    succed = GetVar("Skills\" & job & ".ini" , "Info" , "Succed")
    lvl = GetVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level")
    needtoup = GetVar("jobexp.ini" , "Exp" , ""& lvl)
    exp =  GetVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp")
    needtool = GetVar("Skills\" & job & ".ini" , ""& mode , "NeedTool")
    give = GetVar("Skills\" & job & ".ini" , ""& mode , "GiveNum")
    givevalue = GetVar("Skills\" & job & ".ini" , ""& mode , "GiveValue")
    giveexp = GetVar("Skills\" & job & ".ini" , ""& mode , "GiveExp")

    If GetPlayer1stJob(index) = Int(job) Then
      If GetPlayerInvItemNum(index , GetPlayerWeaponSlot(index)) = needtool Then
    rnd = Rand(Chance , 1)
    Select Case rnd

    Case 1
    Call BattleMsg(index , " & succedmsg & "  , GREEN , 1 )
    Call Give_Currency(index , ""& give , ""& givevalue )
          If exp = ""  Then
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , ""& giveexp)
    Call BattleMsg(index , "You gained " & giveexp & " in " & job & " ! " , 2 , 1 )
    Else
    exp = Int(exp) + giveexp
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , ""& exp)
    Call BattleMsg(index , "You gained " & giveexp & " in " & job & " ! " , 2 , 1 )
              If Int(exp) >= Int(needtoup) Then
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level" , Int(lvl) + 1) 
    Call BattleMsg(index , "You are in level " & lvl & " in " & job & " ! " , 2 , 1 )
              End If
          End If
    Case Else
    'nothing lol
    End Select
      Else
          Call BattleMsg(index , "You need te right tool to " & skillaction & " here , please search/buy it!" , 12 , 0)
      End If
    Else
    Call BattleMsg(index , "You need to do " & job & " to " & skillaction & " here ! " , 12 ,1 )
    End If

    End Sub

    ```

    Whats wrong?
  5. Hello Eclipse!I'm having trouble with this script:
    ```
    Sub SetPlayer1stJob(index , profession)
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "Jobs" , "FirstJob" , ""& profession)
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Level" , "0")
    Call PutVar("Accounts\" & GetPlayerName(index) & ".ini" , "FirstJob" , "Exp" , "0")
    Call PlayerMsg(index , "You now can do " & profession & " ! " ,12)
    End Sub
    ```
    It should put what there is write here : Call SetPlayer1stJob(index , **profession** ) in a ini file , but it put "" … Could someone help me?
×
×
  • Create New...