Yoko

All sides of Injection
It is currently 2026-01-17 21:01:05

All times are UTC+02:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 2004-12-24 18:38:10 
Offline
User avatar

Joined: 2004-08-02 14:11:24
Posts: 8
First of all I want to say what I want to reach...

I've made script which use heavy crossbow, load time depends on DEX (in journal information is line:

weapon load time: 8943ms

So, I'm looking for this line, get it and use time in ms for wait before next action I do... My problem is that when i'm using this scripot from hide I've never success ... Output is similar but in journal added one line:


weapon load time: 8943ms
Only daggers cab be used...

So look at my script and try point me...

Code:
sub hxb()
;define variables weaponms and pause are reset later in script
 var steps = 10
 var weaponms = 8000
 var pause = 0
 var text = ""
 var hodnota = 0

;---do not edit bellow---
uo.deletejournal()
uo.exec('terminate stealth')
;this  action with heavy crossbow in hand produce line:
;weapon load time: xxxxms
;in hide mode produces 2 lines and in this mode doesn't work
;weapon load time: xxxxms
;Only daggers can be used....
uo.attack("lastattack")   

while NOT UO.InJournal("weapon load time")
   wait(50)
wend
if UO.InJournal("weapon load time") then
;get value of loading weapon
   weaponms = val( mid( uo.journal ( uo.InJournal(0)) ,18,4 ))
;I want shoot from hide mode so minus 250ms is needed for unhide for ex. say shooting ....
 weaponms = weaponms - 250
 pause = weaponms/steps
; uo.print(STR(weaponms))
; uo.print(val(weaponms))
endif

;arm heavy crossbow and finally attack last, now we know weapon load time
 uo.arm("3")
 uo.attack("lastattack")   
;to xx steps before shoot - good for showing how much time i have before  shooting
   for var i=1 to steps
    wait(pause)   
    weaponms=weaponms-pause
      uo.print("------------------" +STR(weaponms)+ "###" +STR(steps-i) )
   next
;needed for unhide and shoot
 uo.serverprint("BOOM")
 uo.serverprint(".warmode off")
end sub


Top
   
PostPosted: 2004-12-30 23:19:06 
Offline
User avatar

Joined: 2004-08-02 14:11:24
Posts: 8
god wrote:
First of all I want to say what I want to reach...

I've made script which use heavy crossbow, load time depends on DEX (in journal information is line:

weapon load time: 8943ms

So, I'm looking for this line, get it and use time in ms for wait before next action I do... My problem is that when i'm using this scripot from hide I've never success ... Output is similar but in journal added one line:

[/code]


Thanks for help mates!

Incredible that nobody answered me :)

I've found out how to do it.. So I used this:
Code:
uo.exec("filterspeech on")
uo.exec("filterspeech add 'Only daggers can be used for backstabing.'")


to suppress an output in journal and it is enough.. Might can be usefull for you...

bye bye


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 2 posts ] 

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited