giu 25

[Tutorial] Creare custom spell Parte2 -Warcraft 3

Rieccomi con nuovi fix e nuove spell!

  • Ora Grom è funzionante al 100% con abilità migliorate.
  • Aggiunto un nuovo eroe Fire and Flames! Scoprite voi le sue caratteristiche ;)
  • +1una spell all’arcimago ‘Justice
  • Fusione oggetti implementata.
  • + trigger vari.
Nuove Spell di Fire and Flames

Nuove Spell di Fire and Flames

In aggiunta ho modificato l’Arcimago aggiungendogli un abilità(Fixata!). Poi ho aggiornato tutte le spell di grom, migliorate, e messo una funzione attivabile da chat per vedere o meno i danni causati da ‘Dance of Axe’.
Aggiunta la FUSIONE DEGLI OGGETTI e una ‘zona2′ :sino: dove ci sono un pò di trigger e script del caxzo.
Se avete domande chiedete^^ sono quà a grattarmi le :beta: (non è vero non ho tempo da buttare xD(purtroppo))

Vi aspetta una bella nuova mappa calda :)

Queste abilità non sono fatte in jazz o vjazz ma con semplici e genuini trigger ;)

:point: Download custom spell v2.1


P.S. L’ultima Abilità dell’arcimago a volta crasha.. Potete anche crettarla.. non è un successore :asd:

Gl hf

giu 16

[VB6] Realizzare un KEYSENDER

Ecco come inviare/simulare tasti dal programma con visual basic 6

1
2
3
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Const KEYEVENTF_EXTENDEDKEY = &H1
Const KEYEVENTF_KEYUP = &;H2

Read the rest of this entry »

giu 14

[VB6] Funzione BEEP

1
2
3
4
5
6
7
Option Explicit
Private Declare Function Beep Lib "kernel32" (ByVal dwFreq As Long, ByVal dwDuration As Long) As Long

Private Sub cmdBeep1_Click()
Beep (Rnd()* 5000), 50 'primo valore: frequenza del suono, secondo valore: durata

End Sub
giu 14

[VB6] Creare delle Ballon Tips

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Option Explicit
Private Const APP_SYSTRAY_ID = 999
Private Const NOTIFYICON_VERSION = &H3

Private Const NIF_MESSAGE = &H1
Private Const NIF_ICON = &H2
Private Const NIF_TIP = &H4
Private Const NIF_STATE = &H8
Private Const NIF_INFO = &H10

Private Const NIM_ADD = &H0
Private Const NIM_MODIFY = &H1
Private Const NIM_DELETE = &H2
Private Const NIM_SETFOCUS = &H3
Private Const NIM_SETVERSION = &H4
Private Const NIM_VERSION = &H5

Private Const NIS_HIDDEN = &H1
Private Const NIS_SHAREDICON = &H2

'icone
Private Const NIIF_NONE = &H0
Private Const NIIF_INFO = &H1
Private Const NIIF_WARNING = &H2
Private Const NIIF_ERROR = &H3
Private Const NIIF_GUID = &H5
Private Const NIIF_ICON_MASK = &HF
Private Const NIIF_NOSOUND = &H10
Private Const WM_USER = &H400
Private Const NIN_BALLOONSHOW = (WM_USER + 2)
Private Const NIN_BALLOONHIDE = (WM_USER + 3)
Private Const NIN_BALLOONTIMEOUT = (WM_USER + 4)
Private Const NIN_BALLOONUSERCLICK = (WM_USER + 5)
Private Type GUID
   Data1 As Long
   Data2 As Integer
   Data3 As Integer
   Data4(7) As Byte
End Type

Private Type NOTIFYICONDATA
  cbSize As Long
  hWnd As Long
  uID As Long
  uFlags As Long
  uCallbackMessage As Long
  hIcon As Long
  szTip As String * 128
  dwState As Long
  dwStateMask As Long
  szInfo As String * 256
  uTimeoutAndVersion As Long
  szInfoTitle As String * 64
  dwInfoFlags As Long
  guidItem As GUID
End Type

Private Declare Function Shell_NotifyIcon Lib "shell32.dll" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, lpData As NOTIFYICONDATA) As Long

Read the rest of this entry »

giu 14

[VB6] Controllare connessione internet

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
Private Declare Function InternetGetConnectedState Lib "wininet.dll" (ByRef _
lpSFlags As Long, ByVal dwReserved As Long) As Long
Const INTERNET_CONNECTION_MODEM = 1
Const INTERNET_CONNECTION_LAN = 2
Const INTERNET_CONNECTION_PROXY = 4
Const INTERNET_CONNECTION_MODEM_BUSY = 8
Dim flags As Long

Private Sub Form_Load()

If InternetGetConnectedState(flags, 0) = 0 Then
MsgBox "Non sei connesso ad internet"
ElseIf flags = INTERNET_CONNECTION_MODEM Then
MsgBox "Sei connesso con il Modem" ' connessione attiva via modem
ElseIf flags = INTERNET_CONNECTION_LAN Then
MsgBox "Sei connesso con LAN" ' connessione attiva via LAN
ElseIf flags = INTERNET_CONNECTION_PROXY Then
MsgBox "Sei connesso via Proxy" ' connessione attiva via proxy
End If
End Sub
giu 14

[VB6] Simulazione tasto Windows (Start)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2

Private Sub Form_Load()
' simula la pressione dei tasti Ctrl-Esc
keybd_event vbKeyControl, 0, 0, 0
keybd_event vbKeyEscape, 0, 0, 0
DoEvents

' simula il rilascio dei due tasti
keybd_event vbKeyControl, 0, KEYEVENTF_KEYUP, 0
keybd_event vbKeyEscape, 0, KEYEVENTF_KEYUP, 0
DoEvents

End Sub
giu 14

[Tutorial] Creare spell personalizzate Warcraft 3

Spell personalizzata nel Signore delle Bestie

Spell personalizzata - Signore delle Bestie vs Grom

Dopo un pò di mapping ci vogliono un pò di spell personalizzate!

Ci sono 3 hero, Grom (una specie di ‘Axe’ di DotA All Star, quì è un hero di agilità con le spell: Teleport, Dance of Axe e Colpo Critico. L’Arcimago, eroe di intelligenza con Raining Blood, Scudo magico, Evoca Creatura, Aura Brillante. Ed infine Rexxar, con Run, Fury e Lampo! Questa mappa è un Tournament da giocare 1v1. Ma potete sempre mettere su una piccola IA o un npc scemo!
Ogni hero è stato equilibrato più o meno bene, più meno che più.. ma meglio di niente.. ;)

Read the rest of this entry »

giu 12

[Tutorial] Mapping in Warcraft 3 – World Editor

Ecco un altro linguaggio che lascio… ;)
Lascio qualche schizzo della mia ‘arte’ in mapping.

Esempio di Mapping senza uso dei precipizi

Esempio di Mapping senza uso dei precipizi (click per download)

In questo tutorial lascio allegato una mappa, dove si può prendere spunto per i propri paesaggi ecc… La mappa l’ho fatta diverso tempo fà, spero sia decente xD

.

.

.

.

.

.

Read the rest of this entry »

mag 29

Convertitore da base Y a base X

Dopo il convertitore da base 10 a X, arriva il convertitore da base Y a base X! Cioè da qualsiasi base a qualsiasi base!
Programmato da nardu! Buon uso ;)

  Convertitore Basi X Y (8,8 KiB, 91 hits)
mag 28

Convertitore da Base 10 a base X

Programma realizzato da nico (parte del mio team :P ). Ha l’utilità di convertire un numero da base 10 a base X, cioè a scelta! Compreso tra 2 e 32.
Programmato in C#
nei prossimi giorni dovrebbe arrivare il convertitore da base Y a base X! Cioè da qualsiasi base a qualsiasi base!

  Convertitore da base 10 a base X (5,0 KiB, 151 hits)
mag 17

