Restart D2 script v2.0

Page 2 of 4 Previous  1, 2, 3, 4  Next

View previous topic View next topic Go down

Re: Restart D2 script v2.0

Post by noty on Thu Nov 29, 2012 8:12 pm

I can show you how i manage to kill D2 in AutoIT via Hotkey:

Code:
$Ini = @ScriptDir & '\Settings.ini'
$KillKey = IniRead($Ini, "Hotkeys", "KillKey", "{END}")
$fps = IniRead($Ini, "Hotkeys", "Killkey", "{NUMPADADD}")
$nopickup = IniRead($Ini, "Hotkeys", "Killkey", "{NUMPADSUB}")
$friendlist = IniRead($Ini, "Hotkeys", "Killkey", "{NUMPADDIV}")
HotKeySet($KillKey, "Kill_D2")
HotKeySet($nopickup, "no_pickup")
HotKeySet($fps, "fps")
HotKeySet($friendlist, "friendlist")
;MsgBox (0, "Kill_D2", "To kill Diablo press " & $KillKey & "-key.")

While 1
    Sleep(100)
WEnd

Func no_pickup()
  send ("{ENTER}")
  Sleep (200)
  send ("/nopickup")
  Sleep (200)
  send ("{ENTER}")
EndFunc

Func fps()
  send ("{ENTER}")
  Sleep (200)
  send ("/fps")
  Sleep (200)
  send ("{ENTER}")
EndFunc

Func friendlist()
  send ("{ENTER}")
  Sleep (200)
  send ("/f l")
  Sleep (200)
  send ("{ENTER}")
EndFunc

Func Kill_D2()
   
_ProcessCloseEx("Game.exe")

EndFunc

Func _ProcessCloseEx($sPID)
    If IsString($sPID) Then $sPID = ProcessExists($sPID)
    If Not $sPID Then Return SetError(1, 0, 0)
   
    Return Run(@ComSpec & " /c taskkill /F /PID " & $sPID & " /T", @SystemDir, @SW_HIDE)
EndFunc

noty
Moon Knight

Posts : 28
Country : ???

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by Quirinus on Fri Nov 30, 2012 7:08 am

Thanks. Yea I know, but I don't want to use AutoIT. Smile

Well, doesn't matter, it works on W7 and Vista (I assume). I don't have XP to test/fix it there.

EDIT: Also I forgot to remove the pause line, updated now.

Quirinus
Creature of Flame

Bloody High Five
Posts : 5567
TGGood none
Country : Croatia

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by iwansquall on Fri Nov 30, 2012 7:40 am

Hmm, can AutoIT find a specific spot IN THE window?
My problem is, that i play the game in windowed mode.
So certain desktop position definitely wont work.

Speedbook -> Click a spell -> Extra skill shortcut.

Would be great it really work.
Or maybe:
Open inventory -> Click on town portal -> Close inventory

iwansquall
Blood Golem

Underpowered Admin
Posts : 2206
Country : Malaysia

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by Quirinus on Fri Nov 30, 2012 9:20 am

@iwansquall wrote:Hmm, can AutoIT find a specific spot IN THE window?
My problem is, that i play the game in windowed mode.
So certain desktop position definitely wont work.

Speedbook -> Click a spell -> Extra skill shortcut.

Would be great it really work.
Or maybe:
Open inventory -> Click on town portal -> Close inventory

Yea it can do that. It's a bit more annoying on Realm than SP because of the latency tho.

Quirinus
Creature of Flame

Bloody High Five
Posts : 5567
TGGood none
Country : Croatia

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by noty on Fri Nov 30, 2012 10:27 am

@iwansquall wrote:

Or maybe:
Open inventory -> Click on town portal -> Close inventory

Why dont u bind a hotkey ingame ?



noty
Moon Knight

Posts : 28
Country : ???

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by iwansquall on Fri Nov 30, 2012 11:00 am

More like open TP is occupied one of my spell hotkeys (F8).

Best if i can remove that.
I dunno if TP book same like scroll, but you put scroll at belt, you wouldnt waste 'cast animation' than using RMB shortcut.

iwansquall
Blood Golem

Underpowered Admin
Posts : 2206
Country : Malaysia

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by kambala on Fri Nov 30, 2012 11:06 am

you can always bind TP to a letter rather than to a functional button: you can bind up to 16 skill hotkeys

kambala
Follower of Akarat

Posts : 1417
Country : Ukraine

View user profile http://worldofplayers.ru/forums/769/

Back to top Go down

Re: Restart D2 script v2.0

Post by Quirinus on Fri Nov 30, 2012 12:25 pm

Yea, I don't understand why people are still using F2, F3, etc. keys... just use qwertfgh. I changed skill tree to z, weapon switch to h.

Those letters are way easier to use and are closer to 1234 for potions.

_____________________
"Zu jeder Zeit, an jedem Ort, bleibt das Tun der Menschen das gleiche."

Quirinus
Creature of Flame

Bloody High Five
Posts : 5567
TGGood none
Country : Croatia

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by iwansquall on Fri Nov 30, 2012 2:22 pm

Bind is full already, that why i asking if it possible to add 'new hotkey'.

I wouldnt ask here about how to setup my hotkey (seriously I made a guide in old forum on how to hotkey). I just want to see if it possible to go beyond current 16 (or whatever cap is) maximum hotkey via external software.

http://www.medianxl.com/t391-help-with-necro-summoner-skill-placement
Necro for example, is one of the class that have to use more than 16 active skills.

iwansquall
Blood Golem

Underpowered Admin
Posts : 2206
Country : Malaysia

View user profile

Back to top Go down

Re: Restart D2 script v2.0

Post by wojen616 on Sat Dec 01, 2012 4:31 pm

In AutoIt (without memory manipulation) u can do pseudo skill switching.

It would be slower then "regular" hotkey and u need to put atleast 100-200ms sleep after every action (in case of latency). Plus, in standard code it would "take away" mouse from u, to do action. (I was saw somewhere code, to do it in "background" btw)

wojen616
Landmass

Posts : 360
Country : Poland

View user profile

Back to top Go down

Page 2 of 4 Previous  1, 2, 3, 4  Next

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum