Jump to content

Welcome to Gaming On Steroids Forums
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account
Photo

Control.CastSpell Bug Report


  • Please log in to reply
7 replies to this topic

#1
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

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?


  • 0

#2
Krystra

Krystra

    Sexy Developer

  • Contributor
  • 417 posts
İ think it is a orbwalk problem , try to disable orb and try again
  • 0

#3
Meeboo

Meeboo

    Advanced Member

  • Scripts Developer
  • 786 posts
  • LocationUnited States

İ think it is a orbwalk problem , try to disable orb and try again

Ty Krystra . I'll give fb


  • 0

#4
Noddy

Noddy

    Surrender The Throne

  • Scripts Developer
  • 500 posts

Since the mouse is jumping so fast bcs of the orb and spell cast it can miss the needed cast tick :/


  • 0

#5
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,248 posts

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 ...


  • 0

#6
Toshibiotro

Toshibiotro

    Lord and Saviour of GoS

  • Banned
  • PipPipPip
  • 957 posts
  • LocationThe Moon

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


  • 0

#7
Ryzuki

Ryzuki

    Advanced Member

  • Contributor
  • 297 posts
  • LocationOsu!z

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


  • 0

#8
Feretorix

Feretorix

    Administrator

  • Administrators
  • 3,248 posts

@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)

 

  1. Control.GetCursorPos - get backup of our current mouse pos
  2. delay?
  3. Control.SetCursorPos - set our mouse at the pos we want to
  4. delay?
  5. Control.KeyDown(Q) - hold down Q key
  6. Control.KeyUp(Q) - release Q key
  7. delay?
  8. mouse_event(MOUSEEVENTF_LEFTDOWN) -hold down mouse key
  9. 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)
  10. delay?
  11. Control.SetCursorPos(backup) - set the mouse back where it was before

  • 0




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users