VB6 Calcolare l’anno bisestile

Calcolo dell’anno bisestile.

1
2
3
Dim year As Integer
year = 2004
Label1 = DateSerial(year, 2, 29) <> DateSerial(year, 3, 1)

Restituisce un valore VERO o FALSO

mag 17

VB6 Convesione basi

Ecco come fare conversioni da Dec > Bin > Dec > Hex e calcoli di radianti e gradi.

Nel programma basta usare:

Bin(Num_decimale)
BinToDec(Num_bin)
Hex(Num_decimale)
'Hex questo non è presente nel modulo, ma è già integrato in vb6.

Radians(valore_gradi)
Degrees(valore_radiante)

'Ovviamente tutti letti da una variabile o un campo..
variabile = Bin(34)

Crea un Modulo:

Option Explicit

'  Conversione da bdecimale a binario
Function Bin(ByVal value As Long) As String
    Dim result As String, exponent As Integer
    result = String$(32, "0")
    Do
        If value And Power2(exponent) Then
            Mid$(result, 32 - exponent, 1) = "1"
            value = value Xor Power2(exponent)
        End If
        exponent = exponent + 1
    Loop While value
    Bin = Mid$(result, 33 - exponent)
End Function

' Convesrione da binario a decimale.
Function BinToDec(value As String) As Long
    Dim result As Long, i As Integer, exponent As Integer
    For i = Len(value) To 1 Step -1
        Select Case Asc(Mid$(value, i, 1))
            Case 48      ' "0", niente.
            Case 49      ' "1", aggiungere la corrispondente potenza di 2
                result = result + Power2(exponent)
            Case Else
                Err.Raise 5
        End Select
        exponent = exponent + 1
    Next
    BinToDec = result
End Function

' conversione gradi > radiante.
Function Radians(Degrees As Double) As Double
    Radians = Degrees / 57.29577951
End Function

' Convertire radiante in gradi.
Function Degrees(Radians As Double) As Double
    Degrees = Radians * 57.29577951
End Function

'Private function
Private Function Power2(ByVal exponent As Long) As Long
    Static result(0 To 31) As Long, i As Integer
    If result(0) = 0 Then
        result(0) = 1
        For i = 1 To 30
            result(i) = result(i - 1) * 2
        Next
        result(31) = &H80000000
    End If
    Power2 = result(exponent)
End Function
mag 17

Catturare lo schermo senza il tasto Stamp

Può essere necessarrio catturare l’immagine di schermo senze dover emulare la pressione del tasto STAMP

Chiamato con:

Set Picture1.Picture = ImmagineSchermo()
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
Private Const KEYEVENTF_KEYUP = &H2

Public Function ImmagineSchermo(Optional ActiveWindow As Boolean) As Picture
Dim Picture As StdPicture
Set Picture = Clipboard.GetData(vbCFBitmap)
If ActiveWindow Then
keybd_event vbKeyMenu, 0, 0, 0
End If
keybd_event vbKeySnapshot, 0, 0, 0
DoEvents
keybd_event vbKeySnapshot, 0, KEYEVENTF_KEYUP, 0
If ActiveWindow Then
keybd_event vbKeyMenu, 0, KEYEVENTF_KEYUP, 0
End If
Set ImmagineSchermo = Clipboard.GetData(vbCFBitmap)
Clipboard.SetData Picture, vbCFBitmap
End Function
mag 17

Centrare un form nello schermo

Per centrare lo schermo:

Form1.Move(Screen.width-form1.width)\2,(screen.height-form1.height)\2

Se cè la necessità di impedire lo sostamento del form nel menù a fianco settare ‘Moveable’ su FALSE

mag 17

Form sempre in primo piano – Always on top

Inserisci un modulo nel progetto e copia questo nel modulo:

Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOACTIVATE = &H10
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1

E questo nella form

Dim lRetVal As Long

Private Sub Form_Load()
lRetVal = SetWindowPos(Form1.hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOACTIVATE Or SWP_NOSIZE Or SWP_NOMOVE)
End Sub