Author Topic: Another question if you don't mind......  (Read 2825 times)

0 Members and 1 Guest are viewing this topic.

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Another question if you don't mind......
« on: June 10, 2014, 02:48:03 PM »
0

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: Another question if you don't mind......
« Reply #1 on: June 10, 2014, 02:55:07 PM »
0
Perhaps this set of subs will help.  I used these to organize the spell icons from your spellbook.  The ability icons should be similar.

http://www.scriptuo.com/index.php?topic=65.0

Also, in my bushido script, there's a sub you might be interested in.  I think it's called setupabilityicon:

http://www.scriptuo.com/index.php?topic=62.15
« Last Edit: June 10, 2014, 03:00:51 PM by TrailMyx »
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline GrandewdTopic starter

  • Full Member
  • ***
  • Posts: 239
  • Activity:
    0%
  • Reputation Power: 3
  • Grandewd has no influence.
  • Respect: +24
  • Referrals: 0
    • View Profile
Re: Another question if you don't mind......
« Reply #2 on: June 10, 2014, 04:08:33 PM »
0
Awesome, TM - thx a bunch guy...
I know, I should already know how to do that after all these years, but you know how containers are sometimes - like when you think you're moving one and you end up moving another because text came up before lcontpos, etc...
I want to see how you identify and move them... I know Cheffe has been changing/adding some things to containers lately, and there's some interesting info on that over on the EUO main forum in the EasyUO 1.5.1 beta builds thread....

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13302
  • Activity:
    0.2%
  • 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: Another question if you don't mind......
« Reply #3 on: June 10, 2014, 04:55:11 PM »
0
Yeh, if you look at that code, you'll see that there's no automatic method to make those icons move.  In practice it was pretty reliable, but I always feel more comfortable knowing there's a mechanical method for things instead of relying on "hope" for a script working.  So hopefully Cheffe can come up with something that'll help with this function in a more official way.
Please read the ScriptUO site RULES
Come play RIFT with me!

Offline manwinc

  • Elite
  • *
  • *
  • Posts: 2556
  • Activity:
    0%
  • Reputation Power: 32
  • manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!manwinc is a rising star!
  • Gender: Male
  • "The Devs Hard at Work"
  • Respect: +123
  • Referrals: 1
    • View Profile
Re: Another question if you don't mind......
« Reply #4 on: June 22, 2014, 12:07:44 PM »
0
Gosub Move_PrimaryAbility X Y
Gosub Move_SecondaryAbility X Y
Gosub Move_LightningStrike X Y
Gosub Move_Momentum X Y

It does pixel scan The Top left corner of each box to check if its already in position. I usually arrange them left to right. let me know if it gives you any trouble.

Code: [Select]
;=====================================

Sub Move_PrimaryAbility
Namespace Push
Namespace Local Mwinc_Move_PrimaryAbility
set !LPC #LPC
set #LPC 9999
set !X %1
set !Y %2
set !X_Start !X - 1
set !X_End !X
set !Y_Start !Y - 1
set !Y_End !Y + 1
set !Cipher1
for !X_Scan !X_Start !X_End
{
For !Y_Scan !Y_Start !Y_End
{
Gosub Save_Pix2 !X_Scan !Y_Scan
Str Left #Pixcol 1
set !Cipher1 !Cipher1 , #Strres
}
}
if !Cipher1 = 000011
{
set #Lpc !Lpc
Namespace Pop
Return
}
Event macro 8 14
Gosub Cont_Timer 30 Contsize 406_249
Gosub Click_Offset 243 127 G
Gosub Cont_Timer 30 COntName AbilityIcon_Gump
if #ContName = AbilityIcon_Gump
{
Gosub Click_Offset 15 15 f
Contpos !X !Y
}
Event Macro 9 14
set #LPC !LPC
Namespace Pop
Return

;======================================

Sub Move_SecondaryAbility
Namespace Push
Namespace Local Mwinc_Move_PrimaryAbility
set !LPC #LPC
set #LPC 9999
set !X %1
set !Y %2
set !X_Start !X - 1
set !X_End !X
set !Y_Start !Y - 1
set !Y_End !Y + 1
set !Cipher1
for !X_Scan !X_Start !X_End
{
For !Y_Scan !Y_Start !Y_End
{
Gosub Save_Pix2 !X_Scan !Y_Scan
Str Left #Pixcol 1
set !Cipher1 !Cipher1 , #Strres
}
}
if !Cipher1 = 000011
{
set #Lpc !Lpc
Namespace Pop
Return
}
Event macro 8 14
Gosub Cont_Timer 30 Contsize 406_249
Gosub Click_Offset 243 171 G
Gosub Cont_Timer 30 COntName AbilityIcon_Gump
if #ContName = AbilityIcon_Gump
{
Gosub Click_Offset 15 15 f
Contpos !X !Y
}
Event Macro 9 14
set #Lpc !LPC
Namespace Pop
Return
;====================================

