annuncio

Comprimi
Ancora nessun annuncio.

[EUOX] vendor gater

Comprimi
X
 
  • Filtro
  • Ora
  • Visualizza
Elimina tutto
nuovi messaggi

  • [EUOX] vendor gater

    script is in 2 posts

    keeps u near your vendor, open several gates, takls to people.
    U still need to modify a lot to use it for your pg and your place - U can ask me by PM))

    place in several books "recalltovendorrune" + same count of runes to all books
    edit in sub talk text u want to say

    codice:
    ;===VendorGaterBot ============
    ;===Ver 1.2.1=======================
    ;===Author: Felix=================
    ;===15/05/08======================
    ;================================
    
    set #lpc 1000
    ;list of Ids that are ifnored for talking (vendors, disturbers)
    ignoreitem BWTN
    ignoreitem CBNN
    ignoreitem SXLM
    ignoreitem XQJL
    ignoreitem PEJL
    ignoreitem JVJK
    ignoreitem YQSJ
    ignoreitem UITI
    ignoreitem UDSI
    ignoreitem BMUD
    ignoreitem KSWF
    ignoreitem NENN
    ignoreitem FYSI
    ignoreitem KLSI
    ignoreitem SYLM
    ignoreitem EUPD
    ignoreitem EKOB
    ignoreitem BRWL
    
    ;amount of mana for one gate
    set %neededmanaforgate 24
    ;types of itmes that script wil dragdrop on ground considering it as somebody trie to block your movement
    set %shit CUD_UXM_TXM_HKF
    ;how far script will find person to talk to
    set %dist 9
    ;how often to talk to people
    set %saydelay 4000
    set %nextsay 0
    deleteJournal
    set %scan_journal_line #jindex
    
    set %SmthSaidForMedetation 0
    ;how often to check if gate has closed
    set %gatecheckdelay 1000
    set %nextgatecheck #systime + %gatecheckdelay
    
    ;how often to check if where is somebody to talk to
    set %talkcheckdelay 1000
    set %nexttriedtotalk #systime + %talkcheckdelay
    
    ;how often to change runebook
    set %bookchangedelay 34000
    set %nextbookchange #systime + %bookchangedelay
    
    set %posbcheckdelay 100
    set %nextposbcheck #systime + %posbcheckdelay
    
    set %LastPersonTriedToTalk 0
    set %TriedToTalkTimes 0
    ;numer of tries of talking to consider person as a disturber
    set %NTriesToIgnore 3
    
    set %Gate_button_Y_Deplacement 163
    set %Gate_button_X_Deplacement 139
    set %_defaultWaitForTimeout 20
    set %hide_own_moongates #true
    
    ;types which script will talk to
    set %beings IS_HS_XU_AV_LAB_MAB_PAB
    set %waittime 82400
    ;%wait position
    set %posxb2 1051
    set %posyb2 514
    set %poszb2 -90
    set %posxb3 1051
    set %posyb3 514
    set %poszb3 -90
    set %posxb4 1051
    set %posyb4 514
    set %poszb4 -90
    
    set %posxb5 1052
    set %posyb5 514
    set %poszb5 -90
    set %posxb6 1052
    set %posyb6 514
    set %poszb6 -90
    set %posxb7 1052
    set %posyb7 514
    set %poszb7 -90
    
    set %posxb8 1052
    set %posyb8 515
    set %poszb8 -90
    set %posxb9 1052
    set %posyb9 515
    set %poszb9 -90
    set %posxb10 1052
    set %posyb10 515
    set %poszb10 -90
    
    set %posxb11 1051
    set %posyb11 515
    set %poszb11 -90
    set %posxb12 1051
    set %posyb12 515
    set %poszb12 -90
    set %posxb1 1051
    set %posyb1 515
    set %poszb1 -90
    
    set %posxb %posxb1
    set %posyb %posyb1
    set %poszb %poszb1
    
    set %needposbchange 1
    ;array of gate positions
    set %posx1 1050
    set %posy1 515
    set %posz1 -90
    set %posx2 1050
    set %posy2 514
    set %posz2 -90
    set %posx3 1050
    set %posy3 513
    set %posz3 -90
    set %posx4 1051
    set %posy4 513
    set %posz4 -90
    set %posx5 1052
    set %posy5 513
    set %posz5 -90
    set %posx6 1053
    set %posy6 513
    set %posz6 -90
    set %posx7 1053
    set %posy7 514
    set %posz7 -90
    set %posx8 1053
    set %posy8 515
    set %posz8 -90
    set %posx9 1053
    set %posy9 516
    set %posz9 -90
    set %posx10 1052
    set %posy10 516
    set %posz10 -90
    set %posx11 1051
    set %posy11 516
    set %posz11 -90
    set %posx12 1050
    set %posy12 516
    set %posz12 -90
    set %mongate_list JEF_OTF_KEF
    
    ;length of array of gate position and array of rune numbers
    set %q 12
    
    ;array of rune books
    set %book1 FOUTUMD
    set %book2 MCAYPMD
    set %book3 GYBYPMD
    set %book4 SXHYPMD
    set %book5 HFOZJMD
    set %book6 HHOZJMD
    
    ;length of book array
    set %bookq 6
    set %booki 1
    
    ;array of rune numbers on which u want to make gate
    set %runenum1 13
    set %runenum2 2
    set %runenum3 3
    set %runenum4 4
    set %runenum5 5
    set %runenum6 6
    set %runenum7 7
    set %runenum8 8
    set %runenum9 9
    set %runenum10 10
    set %runenum11 11
    set %runenum12 12
    
    set %needreturntoposb 0
    
    
    
    for %i 1 %q
    {
      set %gatefound . %i 0
      set %gate . % i 0
    }
    
    begin:
    gosub checkgates
    loop:
    set %GateMadePerCicle #False
    for %i 1 %q
    {
        if %needposbchange = 1
        {
           gosub changeposb %i
           set %needposbchange 0
        }
        if #charposx <> %posxb || #CHARPOSY <> %posyb || #CHARPOSZ <> %poszb
        {
            gosub moveto %posxb %posyb %poszb
            if #result = blocked
            {
               sound
               gosub checkforplace
               if #result = far
               {
                gosub recalltovendor
               }
            }
        }
        if #systime > %nexttriedtotalk
        {
           set %nexttriedtotalk #systime + %talkcheckdelay
           gosub talk
        }
        if %gatefound . %i = 0 && #mana > %neededmanaforgate
        {
           set %needposbchange 1
           gosub moveto %posx . %i %posy . %i %posz . %i
           if #result <> blocked
           {
                 set %gate . %i 0
                 gosub gate %book . %booki %runenum . %i #TRUE Gate
                 if %gate . %i <> 0
                 {
                   set %GateMadePerCicle #True
                 }
           }
    
           if #charposx <> %posxb || #CHARPOSY <> %posyb || #CHARPOSZ <> %poszb
           {
                    gosub moveto %posxb %posyb %poszb
           }
    
         }
    }
    
    if #hits < #maxhits - 10
    {
       gosub heal
    }
    if %GateMadePerCicle = #False
    {
       gosub med
    }
    if #mana < %neededmanaforgate
    {
       gosub med
    }
    
    if #systime > %nextgatecheck
    {
       gosub checkgates
       set %nextgatecheck #systime + %gatecheckdelay
    }
    
    if #systime > %nextbookchange
    {
       gosub changebook
    }
    
    goto loop
    
    sub checkgates
       for %i 1 %q
       {
         set %gatefound . %i 1
       }
       for %i 1 %q
       {
         if %gate . %i <> 0
         {
            finditem %gate . %i G_ , %dist
            if #findcnt = 0
            {
               set %gatefound . %i 0
            }
         }
         if %gate . %i = 0
         {
            set %gatefound . %i 0
         }
       }
       set %needposbchange 1
    return
    
    sub changeposb
             set %posxb %posxb . %1
             set %posyb %posyb . %1
             set %poszb %poszb . %1
    
    return
    
    sub changebook
       set %nextbookchange #systime + %bookchangedelay
       set %booki %booki + 1
       if %booki = %bookq
       {
          set %booki 1
       }
    
    
    return
    
    sub checkforplace
        set %rab  #charposx - %posxb
        set %rab ABS %rab
        if %rab > 15
        {
           return far
        }
        set %rab  #charposy - %posyb
        set %rab ABS %rab
        if %rab > 15
        {
           return far
        }
        return ok
    
    sub recalltovendor
        set %dsa #CHARPOSX
        set #result N/A
        repeat
              event macro 15 31
              target 26
              if #targcurs = 1
              {
              wait 5
              set #LTargetKind 1
              set #ltargetid %book . %booki
              event macro 22 0
              wait 20
              gosub changebook
              gosub checkforplace
              }
        until #result = ok
    return
    Ultima modifica di fnurov; 16-05-2008, 03:46.

  • #2
    codice:
    sub moveto
           set %endmove #systime + 3000
           while #CHARPOSX <> %1 || #CHARPOSY <> %2
           {
                  set %nextsmalldelay #systime + 1000
                  event pathfind %1 %2 %3
                  while ( #systime < %nextsmalldelay ) && ( #CHARPOSX <> %1 || #CHARPOSY <> %2 )
                  {
                     set %jindex #jindex
                     for %jrnl %scan_journal_line #jindex
                     {
                        scanjournal %jrnl
                        if can't_get_there in #journal && : notin #journal
                        {
                          set %scan_journal_line %jindex + 1
                          return blocked
                         }
                       }
                       set %scan_journal_line %jindex + 1
                       wait 1
                  }
                 if #CHARPOSX <> %1 && #CHARPOSY <> %2
                 {
                  gosub findshit
                 }
    
                 if #systime > %endmove
                 {
                    return blocked
                 }
           }
    return
    sub findshit
        if #weight > #maxWeight
        {
           finditem %shit G_ , #backpackid
           if #findcnt > 0
           {
              exevent drag #findid
              wait 2
               set %y #charposy + 1
              exevent dropg #CHARPOSX %y #CHARPOSZ
              wait 2
           }
        }
        finditem %shit G_ , 1
        if #findcnt > 0
        {
          exevent drag #findid
          wait 2
          set %y #charposy + 2
          exevent dropg #CHARPOSX %y #CHARPOSZ
          wait 2
          sound
        }
    return
    sub talk
    talking:
    if #systime < %nextsay
    {
    return
    }
    personname:
    finditem %beings G_ , %dist
    if #findcnt <> 0
    {
    persoinfound:
    set %heard 0
    set %person #findID
    event Property #findID
    if $ notin #property
    {
       goto personname
    }
    str Pos #property $ 1
    set %rab #strres - 1
    str left #property %rab
    set %rab [
    if %rab in #strres
    {
    
       set %rabstring #strres
       str Pos %rabstring %rab 1
       set %rab #strres - 1
       str left %rabstring %rab
    
    }
    
    msg Hi,
    msg #strres
    msg !$
    
    set %SmthSaidForMedetation 1
    
    if %LastPersonTriedToTalk = %person
    {
       set %TriedToTalkTimes %TriedToTalkTimes + 1
    }
    else
    {
        set %TriedToTalkTimes 1
        set %LastPersonTriedToTalk %person
    }
    if %TriedToTalkTimes = %NTriesToIgnore
    {
       set %heard 1
    }
    
    for %j 0 2
    {
     finditem %person G_
     if #findcnt <> 0
     {
     wait 1s
     }
    }
    finditem %person G_ , %dist
    if #findcnt <> 0
    {
    event macro 1 0 I sell JEWELRY, Bods da barbed KIT, 0.1, leather, LOOT, doom SKULL
    set %heard 0
    wait 4s
    }
    finditem %person G_ , %dist
    if #findcnt <> 0
    {
    event macro 1 0 it's on my vendor
    wait 1s
    }
    finditem %person G_ , %dist
    if #findcnt <> 0
    {
    event macro 1 0 ---->
    set %heard 1
    wait 2s
    }
    finditem %person G_ , %dist
    if #findcnt <> 0
    {
    event macro 1 0 Vendor's name is BODS DA BARBED KIT
    wait 5s
    set %nextsay #systime + %saydelay
    }
    if %heard = 1
    {
    ignoreitem %person
    }
    
    }
    return
    ; ____________________________________________________
    
    ;**
    ;* Recalls from a runebook of your choice.
    ;*
    ;* @purpose  Recalls from a runebook of your choice.
    ;* @author   Sefaran (enhanced by ScriptFellow)
    ;* @param    %1  runebookid  req  ID of runebook.
    ;*           %2  runenum     req  Rune number to recall from.
    ;*           %3  bail        opt  Bail if rune is blocked (defaults to #true)
    ;*           %4  delay       opt  delay in 50 ms unit (default is 10 second)
    ;*           %5  method      opt  Scroll, Chivalry, Recall (if not given it will be autodetected)
    ;* @return   %blocked (#true or #false)
    ;* @changes  #lObjectID
    ;* @see      setup.runebook
    sub gate
    
    	set !runebookID %1
    
    	if %0 < 4 || %4 = N/A
    		set !time 200 ;10000
    	else
    		set !time %4 ;* 50
    
    	set %blocked #false
    	set !page ( %2 + 1 ) / 2
    	set !odd %2 % 2
    	set !temp 309 + %Gate_button_X_Deplacement
    	set !runeX !temp - 160 * !odd
    	set !pageX !page * 34 + 262
    	if !page > 4
    		set !pageX !pageX + 31
    _recallStart:
    	set !oldX #charPosX
    	set !oldY #charPosY
    	if #contSize = 452_236 && #contID <> !runebookID
    	{
    		set !clickX #ContPosX + 250
    		set !clickY #ContPosY + 100
    		click !clickX !ClickY R
    		gosub waitForContSizeToClose 452_236
    	}
    	if #contSize <> 452_236
    	{
    _recallOpenBook:
    		set #lObjectID !runebookID
    		event Macro 17 0
    		gosub waitForContSizeToOpen 452_236
    		if ! %return
    			goto _recallOpenBook
    	}
    	set !clickX #ContPosX - 150 + !pageX
    	set !clickY #ContPosY - 200 + 397
    	click !clickX !clickY F
    	wait %shortDelay
    	set !clickX #ContPosX - 150 + !runeX
    	set !clickY #ContPosY  + %Gate_button_Y_Deplacement
    	click !clickX !clickY F
    	gosub waitForContSizeToClose 452_236
    	set !timeout #sysTime + 10000
      set %done false
      wait 40
    _recallWaitForGate:
    	if #sysTime > !timeout
    		{
    		wait 2
    		goto _recallStart
    		}
    	finditem %mongate_list G_ , 0
    	if #FindKind = 1
    		{
    		;*msg %speech_preamble I wish you a save travel my friend...$
    		;*event macro 19
    		;*gosub remember_last_gate
    		set %gate . %i #findid
    		set %done true
    		set %scan_journal_line #jindex
    		set
    		;*if %hide_own_moongates
    		;*	{
    		;*	hideitem #FindID
    		;*	goto _recallExit
    		;*	}
    		;*wait4moongate2disappear:
    		;*wait 1
    		;*finditem %mongate_list G_0
    		;*if #FindKind = 1
    		;*	goto wait4moongate2disappear
    		goto _recallExit
    		}
    		  for %jrnl %scan_journal_line #jindex
      {
       scanjournal %jrnl
       if that_location_is_blocked in #journal && : notin #journal
       {
          set %done true
          set %scan_journal_line #jindex + 1
          goto _recallExit
       }
       if more_reagents in #journal && #CHARNAME in #journal
       {
          set %scan_journal_line #jindex + 1
          goto _recallStart
       }
       if the_spell in #journal && #CHARNAME in #journal
       {
          set %scan_journal_line #jindex + 1
          goto _recallStart
       }
      }
         set %scan_journal_line #jindex + 1
    
    
    	if #sysTime < !timeout
    		{
    		wait 2
    		goto _recallWaitForGate
    		}
    
    _recallExit:
    ;nameSpace clear
    ;nameSpace Pop
    return ok
    
    ;**
    ;* Wait for a gump to close/lose focus.
    ;*
    ;* @purpose  Wait for a gump to close/lose focus.
    ;* @author   the.WZA
    ;* @param    %1  contsize  req  Container Size (XXX_YYY).
    ;*           %2  timeout   opt  Timeout value (In .1 seconds)
    ;*           %3  return    opt  Name of return value ('return' by default)
    ;* @return   @%3 (#true or #false if timedout)
    ;* @see waitForSysVar waitForContKindToClose waitForContNameToClose waitForContSizeToOpen
    sub waitForContSizeToClose
    	if %0 < 2 || %2 = N/A
    		set %2 %_defaultWaitForTimeout
    	if %0 < 3
    		set %3 return
    	gosub waitForSysVar contSize <> %1 %2 %3
    return
    ; ____________________________________________________
    
    ;**
    ;* Wait for a gump to open/get focus.
    ;*
    ;* @purpose  Wait for a gump to open/get focus.
    ;* @author   the.WZA
    ;* @param    %1  contsize  req  Container Size (XXX_YYY).
    ;*           %2  timeout   opt  Timeout value (In .1 seconds)
    ;*           %3  return    opt  Name of return value ('return' by default)
    ;* @return   @%3 (#true or #false if timedout)
    ;* @see waitForSysVar waitForContIDToOpen waitForContKindToOpen waitForContNameToOpen waitForContSizeToClose waitForContTypeToOpen
    sub waitForContSizeToOpen
    	if %0 < 2 || %2 = N/A
    		set %2 %_defaultWaitForTimeout
    	if %0 < 3
    		set %3 return
    	gosub waitForSysVar contSize = %1 %2 %3
    return
    
    **
    ;* Compares a system variable to a value; returning when the
    ;* comparison evaluates as true.
    ;*
    ;* @purpose  Compares a system variable to a value; returning when the comparison evaluates as true.
    ;* @author   Smertrios
    ;* @param    %1  sysvar   req  Name of the system variable without the preceeding '#'.
    ;*           %2  op       req  EasyUO operator like <, >, =, in, notIn.
    ;*           %3  value    req  A value to compare with EasyUO system variable %1.
    ;*           %4  timeout  opt  Timeout value (in .1 seconds)
    ;*           %5  return   opt  Name of return value ('return' by default)
    ;* @return   @%5 (#true or #false if timedout)
    ;* @see waitForSysVar2
    sub waitForSysVar
    	if %0 < 4 || %4 = N/A
    		set %4 %_defaultWaitForTimeout
    	if %0 < 5
    		set %5 return
    	set %4 #sysTime + %4 * 100
    _waitForSysVar:
    	set % . %5 # . %1 %2 %3
    	if ! % . %5 && #sysTime < %4
    	{
    		wait 1
    		goto _waitForSysVar
    	}
    return
    
    sub med
    med:
    if #mana > #maxmana - 25
    {
     set %scan_journal_line #jindex + 1
     return
    }
    event macro 13 46
    wait 20
        if #systime > %nexttriedtotalk
        {
           set %nexttriedtotalk #systime + %talkcheckdelay
           gosub talk
        }
    for %jrnl %scan_journal_line #jindex
    {
        scanjournal %jrnl
        if enter in #journal && : notin #journal
        {
                       while #mana < #maxmana - 25
                       {
                           if #systime > %nexttriedtotalk
                           {
                              set %nexttriedtotalk #systime + %talkcheckdelay
                              set %SmthSaidForMedetation 0
                              gosub talk
                              if %SmthSaidForMedetation = 1
                              {
                                 set %scan_journal_line %jrnl + 1
                                 goto med
                              }
                           }
                           wait 2
                       }
                       set %scan_journal_line #jindex + 1
                       return
    
        }
        if peace in #journal && notin #journal
        {
           set %scan_journal_line #jindex + 1
           return
        }
    }
    set %scan_journal_line #jindex + 1
    goto med
    sub heal
        repeat
           set #ltargetid #charid
           event macro 23 0
           event macro 15 3
           target
           event macro 23 0
           goto heal
    
        until #hits > #MAXHITS - 3
    
    return
    Ultima modifica di fnurov; 16-05-2008, 04:16.

    Commenta


    • #3
      latest version. changed more than a lot

      Commenta

      Sto operando...
      X