Need help for verys easy script

Anything and all.

Moderators: Murderator+, Murderator

Post Reply
Sombre
Posts: 3
Joined: 2005-08-14 15:05:12

Need help for verys easy script

Post by Sombre »

First i would like to apologize for not being able to write to you in russian.
I recently discovered injection and this program changed my uo life :D

I need your help for a very easy script. i tried to do it by myself but my scripting skills are too bad :P

Okay all i need is a little script that constantly checks in the journal for an event (the you put the gold coin in you pack message).

When this event apears in the journal, id like my character to say something in the game.

Thats it ! its probably a very easy script but couldnt get it to work by myself.

Thanks a lot in advance,

Best regards.
flake
Expert!
Posts: 746
Joined: 2004-08-11 23:56:17
Location: The Citadel
Contact:

Post by flake »

Here you go, sorry for my spelling

Code: Select all

sub Coins()
VAR CoinsMsg = 'you put'  ; the message that appears after you put the coins in your pack
VAR SayMsg = 'Thanks dude!' ; what you want to say
UO.DeleteJournal()  ; first, we delete the journal so that the script won't react to privious events.
  Repeat   
    wait(100)  ; a dynamic wait cycle, which will wait until the phrase written in the CoinsMsg variable appears
  Until UO.InJournal(  CoinsMsg  )
    UO.MSG( SayMsg )  ; after the awaited phrase appears, we say our mesage, which is written in the SayMsg variable.
endsub
Sombre
Posts: 3
Joined: 2005-08-14 15:05:12

Post by Sombre »

Thanks a lot for the quick answer

It seems to be exactly what i need, the only thing is that the script is not working, as if it wasnt able to read the journal.

Do you think its not working because im playing on a free shard (using sphere)? its pretty weird.
flake
Expert!
Posts: 746
Joined: 2004-08-11 23:56:17
Location: The Citadel
Contact:

Post by flake »

Almost all of us are here play on free shards (sphere rulez!).
Now, about the script: put the coins in your backpack, and then print ,showjournal and check out what message appears there regarding to the coins. Then insert it to the variable.
Sombre
Posts: 3
Joined: 2005-08-14 15:05:12

Post by Sombre »

Ok it works now :D but the script is only working once then i have to run it again... any idea (and sorry for all these newbie questions :wink: )

Thanks again for all the help
flake
Expert!
Posts: 746
Joined: 2004-08-11 23:56:17
Location: The Citadel
Contact:

Post by flake »

Code: Select all

sub Coins() 
VAR CoinsMsg = 'you put' 
VAR SayMsg = 'Thanks dude!'
  Repeat
    UO.DeleteJournal() 
      Repeat   
        wait(100)   
      Until UO.InJournal(  CoinsMsg  )
    UO.MSG( SayMsg )   
    Wait(1000)
  Until UO.Dead()
endsub
Post Reply