Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Crome969

Pages: 1 2 3 [4]
46
OEUO Snippets / [OUO-Library] Bag of Sending and related functions.
« on: August 08, 2011, 12:20:30 PM »
Good Evening everyone,
i take the part and publish my small but useful Library for handling Bag of sending.

Requirements:

Only Requirement is binding Kal In Ex Finditem before you use the functions.

Functions:

Code: [Select]
GetBos() --> Returns an ID of a Bag of Sending or a Error Message
Code: [Select]
ChargeBos(ID of Bag of Sending,Minimum Charges to Trigger) --> Recharge Bos if its uses < of the Trigger & you have PoT in your BackpackID
Code: [Select]
GetCharges(Id of Bag of Sending)--> Analyze Bag of Sending and Return the Charges as Integer
Code: [Select]
BosSending(ID of Bag of Sending,table of ID or Types you wanna send)--> Sending as Description say Sending Items as long as you have Charges for it:)

Credits
Kal In Ex --> Finditems.lua
Myself for the lib
Scriptuo.com for Testing and let me participate this Community


Crome

47
OpenEUO Scripts / [OUO] Gimme more Imbuing Powerscrolls! by Crome
« on: August 04, 2011, 10:06:25 AM »
Hello Community,

Following the wish of HardY of http://www.scriptuo.com/index.php?topic=7904.msg69974#new I wrote a small Script just to do that Quest at Ter Mur Royal City Soulforge.

Setup
Code: [Select]
dofile(getinstalldir().."Init.Lua")I use my own Collection of Library file. You need to get Kal in Ex Finditem Lib
from http://www.easyuo.com/forum/viewtopic.php?t=43949
and Change this line like Kal in Ex suggest in his Script.

Code: [Select]
QuestID = 0 --If you dont know do 0if you always run same Guy you can insert his ID else just leave it as 0 and use Setup of script.

Code: [Select]
QuestItemID = 11698
-- 11697 Magical Residue
-- 11698 Enchanced Essence
-- 11699 Relic Fragments
Just enter Type of the Item you need for your Wanted Script.
The 3 Types u can use are under that line in the comment "--"

Then just press Play and wait..

FAQ
Does script Restock or sort?
-No, just a simple questmaker.
I gaved my Char 2 times 500 essences and it needet about 15 seconds to fullfill 20 Times that Quest. Then i used Scrollbinder and had a 120 Imbuing in just 15Seconds!!

Have Fun!
Kind Regards

Crome

48
OpenEUO Scripts / [OUO] Heartwood Fletcher Runic Farmer by Crome
« on: August 04, 2011, 09:27:32 AM »

49
OEUO Snippets /
« on: August 03, 2011, 11:59:38 PM »
Good Morning Community,
today i will give out some snippets of my Baselibrary.
Some are easy, some are small.. maybe some will help.

Cloning #scnt and #scnt2:

Code: [Select]
--################################--
--@scnt()
--@Purpose : Returns CurTime in Seconds
--################################--
function Scnt()
nHour,nMinute,nSeconds,nMiliSeconds = gettime()
return ((nHour*3600) + (nMinute*60)+nSeconds)
end
--################################--
--@scnt2()
--@Purpose : Returns CurTime in MiliSeconds
--################################--
function Scnt2()
nHour,nMinute,nSeconds,nMiliSeconds = gettime()
return (((nHour*3600) + (nMinute*60)+nSeconds)*10)+nMiliSeconds
end
tried to copy the #scnt and #scnt2 from easyuo:)
example:

Code: [Select]
delay = Scnt()
if(Scnt()>Delay)then
--yourCode
end


Targeting like Target s in easyuo:


Code: [Select]
--################################--
--@WaitForCursor(timeout)
--@Purpose : Simplify Shouting
--################################--
function WaitForCursor(timeout)
tmptime = timeout * 1000
for mytimeout = 1, tmptime do
if(UO.TargCurs==false)then
wait(1)
end
end
end
same function like "target 1s" is possible.
example:
Code: [Select]
WaitForCursor(5)will wait until TargCurs = true or maximum 5 seconds. Helpfull for Scripts wich use targeting via Spells or such things.

Gather Bag of Sending ID :

Code: [Select]
--################################--
--@GetBagofSending(timeout)
--@Purpose : Simplify Shouting
--@Attention! dont work Standalone!
--@Library needet : Kal In Ex Finditem
--################################--
function GetBosID()
tmp=ScanItems(true,{Name="A Bag Of Sending"},{ID=IT})
if(#tmp==0)then
print("No Bag Of Sending found get a Bag and Press play again")
pause()
GetBosID()
end
return tmp[1].ID
end
You will need Kal in Ex Finditem to use this.
Example :
Code: [Select]
BOS = GetBosID()returns ID of Bag of Sending in Backpack in BOS

Find out the Amount of Charges at BOS
Code: [Select]
--################################--
--@GetBagofSendingCharges(ID)
--@Purpose :Returns Amount of Charges of BOS
--################################--
function GetBagofSendingCharges(BosID)
sName,sInfo = UO.Property(BosID)
b,c =string.find(sInfo,"Charges: ")
c = c + 1
return (string.sub(sInfo,c,#sInfo))
end
Simple, you want to refill your Bos when its smaller than x uses? just ask via function how many uses you have left!:)
Example:
Code: [Select]
Charges = GetBagofSendingCharges(BOS)
print(Charges)


Weight and Maxweight interactions:
If you want to make interactions when you nearly reach your maxweight:
Code: [Select]
--################################--
--@function WeightoverLimit(Factor)
--@Purpose : Returns true if Weight > % of Maxweight
--################################--
function WeightoverLimit(Factor)
if(UO.Weight>(UO.MaxWeight*(Factor/100)))then
return true
else
return false
end
end

Example:
Code: [Select]
WeightoverLimit(69)It checks if your Weight is bigger than 69% of Maxweight.

50
OEUO Snippets /
« on: August 02, 2011, 10:36:09 PM »
Hello Scripuo Community,
do you know the Problem?
you want to walk in a specific amount of Tiles and must look at Charposition calulcate tiles or give a static Position?
Why cant this be a variable?
Today i want to show you a small Solution:

Code: [Select]
--########################################
--@Name          MoveTiles
--@Author        Crome696
--@Purpose       Move in looking direction or reversed direction
--@ReleaseDate 08\01\11
--@Version        1.0
--@TestedClient 7.0.16.1
--@TestShard    Osi\Osiclone
--########################################           
function MoveTiles(tmpTiles,tmprev,tolerance,timeout)
dir = UO.CharDir + 1
rev = {5,6,7,8,1,2,3,4}
if(tmprev==true)then tmpdir = rev[dir] else tmpdir = dir end
mpath = {}
mpath[1] = {(UO.CharPosX ),(UO.CharPosY - tmpTiles)}
mpath[2] = {(UO.CharPosX + tmpTiles),(UO.CharPosY - tmpTiles)}
mpath[3] = {(UO.CharPosX + tmpTiles),(UO.CharPosY)}
mpath[4] = {(UO.CharPosX + tmpTiles),(UO.CharPosY + tmpTiles)}
mpath[5] = {(UO.CharPosX ),(UO.CharPosY + tmpTiles)}
mpath[6] = {(UO.CharPosX - tmpTiles),(UO.CharPosY + tmpTiles)}
mpath[7] = {(UO.CharPosX - tmpTiles),(UO.CharPosY - tmpTiles)}
mpath[8] = {(UO.CharPosX - tmpTiles),(UO.CharPosY - tmpTiles)}
UO.Move(mpath[tmpdir][1],mpath[tmpdir][2],tolerance,timeout)
end

This function will move your Char in specific Tiles forward or reversed.

[/URL]
Example:
Code: [Select]
MoveTiles(1,false,0,0)You are Looking in Chardirection "0" then it will move 1 Tile in direction 0 without a timeout and 0 tiles tolerance
Code: [Select]
MoveTiles(1,true,0,0)Now reversing is enabled so it will move 1 tile in Chardirection 4 (Opposite of 0, view Picture)
if you set tolerance > 1 it will be done with moving if Char is within the tolerance range to wanted Tile Range.
If you set timeout >1 Moving is finished when it reached time > timeout seconds.

Usage:
In some of my Scripts i need to runaway from target. Like you need to heal or lure Monsters away. So you can use this function to move away.
Other Usage is maybe in Tilebased Skilling Scripts. you now dont need to look on your Charposition and calculate 8 tiles just use:
Code: [Select]
MoveTiles(8,true,0,0)
Hope it will be Useful for you guys,too.

Kind regards

Crome

51
OpenEUO Scripting Tutorials / Idea to fix Repeat\Goto
« on: July 29, 2011, 11:16:23 AM »
Hello Community,
i noticed in TMs Pathfind that he working a lot with breaks
i thought a little bit about this issue and have maybe a solution:

function Goto(Mode,Statement)
if(Mode=="Set")then
myMode = Statement
end
if(Mode=="Get")then
Return MyMode
end
end




while(Goto("Get",false)==true)do -- ask if Goto true
.... --Your Code
if(...)and(Goto("Get",false)==true)then
... --Your Code
else
Goto("Set",true) -- set Goto to false and end loop
end
end

Its nearly like i solve my Problems

Another Possibility is to insert the looped Code in a function with a return
Example:

function Yourfunction(Yourparameter)
.. -- Your Code here
return "anyStatement" -- true or false
end

and then make


a = false
while(Yourfunction(Yourparameter)==false)do
 a = Yourfunction(Yourparameter)
end


Iam fresh to Openuo but maybe this Idea helps someone of you

best Regards Crome

52
Scripting Chat / usage and invoking of uo.dll[Question]
« on: June 25, 2011, 09:42:45 AM »
Hello Ladys and Gentleman,
this Question is mostly on these of you, wich ever used the uo.dll in other IDE than Openuo.
I always getting a Headdache about. Seems like i dont like Lua as much, or its just because i know how comfortable can be an IDE like from Sharpdevelop or VS2010 Ultimate.
In my Company i learning C# and VB.net. My Idea was to Coding and Learning in Future with C# and as example using i could combine it with Ultima Online. Anyone of you were be able to invoke\import that dll?
Iam not a complete newbie but an Developer Trainee, so maybe i miss the Experience how to or just dont understand how to. Using since days the whole Web to Learn and test to invoke that dll. But werent be able to use any kind of there functions. Anyone have else have it done? Maybe an Idea or an example? I would be very Thankful about that.
Best Regards Crome

PS: Iam back to be active here:)

53
Scripting Chat / Reveal the Shadow Knight in Gauntlet!(Dexxer)
« on: August 08, 2010, 02:38:01 PM »
Good Evening Everyone,

Its me iam a bit back to Ultima and here comes directly a Question to all you Elite Scripter! :D
Iam Currently in the Gauntlet Again and Try to Figure Out how i can Reveal the Shadow knight per Script as best.
The Situation:
Iam an Dexxer with Magery and GM Tracking.
I want Get The Position of the hidden Shadow knight by a Function wich can get his Coords.
I use Tracking and Target the Shadow Knight, a Arrow Appears.
Now i had this once:
I got a Gump Information with #CONTID KJB; #Contposx 351: #contposy 71
I know wanted to Calculate a Moving Function wich runs so long to X and y until it reaches 276_183.
Now the Problem:
I only Got this Gump once by Doubleclick it. Never Again
-Question: How i can Force the Information when i dont have the Chance to get an ID?

Possibility:
I though about Using OCR and Scanning the Complete Window
But if i must Scan the Complete Game Window for Each Move it will Takes a Hour to Find the Boss
Possibility2:
Use Bleed to Scan the Blood on the Ground to locate the Position
But What if i dont hit with bleed in the right Second?
When u Use a Cu Sidhe u will find often theblodd but when not u have still a problem.
Possibility3:
(Untested)
Is It Possible to Scan for the Teleportation Animation?
Then it should be a Loop wich scans all The time for the Animation
End if he Find he should save the Find Coords of the Last Succes Scan.
Problem: How to  Find a Unknow ID wich only appears Rarely?


Any Ideas About??
Anyone have a Tested useful Sequence of it?
Would be Awesome!!!!


Best Regards Crome

54
Scripting Chat / Reveal the Dark_Knight in Gauntlet?
« on: September 02, 2009, 09:28:46 AM »
Hi Folks,
i stay at a Problem.
Iam Writing a Gauntlet Script, and now i stay at the Dark Knight, i got a Script snipped from a Friend , who have a Experiment Sub in his Version , but his version only Scan for Blood on ground , and thats a big problem if the Monster isnt bleedet , and your pet lost the Trace.
Maybe someone of you have an Idea?
i post now the Snippet where you see how he scan

Code: [Select]
Finditem XC G_25
          if #findcnt <> 0 && %Bosstype = NO
          {
          Set %Teleports #FindCnt
          Set %SKX1 #FindX
          Set %SKY1 #FindY
          Gosub Check_Reveal
          }


sub Check_Reveal
Finditem %currentboss G_25
if #findkind <> -1
{
return
}
Event ExMsg #CharID 3 30 Found : #FindCnt

If %Teleports = 2
   {
   Set #FindIndex 2
   Set %SKX2 #FindX
   Set %SKY2 #FindY
   }

Set %RevealTimer #SCnt

   For %Reveal 1 %Teleports
      {
      Move %SKX . %Reveal %SKY . %Reveal 5 1s

      If %Revealing = Mage
         {
         Event Macro 15 47 ; Reveal
         }
         Else
         {
         Event Macro 13 14 ; Detect Hidden
         }

         Target 3s
         Wait 1s
         Set #LTargetX %SKX . %Reveal
         Set #LTargetY %SKY . %Reveal
         Set #LTargetZ -1
         Set #LTargetKind 2
         Event ExMsg #CharID 3 30 Revealing : %SKX . %Reveal - %SKY . %Reveal
         Event Macro 22
      }
         Return
XC ; Should be the Blood
%Bosstype = NO ; Means the Type of the Boss in this Case the Dark Knight
%currentboss = ;Declares the ID of the Current Boss
%Revealing = Mage ; Comes from a Extern Setup wich i madet wich checks the Typ of the Detect , Mage or Detect Hidden
Any Idea? for a nearly 100% Search wich doesnt looks like a Script?

55
Scripting Chat / Tracking Arrow Detection
« on: July 26, 2009, 02:27:23 AM »
Hey Ladys and Gentlemans,

I wanna Ask about the Detection of the Tracking Arrow.
Why? Iam now Rewrtite a Doom Gauntlet Script i Got
And seek for a 100% Possibility to Find the Dark Knight.
My Way now is Look where the Cu sidh Ran and use this as Default finding. but dunno how good it works
if Multiple Mobs or anything else is in the Room.

My Idea is :
Ignore all Corpse
Scan For ID of Current Darknight
if = -1
Repeat

{
Use the Tracking Interaction to Find the Boss
}
Until Tracking is Succed
Repeat
{
Use Detection Hidden
}
Until The ENEMY ID is foundet
Kill the Enemy

If Script Rdy and Debugged i have no problem to Share it here :-)

56
Inactive Submissions / Journal Reader\ Talker
« on: July 24, 2009, 05:52:30 AM »
Here is a New Script iam Testing and Writing by myself.
It reads Journal , Ignores "you see" and Wrote them in Menu . if you enter Text in Menu the selected Character Talk .-) Excelent for Multiaccounting :-)


Code: [Select]
;#######################################################
;#Creator : Crome696                                   #
;#ProjectStart :24\06\2009                             #
;#Release : Public\Scriptuo Exclusive                  #
;#Script Name : Journal Read & Write                   #
;#Development Tool : Scriptuo V2.44                    #
;#Used Shard : Raistlins World\Vetus-Mundus\Drachenfels#
;#######################################################
  set #lpc 1000
set %String 1
menu Clear
Gosub Showeuomenu1
set %Index #jindex + 1
Start:
if #MENUBUTTON = Send
{
menu Get Message
set %Message #menures
msg %message $
set #MENUBUTTON N/A
}
if #jindex > %Index
{
Scanjournal #jindex
if you_see notin #journal
{
menu List add EUOListBox1 #journal
menu List Select EUOListBox1 %String
set %String %String + 1
}
set %Index %index + 1
}
goto start



;--------- EasyUO Menu Designer Code Begin ---------
sub showEUOMenu1
menu Clear
menu Window Title EasyUo JournalScript
menu Window Color BtnFace
menu Window Size 458 235
menu Font Transparent #true
menu Font Align Right
menu Font Name MS Sans Serif
menu Font Size 8
menu Font Style
menu Font Color WindowText
menu Font BGColor Window
menu Edit Message 44 188 289 Enter , #spc , Text
menu Font BGColor BtnFace
menu Button Send 344 188 65 21 Send
menu Font BGColor Window
menu List Create EUOListBox1 44 24 285 145
menu Show 421 270
set #MENUBUTTON N/A
return
;--------- EasyUO Menu Designer Code End ---------
[/sup]

57
Freeshard specific scripts / Heartwood Fletcher Quest for Bolts
« on: July 02, 2009, 09:13:04 AM »
Crome696 Presents:

Freeshard Fletcherrunic & Recipe Maker

How to use it?
First of all you need Bolts (its good if you own like 1-2k in your Backpack
Then you need 3 Bags
Bag One:
For your RARE Recipes
Bag Two:
For your Runic Tools
Bag Three:
For your Regular Recipes (only if you like it, Accept it in Menu)

Then pls get a Trashbag (Trashbarrel is useable , too)
The Script will Trash anything *bleep* else what you dont acceptet.
and it wil stop if you have 100 Items in your Backpack.
To make the script as best use one NPC in Heartwood and accept the "Simple Bow" quest
because it have the same amount of Pixel as The Lethal Dart

Start the Script and Following the Introdruce of the Script


Informations:
Version currently : 0.9
Duration Time each Quest: Between 20-40 Seconds
Known Bugs:
-Error in Menu (wrong Display of the "regular Recipe Amount")


58
Scripting Chat / Another Way for Heartwood Quest?
« on: January 05, 2009, 12:43:35 PM »
Hi @ all
my Last Work is a Heartwood Questmaker 4 Freeshards (that can have Mobile Banks )
now i`ve Got the 'problem i must to identificate The Quests (  i use only the Quests who need  Low Ressources) use Ocr  >:(
Are There other Ways?

Greetz Crome

Pages: 1 2 3 [4]