Author Topic: Need help converting script {BOD}  (Read 12501 times)

0 Members and 1 Guest are viewing this topic.

Offline AaronGRTopic starter

  • Newbie
  • *
  • Posts: 7
  • Activity:
    0%
  • Reputation Power: 1
  • AaronGR has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Need help converting script {BOD}
« on: May 23, 2013, 11:40:17 PM »
0
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.  

Code: [Select]
// 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
« Last Edit: May 23, 2013, 11:43:57 PM by AaronGR »

Offline Alpha

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: Need help converting script {BOD}
« Reply #1 on: May 24, 2013, 01:04:10 PM »
0
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.

Offline AaronGRTopic starter

  • Newbie
  • *
  • Posts: 7
  • Activity:
    0%
  • Reputation Power: 1
  • AaronGR has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Need help converting script {BOD}
« Reply #2 on: May 24, 2013, 02:40:09 PM »
0
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.

Offline Alpha

  • Hero Member
  • *
  • Posts: 583
  • Activity:
    0%
  • Reputation Power: 10
  • Alpha barely matters.Alpha barely matters.
  • Respect: +44
  • Referrals: 0
    • View Profile
Re: Need help converting script {BOD}
« Reply #3 on: May 24, 2013, 08:56:29 PM »
0
http://www.scriptuo.com/index.php?topic=803.0

Here is C2's login script...its quite nice.

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Need help converting script {BOD}
« Reply #4 on: May 25, 2013, 02:14:17 AM »
0
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.

Code: [Select]
Connect(); And your Account will be connected within 2-10 seconds

Code: [Select]
Changeprofile(Name); And you can switch profile within 2-5 Seconds and manage accounts

Code: [Select]
if ( not Hidden() ) then UseSkill('Hiding'); checks if you need to hide

Code: [Select]
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
Code: [Select]
disconnect();

Offline Masscre

  • Gran Master Jester !!
  • Scripthack
  • *
  • Posts: 4615
  • Activity:
    0%
  • Reputation Power: 55
  • Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!Masscre is leading the good life!
  • Gender: Male
  • Air Guitar Commander !!
  • Respect: +144
  • Referrals: 1
    • View Profile
Re: Need help converting script {BOD}
« Reply #5 on: May 28, 2013, 08:47:08 AM »
0
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.

Offline dxrom

  • Master of the milestones!
  • Elite
  • *
  • *
  • Posts: 1080
  • Activity:
    0%
  • Reputation Power: 15
  • dxrom is working their way up.dxrom is working their way up.dxrom is working their way up.
  • KEYBOARD COWBOY, GREAT SAMURAI OF THE INTERNET.
  • Respect: +100
  • Referrals: 1
    • View Profile
Re: Need help converting script {BOD}
« Reply #6 on: May 28, 2013, 09:09:17 AM »
0
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 do say, ol' Chap! Come play EVE Online! Why here is a 21 Day Free Trial!

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Need help converting script {BOD}
« Reply #7 on: May 28, 2013, 09:09:35 AM »
0
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 ;-) )

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Need help converting script {BOD}
« Reply #8 on: May 28, 2013, 09:13:28 AM »
0
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 ;)

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Need help converting script {BOD}
« Reply #9 on: May 28, 2013, 10:31:26 AM »
0
Code: [Select]
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..

Code: [Select]
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 ... )
« Last Edit: May 28, 2013, 10:35:48 AM by Crome969 »

Offline AaronGRTopic starter

  • Newbie
  • *
  • Posts: 7
  • Activity:
    0%
  • Reputation Power: 1
  • AaronGR has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Need help converting script {BOD}
« Reply #10 on: May 29, 2013, 11:18:24 PM »
0
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.

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Need help converting script {BOD}
« Reply #11 on: May 30, 2013, 05:52:36 AM »
0
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

Code: [Select]
ProfileList :=['Crome']; //Here we fill the Arrayhere you can add aditional Profiles like
Code: [Select]
ProfileList :=['Anton','Bertha','Cobra','Delta']; //Here we fill the ArrayScript currently selects only the Blacksmith, calling a second time
Code: [Select]
GetBod(NPCID); // Call Procedure GetBod with the ID of Tailor would add Tailorsupport ( with movement ).
If you dont need to move do
Code: [Select]
if ( GetDistance( ID ) > 999 ) then // Checks if NPC is too far away and
Code: [Select]
if ( GetDistance( ID ) <= 0 ) then // Secondary Check if distance is ok then he wont move anymore.

Offline AaronGRTopic starter

  • Newbie
  • *
  • Posts: 7
  • Activity:
    0%
  • Reputation Power: 1
  • AaronGR has no influence.
  • Respect: 0
  • Referrals: 0
    • View Profile
Re: Need help converting script {BOD}
« Reply #12 on: May 30, 2013, 07:34:19 AM »
0
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.

Offline Crome969

  • Moderator
  • *
  • *****
  • Posts: 2098
  • Activity:
    0%
  • Reputation Power: 25
  • Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.Crome969 is on the verge of being accepted.
  • Gender: Male
  • UO Enthusiast
  • Respect: +211
  • Referrals: 10
    • View Profile
    • ScriptSDK
Re: Need help converting script {BOD}
« Reply #13 on: May 30, 2013, 08:10:41 AM »
0
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.

Offline ximan

  • Jr. Member
  • **
  • Posts: 98
  • Activity:
    0%
  • Reputation Power: 1
  • ximan has no influence.
  • Respect: +16
  • Referrals: 1
    • View Profile
Re: Need help converting script {BOD}
« Reply #14 on: May 30, 2013, 08:20:39 AM »
0
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.

Tags: BOD  Script