Sub Move_LightningStrike
Namespace Push
Namespace Local Mwinc_Move_LightningStrike
set !Lpc #Lpc
set #Lpc 9999
set !X %1
set !Y %2
set !X_Start !X - 1
set !X_End !X
set !Y_Start !Y - 1
set !Y_End !Y + 1
set !Cipher1
for !X_Scan !X_Start !X_End
{
For !Y_Scan !Y_Start !Y_End
{
Gosub Save_Pix2 !X_Scan !Y_Scan
Str Left #Pixcol 1
set !Cipher1 !Cipher1 , #Strres
}
}
if !Cipher1 = 000011 || !Cipher1 = 000055
{
set #Lpc !Lpc
Namespace Pop
Return
}
Finditem QON C_ , #Backpackid
if #findcnt < 1
{
set #Lpc !Lpc
Namespace Pop
Return
}
Event macro 8 15
Gosub Cont_Timer 30 Contsize 406_249
if #Result = #True
{
set #Lpc !Lpc
Namespace Pop
Return
}
Gosub Click_Offset 335 18 x 3
Wait 10
Gosub Click_Offset 90 76 G
Gosub Cont_Timer 30 COntName SpellIcon_Gump
if #ContName = SpellIcon_Gump
{
Gosub Click_Offset 15 15 f
Contpos !X !Y
}
Event Macro 9 15
set #Lpc !Lpc
Namespace Pop
Return
;========================================
Sub Move_MomentumStrike
Namespace Push
Namespace Local Mwinc_Move_MomentumStrike
set !LPC #LPC
set #Lpc 9999
set !X %1
set !Y %2
set !X_Start !X - 1
set !X_End !X
set !Y_Start !Y - 1
set !Y_End !Y + 1
set !Cipher1
for !X_Scan !X_Start !X_End
{
For !Y_Scan !Y_Start !Y_End
{
Gosub Save_Pix2 !X_Scan !Y_Scan
Str Left #Pixcol 1
set !Cipher1 !Cipher1 , #Strres
}
}
if !Cipher1 = 000011 || !Cipher1 = 000055
{
set #Lpc !Lpc
Namespace Pop
Return
}
Finditem QON C_ , #Backpackid
if #findcnt < 1
{
set #Lpc !Lpc
Namespace Pop
Return
}
Event macro 8 15
Gosub Cont_Timer 30 Contsize 406_249
if #Result = #True
{
set #Lpc !Lpc
Namespace Pop
Return
}
Gosub Click_Offset 335 18 x 3
Wait 10
Gosub Click_Offset 252 76 G
Gosub Cont_Timer 30 COntName SpellIcon_Gump
if #ContName = SpellIcon_Gump
{
Gosub Click_Offset 15 15 f
Contpos !X !Y
}
Event Macro 9 15
set #Lpc !Lpc
Namespace Pop
Return
;===================================
;===================================
Sub Cont_Timer
; Gosub Cont_Timer (Timer) ( Var ) ( Value )
Namespace Push
Namespace Local Mwinc_Cont_Timer
set !Lpc #Lpc
set #lpc 9999
set !Time_Limit #scnt2 + %1
set !Cont_Check # . %2
While !Cont_Check <> %3 && !Time_Limit > #scnt2
{
set !Cont_Check # . %2
wait 1
}
set #Lpc !LPC
if !Time_Limit <= #scnt2
{
Namespace Pop
Return #true
}
Namespace Pop
Return #False
;=============================
;========================================================
Sub Click_Offset
Namespace Push
Namespace Local Mwinc_ClickOffset
set !Clickx #contposx + %1
set !CLicky #contposy + %2
Click !Clickx !CLicky %3 %4
set %3 0
set %4 0
Namespace pop
Return
;===============================================

;====================================
Sub Save_Pix2
Namespace Push
Namespace Local Save_Pix2
Set !SaveX %1
set !SaveY %2
Savepix !SaveX !SaveY 1
Namespace Pop
Return
;=====================================


Monkeys and Typewriters!

" Oh I know, We'll make a Boss Encounter that requires 3 keys per player to enter, Then we'll make it not a closed instance so you never know if you are going to pop into a fresh room or a boss that has 1% Health left with 20 dudes smashing its face in, wasting your time and effort"

Tags: