Quick Heal Button
Printed From: Mirage Source
Category: Tutorials
Forum Name: Temporary Archive (Read Only)
Forum Discription: Temporary 3.0.3 archive tutorials, will be deleted when converted.
URL: http://ms.shannaracorp.com/backup-forums/forum_posts.asp?TID=147
Printed Date: 20 December 2006 at 5:52pm Software Version: Web Wiz Forums 8.01 - http://www.webwizforums.com
Topic: Quick Heal Button
Posted By: Sync
Subject: Quick Heal Button
Date Posted: 11 February 2006 at 3:07pm
Difficulty: Easy 1/5
Originaly Posted By: Sonire
Ok i have been getting ideas and using ppls ideas from this forum for alittle while now, its now time to share my first idea/code with you ppl, what this does is if the person has any potionaddhp items in there inventory when they hit F2(this can be changed really easy to any button you want) they will use the potion, so it acts like a quick heal button.enjoy
this is all client side, open FrmMirage and look for Sub Form_keyup(keyCode As Integer, Shift As Integer) ================================================== ============================================ replace code [code:1:7d109d04f5] Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) Call CheckInput(0, KeyCode, Shift) End Sub [/code:1:7d109d04f5] with code [code:1:7d109d04f5] Private Sub Form_KeyUp(KeyCode As Integer, Shift As Integer) Dim Value As Long Dim i As Long Call CheckInput(0, KeyCode, Shift) If KeyCode = vbKeyF2 Then
For i = 1 To MAX_INV
If GetPlayerInvItemNum(MyIndex, i) > 0 And GetPlayerInvItemNum(MyIndex, i) <= MAX_ITEMS Then If Item(GetPlayerInvItemNum(MyIndex, i)).Type = ITEM_TYPE_POTIONADDHP Then Call SendUseItem(i) Call AddText("You quaff a healing potion", Yellow) Exit Sub End If End If Next i End If
End Sub [/code:1:7d109d04f5]
And thats all there is to it, enjoy.
Lsd
[code:1:7d109d04f5] Originally posted by LSD on Monday March 8, 04 [/code:1:7d109d04f5]
|
|