Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.
Bem vindo visitante.
Caso ainda não tenha uma conta,pedimos para que crie uma,assim você terá acesso a todos os links e imagens disponíveis no fórum.

Você não está conectado. Conecte-se ou registre-se

Quando o jogador morrer,dropar itens aleatórios

Ir para baixo  Mensagem [Página 1 de 1]

Terabin

Terabin
Administrador
Administrador

Como o nome do tópico já explica...

Abra a source do seu servidor.
no modCombat,procure por:
Código:
Sub OnDeath(ByVal Index As Long)

Abaixo cole:
Código:
Dim Rate As Long
    Dim DropNum As Long

Agora procure por:
Código:
' Drop all worn items
    For i = 1 To Equipment.Equipment_Count - 1
        If GetPlayerEquipment(Index, i) > 0 Then
            PlayerMapDropItem Index, GetPlayerEquipment(Index, i), 0
        End If
    Next

E troque por isso:
Código:
Rate = 75

   If Rand(1, 100) >= Rate Then
   
        DropNum = Rand(1, 4)

   Select Case DropNum

   Case 1
      If GetPlayerEquipment(index, Weapon) > 0 Then
                     PlayerMapDropItem index, GetPlayerEquipment(index, Weapon), 0
              End If
         GiveInvItem index, GetPlayerEquipment(index, Weapon), 0
                 SetPlayerEquipment index, 0, Weapon
   Case 2
      If GetPlayerEquipment(index, Helmet) > 0 Then
                     PlayerMapDropItem index, GetPlayerEquipment(index, Helmet), 0
              End If
         GiveInvItem index, GetPlayerEquipment(index, Helmet), 0
                 SetPlayerEquipment index, 0, Helmet
   Case 3
      If GetPlayerEquipment(index, Armor) > 0 Then
                     PlayerMapDropItem index, GetPlayerEquipment(index, Armor), 0
              End If
         GiveInvItem index, GetPlayerEquipment(index, Armor), 0
                 SetPlayerEquipment index, 0, Armor
   Case 4
      If GetPlayerEquipment(index, Shield) > 0 Then
                     PlayerMapDropItem index, GetPlayerEquipment(index, Shield), 0
              End If
         GiveInvItem index, GetPlayerEquipment(index, Shield), 0
                 SetPlayerEquipment index, 0, Shield
   End Select
   End If

   Rate = 90
   If Rand(1, 100) >= Rate Then
      For i = 1 To MAX_INV
         If Item(i).Type <> ITEM_TYPE_CURRENCY Then
             PlayerMapDropItem index, i, GetPlayerInvItemValue(index, i)
             End If
      Next
   End If

Pronto,agora quando o jogador morrer,ele perderá algum item...

https://pokepokepoke.forumeiros.com

Ir para o topo  Mensagem [Página 1 de 1]

Permissões neste sub-fórum
Não podes responder a tópicos