Hi!
I need a script that if I Say "Destroyer" in game, or Destr, or Des, the script search a player called like that ad add it to objects.
it's possible?
[HELP] I Need script for target
Moderators: Murderator+, Murderator
before start scripts delete journal text with destr by uo.deletejournal() or by deljournal() (custom func, find it in this forum, also find checklag())
...
if uo.injournal('des') then
...
check that Track world items is ON
find players (0x0190 and 0x0191) on the ground
click and get their names
use 2 funcs -
so if findentry() gives number bigger than -1 - there is des in name, than get it's serial
...
if uo.injournal('des') then
...
check that Track world items is ON
find players (0x0190 and 0x0191) on the ground
click and get their names
use 2 funcs -
Code: Select all
sub getnam(id)
var timez,t1="World save has been initiated"
deljournal(t1)
if uo.getname(id)=='' then
uo.click(id)
timez=uo.timer()+10
while timez>uo.timer() and uo.getname(id)==''
if uo.injournal(t1) then
deljournal(t1)
checklag()
timez=uo.timer()+10
endif
wait(100)
wend
if timez<uo.timer() then
return false
endif
endif
return uo.getname(id)
endsub
Code: Select all
# finds one string in another
; int findentry( string, string )
; entry - what we seek for
; str - in which string
sub findentry(entry,str)
var i
for i=0 to strlen(str)-strlen(entry)
if mid(str,i,strlen(entry))==entry then
return i
endif
next
return -1
endsub
so if findentry() gives number bigger than -1 - there is des in name, than get it's serial
**Выставляем отступы в скриптах*** ©Destruction
Feel the Power of Dark Side
Feel the Power of Dark Side
Re: [HELP] I Need script for target
Azt wrote:Hi!
I need a script that if I Say "Destroyer" in game, or Destr, or Des, the script search a player called like that ad add it to objects.
it's possible?
I would search the journal, get the serial and set laststatus/lastattack/lasttarget with this serial so you can attack imediatly.
To filter it from regular speech you can make it work using some symbol - for example
:Nickname - would trigger the script.
Why do you need such thing anyway? For PvP? That's a lame pvp if you ask me.
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net
Try to never use wait(X) where X<100
MUCH bigger chance of crash or unhandled exception in parser
MUCH bigger chance of crash or unhandled exception in parser
**Выставляем отступы в скриптах*** ©Destruction
Feel the Power of Dark Side
Feel the Power of Dark Side
string of check will be like that:
IF uo.findentry('Destroyer',getnam(uo.getserial('finditem'))) then
IF uo.findentry('Destroyer',getnam(uo.getserial('finditem'))) then
**Выставляем отступы в скриптах*** ©Destruction
Feel the Power of Dark Side
Feel the Power of Dark Side