Superman Posted October 12, 2012 Share Posted October 12, 2012 I am making a script. ~ is the button that autotargets monsters 1-8 are the number keys needed to use the skill or item you put in the box space bar is the button needed to pickup items program CombatBot; procedure OpenSkillBox; begin PressKey('~'); KeyUp('~'); wait(20000); end; // Main loop begin OpenSkillBox; Keydown(1); KeyUp(1); wait(20000); Keydown(2); KeyUp(2); Keydown(3); KeyUp(3); Keydown(32); KeyUp(32); wait(20000); Keydown(32); KeyUp(32); wait(20000); Keydown(32); KeyUp(32); wait(20000); Keydown(32); KeyUp(32); wait(20000); Keydown(32); KeyUp(32); wait(20000); end. Complier Error 14 Type Mismatch Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 12, 2012 Share Posted October 12, 2012 Nvm. Use VKeyToChar instead of that list I sent you. Do CTRL+Space then type VK to look at the vk codes. They have some for control, alt, F1, etc. Vkeys Just use the PressKey function. If you want to press any normal character do PressKey('a'); or PressKey('~'); Take out all the keydowns and ups You could just use PressVKey with the VK codes if you want too. Quote Link to comment Share on other sites More sharing options...
Superman Posted October 12, 2012 Author Share Posted October 12, 2012 program CombatBot; procedure OpenSkillBox; begin PressVKey (0xC0); wait(20000); end; // Main loop begin OpenSkillBox; PressVKey (0x31); wait(20000); PressVKey (0x32); wait(20000); PressVKey (0x33); wait(20000); PressVKey (0x34); wait(20000); PressVKey (0x20); wait(20000); PressVKey (0x20); wait(20000); PressVKey (0x20); wait(20000); PressVKey (0x20); wait(20000); PressVKey (0x20); wait(20000); end. Complier Error 5 comma (',') excepted Spacebar VK_SPACE 0x20 1 key 0x31 2 key 0x32 3 key 0x33 4 key 0x34 ` VK_OEM_3 0xC0 ~ the autotarget button is supposed to be ` the vk code for ` is the same as ~ Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 12, 2012 Share Posted October 12, 2012 Use [-scar][/-scar] tags around your code without the dashes(-). You're getting this all mixed up. Use these new procedures i made for you: AutoTargetMonster; PickupItem; DoSkill(0); ...Replace 0 with whatever skill you want to use. 0 through 8 Do not change anything above the begin end. block that I did...if you want this to still work Here: [scar] program New; const TotalNumberOfSkills = 8; procedure AutoTargetMonster; begin PressKey('~'); end; procedure PickupItem; begin PressVKey(VK_SPACE); end; procedure DoSkill(Number: Integer); begin if (Number < 1) or (Number > TotalNumberOfSkills) then Exit; case Number of 1: PressVKey(VK_NUMPAD1); 2: PressVKey(VK_NUMPAD2); 3: PressVKey(VK_NUMPAD3); 4: PressVKey(VK_NUMPAD4); 5: PressVKey(VK_NUMPAD5); 6: PressVKey(VK_NUMPAD6); 7: PressVKey(VK_NUMPAD7); 8: PressVKey(VK_NUMPAD8); end; end; begin GetClient.Activate; AutoTargetMonster; PickupItem; DoSkill(0); end. [/scar] Quote Link to comment Share on other sites More sharing options...
BryceTheCoder Posted October 21, 2012 Share Posted October 21, 2012 LordJashin again making script 10x better than they were before and in a perfectly organized way too:P Quote Link to comment Share on other sites More sharing options...
LordJashin Posted October 21, 2012 Share Posted October 21, 2012 You should see what Jani did to the script I made for ClickHere. Ahaaha he did some spring cleaning on my sometimes crappy methods. Both worked the same though. Except the bitmaps were all wrong on both so the script to this day still doesnt work ahahaa. Quote Link to comment Share on other sites More sharing options...