ScriptUO
Scripting Resources & Utilities => Stealth Client => Stealth archive => Topic started by: AaronGR on May 23, 2013, 11:40:17 PM
-
Ok So i created this script in AssistUO, it was quite simple to make, but when it comes to Stealth I have have no idea at all what to do. Like this script the target don;t move or anything. so I am thinking that Stealth would be absolutely perfect for logging these little BOD guys in. Just my computer is getting bogged down when I have 6 uo clients of these guys claiming all at once.
// Simple hidden check
if not hidden
useskill 'Hiding'
endif
waitforcontext 0x8b4 1 15000
waitforgump 0x2a0dcafe 15000
replygump 0x2a0dcafe 1
pause 2000
waitforcontext 0x16fd 1 15000
waitforgump 0x2a0dcafe 15000
replygump 0x2a0dcafe 1
pause 3600000
So how would I beable to take that script and put it into Stealth, its just a simple hide, and claim bod 1st one is the tailor 2nd one is the black smith. in Luna. Even better if could some how do a login, login minus the hiding. that way you just login grab the bods and log out do that every hour :). Well thats just a possible scenario.
Thanks
-
Well if your talking Stealth It's a much smaller group of people that know what they are doing.. Crome / Dxrom off the top of my head. If you wanted to do this in EUO it's pretty easy. Heck you can even just use that AUO macro via the key function in EUO and not even bother scripting that part, but instead of the logging IN / Out & switching characters. I know C2 has an autologin sub which would be a good place to start.
-
You mind hinting to a few threads, that maybe have that info for the EUO I use EUO am pretty new to it, i mostly use it for autoloot scripts. if i can do a login and logout that would be nice. its just running 6 clients in the back ground at once is starting to put a dent in my computing power.
-
http://www.scriptuo.com/index.php?topic=803.0
Here is C2's login script...its quite nice.
-
Well if your talking Stealth It's a much smaller group of people that know what they are doing.. Crome / Dxrom off the top of my head. If you wanted to do this in EUO it's pretty easy. Heck you can even just use that AUO macro via the key function in EUO and not even bother scripting that part, but instead of the logging IN / Out & switching characters. I know C2 has an autologin sub which would be a good place to start.
If noone try it out, the group never will grow larger....
Login Via Stealth , Account Management and such is much easyier as in easyuo.
Connect();
And your Account will be connected within 2-10 seconds
Changeprofile(Name);
And you can switch profile within 2-5 Seconds and manage accounts
if ( not Hidden() ) then UseSkill('Hiding');
checks if you need to hide
procedure SetContextMenuHook(VendorID : Cardinal; EntryNumber : Byte)
can Help you handle the context
Then difficult will raise about 10%
It looks like AUO just scan all objects and will handle when right, stealth doesnt. Stealth can access to all objects and handle individual.
A full Reference you can find here : http://stealth.od.ua/Doc:Manual/Reference/Gump
If you are done you can disconnect from account by using disconnect();
-
Wow that looks simple Crome, Could you place that into a fully working script so i can try it out and take it apart. I really want to learn this stuff.
-
Well if your talking Stealth It's a much smaller group of people that know what they are doing.. Crome / Dxrom off the top of my head.
you what mate? i dunno what I'm doing, I just beat on my keyboard until a script compiles! :X
Crome, Boyden and Neo are the heroes!
-
Wow that looks simple Crome, Could you place that into a fully working script so i can try it out and take it apart. I really want to learn this stuff.
My Ultima Online Account is currently closed ( out of Money :P ) but i will refresh it at Weekend. Then i can put you together a working Sample on Osi in Pascal.
Stealth is very simple to handle, unless you want to fullfill some complex things
If you are a C# Developer or have some .Net experience, i also can give you my dll working with Stealth API ( Coming up on 6.0 , Beta may be availible very soon ;-) )
-
Well if your talking Stealth It's a much smaller group of people that know what they are doing.. Crome / Dxrom off the top of my head.
you what mate? i dunno what I'm doing, I just beat on my keyboard until a script compiles! :X
Crome, Boyden and Neo are the heroes!
I would count you as well, since your learning curve is good as well. Me and Boydon are Stealth devs since a while, its normal to get a deeper insight about it.
Neo i would say is learning exceptional fast. Once learned he store it in his masterbrain ;)
-
Program Simple_Bod_Taker;
var ProfileList : Array of String; // Variable Declaration
var i : Integer; // we declare this for loop
const Timeout = 60000; // Declaring a Constant 60 * 1000ms( 1s = 1000ms ) = 60 Min
const NPCID = $00003011; // Here we save the ID of the NPC
const BODGumpID_Small = $9BADE6EA; // static type for small BodGumps on Runuo
const BodGumpID_Large = $A125B54A; // static type for large BodGumps on Runuo
const GumpButtonPacket = 1; // PacketValue to send "OK-Button"
const ContextMenuEntryValue = 1; // Entrypoint for Context on Runuo Sample
Procedure Login(Profile:String);
begin
if ( Connected() ) then
begin
Disconnect();// To Avoid already online Character
Wait(10000); // If we Logout we wait 10 seconds
end;
while ( Not Connected() ) do // Loop until we Connect
begin
while ( ProfileName() <> Profile ) do // We Check if we need to change Profile
begin
ChangeProfile(Profile); // We change Profile
Wait(30000); // For Security we wait 30 seconds
end;
Connect(); // We connect to Gameserver
Wait(10000); // Security Wait
end;
end;
Procedure Logout();
begin
while ( Connected() ) do // Logout Loop
begin
Disconnect();// Logout Character
Wait(10000); // If we Logout we wait 10 seconds
end;
end;
Procedure HideCharacter();
begin
while ( Not Hidden() ) do
begin
UseSkill('Hiding'); // Use Hiding
Wait(11000); // Wait ActionDelay( 10s ) + 1s latency ( latency can be different.. good maybe 50ms , lag maybe 800ms.. so 1s is safe )
end;
end;
Procedure GetBod(ID:Cardinal);
var Flag : Boolean; // Checkup Flag
var ii,iii : Integer; // Loop Check
begin
Flag := False; // Just to setup the loop
while ( Not Flag ) do //loop until you got Bod...
begin
if ( GetDistance( ID ) > 1 ) then // Checks if NPC is too far away
begin
newMoveXY( GetX(ID) , GetY(ID) , False , 1 , True ); // Moves to NPC with tolerance 1 Tile
Wait(500); // Wait 500
end
else
begin
for ii := 0 to GetGumpsCount() - 1 do // Checking all Gumps
begin
if (( GetGumpID(ii) = BODGumpID_Small) or ( GetGumpID(ii) = BODGumpID_Large)) then // If Gump popped up
begin
if ( NumGumpButton(ii,GumpButtonPacket) ) then // Press Ok-Button
begin
exit; // Exit this procedure
end;
end;
end;
if ( GetDistance( ID ) <= 2 ) then // Secondary Check if distance is ok
begin
ClearContextMenu(); // Clear old Context Menu Data
Wait(500);
RequestContextMenu(ID); // Request Context Menu from ID; Note : Stealth knows now the whole context
Wait(1000);
SetContextMenuHook(ID,ContextMenuEntryValue); // Simple Hook to "Bulk Order Deed" in Context
end;
end;
end;
end;
begin
ProfileList :=['Crome']; //Here we fill the Array
while ( True ) do // We make here an infinite Loop with this
begin
for i := 0 to Length(ProfileList) - 1 do // Array starts with Slot 0 so if we have 10 Items we have from 0 - 9.
begin
Login(ProfileList[i]); // Call Procedure Login
GetBod(NPCID); // Call Procedure GetBod
HideCharacter(); // Call Procedure HideCharacter for Hiding char
Logout(); // Calls Procedure Logout
// Loop end for Profile
end;
exit;
Wait(Timeout);// Here we go with the Delay...
end;
end.
Very simple Script for Runuo ( shortly selfmade and 10x tested ) how to login , move to BlacksmithID , GetBod , Hide Character , Logout and Switch Profile ( Note Profile contains accountdata, but script only need profilenames => perfect for sharing).Osi have yet 1 limitation. you need to declare the Servernumber and the Characternumber before. So if Serverlist changes the value could differ. Maybe will be updated in future.
You also could expand this script in a lot of ways like :
Login at home
Get LRC Suite
Recall To Bodgiver
Scan Gump and declare if take or not
Use Bribery
Recall Home
Sort Bods
Drop LRC Suite
and much more..
const Timeout = 60000; // Declaring a Constant 60 * 1000ms( 1s = 1000ms ) = 60 Min
const NPCID = $00003011; // Here we save the ID of the NPC
const BODGumpID_Small = $9BADE6EA; // static type for small BodGumps on Runuo
const BodGumpID_Large = $A125B54A; // static type for large BodGumps on Runuo
const GumpButtonPacket = 1; // PacketValue to send "OK-Button"
const ContextMenuEntryValue = 1; // Entrypoint for Context on Runuo Sample
This could differ from Server to Server.
With Version 6.0 we will introduce the new API, so i will write a few advanced scripts in Delphi or .Net ( Not sure yet. Since i start as Delphi-Developer irl soon ... )
-
Hey its looking really good, but I am still quite new to scripting and Easyuo, which part do we need to get the script working, like I am using BOD collectors on runuo server. with 1 server, and 1 character per an account.
-
Hey its looking really good, but I am still quite new to scripting and Easyuo, which part do we need to get the script working, like I am using BOD collectors on runuo server. with 1 server, and 1 character per an account.
This snippet is for stealth not easyuo. Stealth manage login , character choosing and gameserver choosing with profiles.
A Profile determins wich client you want to use, wich version you want to emulate, wich gameserver and port you want to connect , wich account you want to use and wich char you want to connect
ProfileList :=['Crome']; //Here we fill the Array
here you can add aditional Profiles like
ProfileList :=['Anton','Bertha','Cobra','Delta']; //Here we fill the Array
Script currently selects only the Blacksmith, calling a second time GetBod(NPCID); // Call Procedure GetBod
with the ID of Tailor would add Tailorsupport ( with movement ).
If you dont need to move do if ( GetDistance( ID ) > 999 ) then // Checks if NPC is too far away
and if ( GetDistance( ID ) <= 0 ) then // Secondary Check if distance is ok
then he wont move anymore.
-
Oh that makes alot of sense why, it was not working in EasyUO lol.
I really do like stealth it seems like the future, of doing simple and complex stuff were you can script it all out, for automated task.
-
Oh that makes alot of sense why, it was not working in EasyUO lol.
I really do like stealth it seems like the future, of doing simple and complex stuff were you can script it all out, for automated task.
Easyuo, as the name mention is easy, good for beginners and semi pro users. You also can write very advanced scripts. But how more you advance you will notice Easyuo has some limitations.
Stealth use a complete otherweise technology. Some things arent easy as in easyuo or working raw good as easyuo. But how more you advance you will see in almost every aspect it works above easyuo. Pascal as Languange is also not hard, but embedded limited. Python requires a bit knowlegde but is also easy learnable.
When it comes to deeper complexity i would suggest to wait for the next release and using .Net , C++ or Delphi and handle the Stealth API instead of using the Editor.
-
When it comes to deeper complexity i would suggest to wait for the next release and using .Net , C++ or Delphi and handle the Stealth API instead of using the Editor.
8)
Stealth API ... interest threshold has been met, anticipation setting in.
-
Stealth API ... interest threshold has been met, anticipation setting in.
Indeedy!
-
When it comes to deeper complexity i would suggest to wait for the next release and using .Net , C++ or Delphi and handle the Stealth API instead of using the Editor.
8)
Stealth API ... interest threshold has been met, anticipation setting in.
Just as sidenote : Stealth have ~ 400 Methods , 32 Events wich require to be delegated by Function Pointer and ~30 custom Datatypes
Iam on dll test currently and yet it tooked ~ 2000 Lines code just to import content from stealth to .Net
-
If the Stealth API turns out to be something very interesting, I'd consider dusting off the ScriptUO project to make it so you could run and debug Stealth API scripts. If anyone tried UOMachine, it would be similar only done with MUCH less skill than Xenoglyph had. :(
-
If the Stealth API turns out to be something very interesting, I'd consider dusting off the ScriptUO project to make it so you could run and debug Stealth API scripts. If anyone tried UOMachine, it would be similar only done with MUCH less skill than Xenoglyph had. :(
The Api works as Followed :
You can write and compile an application wich use the script.dll ( its written in Delphi ).
You need to start Stealth and select your application as "Script"
you press play and Stealth will execute application and handle the data through a pipe.
Using dll standalone wont work. Dll currently have around 5000 Lines code, thats just a small piece of stealth.
For .Net iam on working for a small .Net dll handling the script.dll, the sourcecode for the handler classes will be public. So anyone who is interested in can take a look how it worked in .Net.
If Vizitor find enough time he will provide a Unit for Delphi doing same. If not i may will provide this as well.
From this point anyone will be free to do whatever he want.You could write Scripts wich interact with streams, web , databases. You also could write your own scriptlanguange with editor if you want...