Official ScriptUO EasyUO Scripts > Inactive Submissions

Targeting and teleporting subs - only for developers lol

(1/2) > >>

Thimotty:
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: ---call _ThimSubs_ choosetarget
set %somevar %temptarget

--- End code ---
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: ---call _ThimSubs_ teleport_to_rune_in_book %runebook %rune %teleport_try %teleport_skill

--- End code ---
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: ---
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

--- End code ---


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 PMHmm i cannot see the attached file although if i edit the post in the advanced options it say it is there?!?!?!

TrailMyx:
You should be able to see it now that you are not restricted.  :)

Thimotty:
Ahh i see now :P
Thanks

Endless Night:
Insteading of setting %Temptarget...  why not set #Result.  That would be more of a standard approach.

REturn xxxx 

12TimesOver:
Thimmoty -

Is this submission still valid?

Anyone have a chance to test yet?

X

Navigation

[0] Message Index

[#] Next page

Go to full version