Yoko

All sides of Injection
It is currently 2024-03-28 14:51:35

All times are UTC+02:00




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
 Post subject: problem with substring
PostPosted: 2007-02-10 16:21:36 
Offline

Joined: 2006-11-02 14:07:13
Posts: 29
Location: near Cologne, GERMANY
hi alltogether,

i try to write a little sort script (again :) )

here a snippet

Code:
sub SR()
    uo.canceltarget()
    uo.exec('addobject LootBeutel')
    while uo.targeting()
        wait(100)
    Wend
    uo.useobject('LootBeutel')

    var tZirkel1  = '0x497F5633'
    var tZirkel2  = '0x49E187B8'
    var tZirkel3  = '0x49E187BF'
    var tZirkel4  = '0x49E187D6'
    var tZirkel5  = '0x49E187DE'
    var tZirkel6  = '0x49E187E6'
    var tZirkel7  = '0x49E187EF'
    var tZirkel8  = '0x49E187F3'
    var tMusik    = '0x4875662D'
    var tArtefakt = '0x40DB7717'

    var ZeilenNummer
    var ZeilenText

    uo.FindType('-1','-1','LootBeutel')
    while uo.FindCount()
        uo.DeleteJournal()
        if uo.FindCount() then
            uo.Click('finditem')
            wait(250)
            ZeilenNummer = uo.InJournal('You see') - 1
            if ZeilenNummer > 0 then
                ZeilenText = Journal(ZeilenNummer)
                if 'Essen' in ZeilenText then
                    uo.moveitem('finditem','all',tZirkel1)
                else
                    uo.ignore('finditem')
                end if
                wait(750)
            end if
        end if
        uo.FindType('-1','-1',container)
    wend
end sub


but the line

Code:
if 'Essen' in ZeilenText then


brings up an error.

Please can you help me?

thanks

taya


Top
   
 Post subject:
PostPosted: 2007-02-10 16:23:08 
Offline

Joined: 2006-11-02 14:07:13
Posts: 29
Location: near Cologne, GERMANY
sorry. seems to be the wrong section. but i can't delete it


Top
   
 Post subject:
PostPosted: 2007-02-10 18:00:19 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
Code:
if 'Essen' in ZeilenText

Code:
if ZeilenText=="Essen"


well i think injection doesnt see the message "You see ... etc"

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2007-02-11 09:44:09 
Offline

Joined: 2006-11-02 14:07:13
Posts: 29
Location: near Cologne, GERMANY
hi NMY,

thank you for your answer. but this is not exactly what i need. the hole text is something like

4 Spruchrolle "Essen"

the 4 means there are actually 4 items in a stack. Spruchrolle is in english "mage scroll" i think. on our shard there many different of them: Essen, Trinken, Schutz, etc. (it's a german shard, yes :) )

thus i can't imagine another way to sort different scroll than to get the substring "Essen" to put it in the right bag.

how can i find this substring in string? or is it possible to use multiple inJournal? like in

Code:
if inJournal('Essen') then
    move-to-bag1
end if
if inJournal('Trinken') then
    move-to-bag2
end if
if inJournal('Schutz') then
    move-to-bag3
end if

...


thank you

taya


Top
   
 Post subject:
PostPosted: 2007-02-11 19:54:14 
Offline
Expert!
User avatar

Joined: 2005-09-14 15:31:58
Posts: 2152
Location: Latvia
yea and you must do that way and its the only way :roll:

well maybe they have different types ?its better to get type not to click

_________________
Уроки языка Injection
Основные команды языка Injection
Yoko Injection Code Sweeper
Drw (2009) скрипты
2017 Начал играть на Uorpg.net


Top
   
 Post subject:
PostPosted: 2007-02-27 00:07:53 
Offline

Joined: 2006-11-02 14:07:13
Posts: 29
Location: near Cologne, GERMANY
yeah thats the problem. they have the same type. e.g. we have diferent skulls. the normal skull in white. the troll-skull in darc grey. the deamon skill in red. the centaur skill in a kind of silver. the dragon skull in nearly the same color. and all this skulls have the same type.

thats the reason why i try it with injection. otherwise i had use easyUO. but the is no

click objectID

command :)


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

All times are UTC+02:00


Who is online

Users browsing this forum: No registered users and 24 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