ScriptUO

Official ScriptUO EasyUO Scripts => Submit your Script => Inactive Submissions => Topic started by: Thimotty on September 23, 2009, 09:53:14 PM

Title: Targeting and teleporting subs - only for developers lol
Post by: Thimotty on September 23, 2009, 09:53:14 PM
Here is my first contribution - my most used subs file.


Installation:
Just unzip the file "_ThimSubs_.zip" in the same folder with euox.exe


Usage:

1) The targeting sub:
In your code insert this:
Code: [Select]
call _ThimSubs_ choosetarget
set %somevar %temptarget
This will bring a targeting cursor in the game, waiting for you to target something. Once you target something it's ID will be stored into the "%somevar" variable.

2) The teleporting sub:
In your code insert this:
Code: [Select]
call _ThimSubs_ teleport_to_rune_in_book %runebook %rune %teleport_try %teleport_skill
this will teleport you to the rune number %rune in the runebook %runebook using the skill %teleport_skill and will try %teleport_try times on failure (for example if your chivalry skill is not enough).



Here is a sample script that uses both subs and will teleport you to each rune in 3 runebooks:
Code: [Select]

set %teleport_skill chiv  ; define the skill you will be using to teleport - chiv/mage
set %teleport_try 3       ; define how many times the script will try to teleport you on failure

event ExMsg #charID 3 1673 target your runebook 1
call _ThimSubs_ choosetarget
set %runebook1 %temptarget
wait 5

event ExMsg #charID 3 1673 target your runebook 2
call _ThimSubs_ choosetarget
set %runebook2 %temptarget
wait 5

event ExMsg #charID 3 1673 target your runebook 3
call _ThimSubs_ choosetarget
set %runebook3 %temptarget
wait 5

loop:
wait 1
for %counter 1 16
   {
   call _ThimSubs_ teleport_to_rune_in_book %runebook1 %counter %teleport_try %teleport_skill
   }
for %counter 1 16
   {
   call _ThimSubs_ teleport_to_rune_in_book %runebook2 %counter %teleport_try %teleport_skill
   }
for %counter 1 16
   {
   call _ThimSubs_ teleport_to_rune_in_book %runebook3 %counter %teleport_try %teleport_skill
   }

goto loop


I use those subs in almost all my scripts so i think they could be useful. And i know the semple script can be made much much more shorter, but i'm posting it as tutorial and I wanted  it to be as readable as possible.

Post Merge: September 23, 2009, 09:57:34 PM
Hmm i cannot see the attached file although if i edit the post in the advanced options it say it is there?!?!?!
Title: Re: Targeting and teleporting subs - only for developers lol
Post by: TrailMyx on September 23, 2009, 10:51:18 PM
You should be able to see it now that you are not restricted.  :)
Title: Re: Targeting and teleporting subs - only for developers lol
Post by: Thimotty on September 23, 2009, 10:55:52 PM
Ahh i see now :P
Thanks
Title: Re: Targeting and teleporting subs - only for developers lol
Post by: Endless Night on September 24, 2009, 08:01:05 AM
Insteading of setting %Temptarget...  why not set #Result.  That would be more of a standard approach.

REturn xxxx 
Title: Re: Targeting and teleporting subs - only for developers lol
Post by: 12TimesOver on May 31, 2011, 08:57:11 AM
Thimmoty -

Is this submission still valid?

Anyone have a chance to test yet?

X
Title: Re: Targeting and teleporting subs - only for developers lol
Post by: Thimotty on June 05, 2011, 08:32:00 PM
If I remember correctly they have changed something for the runebooks and currently the script is not working. I'll try to find time to fix it within next few days.
...Or i'll simply upload my current library, but first need to check it if there is something inside i don't want to share :)
Title: Re: Targeting and teleporting subs - only for developers lol
Post by: Endless Night on November 02, 2011, 08:17:19 PM
Script moved to inactive scripts. (If you disagree with the move please pm me.)
Thank you for the script submission and we look forward to your return and this scripts finialization.

Comments
-- it is not necessarily to zip a single text file attachment.