Yoko
http://forum.yoko.com.ua/

Need help for verys easy script
http://forum.yoko.com.ua/viewtopic.php?f=20&t=4865
Page 1 of 1

Author:  Sombre [ 2005-08-18 23:56:59 ]
Post subject:  Need help for verys easy script

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.

Author:  flake [ 2005-08-19 01:27:28 ]
Post subject: 

Here you go, sorry for my spelling

Code:
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

Author:  Sombre [ 2005-08-19 10:37:02 ]
Post subject: 

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.

Author:  flake [ 2005-08-19 11:18:51 ]
Post subject: 

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.

Author:  Sombre [ 2005-08-20 21:02:44 ]
Post subject: 

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

Author:  flake [ 2005-08-21 02:31:41 ]
Post subject: 

Code:
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

Page 1 of 1 All times are UTC+02:00
Powered by phpBB® Forum Software © phpBB Limited
https://www.phpbb.com/