Author Topic: block spell during movement  (Read 1919 times)

0 Members and 1 Guest are viewing this topic.

Offline warrenottoTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • warrenotto has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
block spell during movement
« on: September 04, 2013, 05:28:16 PM »
0
can anyone tell me or show me where i can learn or read about how to block a spell casting during character movement. that would be awesome thanks.

im having fun with this scripting stuff.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: block spell during movement
« Reply #1 on: September 04, 2013, 06:58:53 PM »
0
I have a sub in my CLAw that monitors movement to prevent looting while you're wandering.  Same principle really.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline warrenottoTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • warrenotto has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: block spell during movement
« Reply #2 on: September 05, 2013, 10:15:37 AM »
0
cool think i found it. i will try to integrate it into my script when i get home tonight. thanks man!

two thumbs up for this forum. you guys are really helpful!

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: block spell during movement
« Reply #3 on: September 05, 2013, 01:16:24 PM »
0
Should be this sub here:

Code: [Select]
sub StandingStill
  namespace push
  namespace local STILL
  
  set !newpos #CHARPOSX , #CHARPOSY , #CHARPOSZ
  if !newpos <> !oldpos || !move_timer = N/A
  {
    set !delay 1 ; adjust this value for more delay
    set !oldpos !newpos
    set !still #FALSE
    set !move_timer #SCNT + !delay
  }
  if #SCNT > !move_timer
  {
    if !oldpos = !newpos
    {
      set !still #TRUE
    }
    else
    {
      set !oldpos !newpos
      set !move_timer #SCNT + !delay
    }
  }
  set #RESULT !still
  namespace pop
return #RESULT

Then you just use it like this:

Code: [Select]
 gosub StandingStill
  if #RESULT = #TRUE
  {
    ; do your stuff here.
  }

Note you can modify the value of !delay to add more delay.  It's already delaying the least amount (1 second)
« Last Edit: September 05, 2013, 01:18:15 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline warrenottoTopic starter

  • Jr. Member
  • **
  • Posts: 14
  • Activity:
    0%
  • Reputation Power: 1
  • warrenotto has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: block spell during movement
« Reply #4 on: September 06, 2013, 02:27:43 PM »
0
cool. that's the one i though it was. looked through the whole script then realized its right there at the top. haha. i didn't get a chance to try it out last night cause i had to work late. ill give it a go tonight and let you know when i get it working. thanks again. much appreciated.

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: block spell during movement
« Reply #5 on: September 06, 2013, 04:54:43 PM »
0
At the beginning of your script, if you put this:

Code: [Select]
set #LPC 100

That will increase the responsiveness of the function without impacting overall performance.  Just don't make it very large because it will cause a slowdown of your client and other scripts running in parallel.
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: