Hi, I have problem with casting a spell to a position. Sometimes, it's casted in reverse or random direction. I have tested may times, even draw the cast pos but I think it's castspell problem. Is it just me?
Login to Account Create an Account
Control.CastSpell Bug Report
#1
Posted 23 January 2017 - 09:53
#2
Posted 23 January 2017 - 10:11
#3
Posted 23 January 2017 - 10:25
#4
Posted 23 January 2017 - 10:31
Since the mouse is jumping so fast bcs of the orb and spell cast it can miss the needed cast tick :/
#5
Posted 23 January 2017 - 10:52
Actually, i need to add a new performance option in the main menu where people can specify how much delay will be between certain actions - for example:
Control.CastSpell(pos); =
What happens in GoS EXT core:
- We set mouse pos
- We delay for 11ms
- We click the spell
- We delay for 11ms
- We set mouse pos back
This is a rough explanation ...
#6
Posted 23 January 2017 - 01:03
Hi, I have problem with casting a spell to a position. Sometimes, it's casted in reverse or random direction. I have tested may times, even draw the cast pos but I think it's castspell problem. Is it just me?
my suggestion would be to disable orb movements and attacks before you cast a spell, then re-enable them after the spell is casted
#7
Posted 23 January 2017 - 01:33
my suggestion would be to disable orb movements and attacks before you cast a spell, then re-enable them after the spell is casted
nah no no
Control.CastSpell: move mouse then cast then back very fast so can't fix by disable move/attack of orb
my suggest is:
local curentMouse = mousePos
Use Control.SetCursorPos(castPos) first
then Control.CastSpell(castPos) -- backPos is now castPos
delay check (spell.windUpTime) -- create variable and compare with TickCount/GameTimer/os.clock/smth don't use DelayAction func
then Control.SetCursorPos(currentMouse) again
#8
Posted 23 January 2017 - 05:03
@Ryzuki that's bad again, why would you try to recreate a spellcast half way? You're using native SetCursorPos, but at the same time you're casting Control.CastSpell which sets cursor pos again and does all the other sh*t?
If you want to code a spell.cast in LUA, here is how it's done: (at least a concept)
- Control.GetCursorPos - get backup of our current mouse pos
- delay?
- Control.SetCursorPos - set our mouse at the pos we want to
- delay?
- Control.KeyDown(Q) - hold down Q key
- Control.KeyUp(Q) - release Q key
- delay?
- mouse_event(MOUSEEVENTF_LEFTDOWN) -hold down mouse key
- mouse_event(MOUSEEVENTF_LEFTUP) -release mouse key (this is needed because some ppl dont use smartcast, not sure if requires delay between Q and mouse click)
- delay?
- Control.SetCursorPos(backup) - set the mouse back where it was before
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users
Sign In
Create Account

Back to top
Report









