Author Topic: Need some help making this work properly.... [SOLVED]  (Read 3237 times)

0 Members and 1 Guest are viewing this topic.

Offline DeadIssue2Topic starter

  • Sr. Member
  • *
  • Posts: 287
  • Activity:
    0%
  • Reputation Power: 3
  • DeadIssue2 has no influence.
  • Gender: Male
  • Respect: +21
  • Referrals: 1
    • View Profile
Need some help making this work properly.... [SOLVED]
« on: June 16, 2009, 11:47:12 AM »
0
This should be a very simple script and I think I am close but boy not so much on the working part so take a look and please make some suggestions and fixes.
The concept is a very simple one. Have a hidden tamer at the blighted grove serps farming silver. It should check silver vs weight and send silver when you hit the weight limit. It should log you out under the following conditions. If it sees a named monster ,if you take any damage while hidden (earth quake or conflag), if your plain ole dead, and right before server down so you pet doesn't go wild. Under most circumstances yeah your gonna log in dead but the silver should have been sent back to bank before death.

So with out any further ado let me know what I managed to screw up with this one.

Code: [Select]
;======================================================
; Script Name: AFK Silver Farmer w/tamer
; Auther: Deadissue
; Version: 1.0
; Shard: OSI
; Date 3/1/2009
; Purpose: Farm Silver AFK
; Globals: None
;======================================================
; Special Instructions: You will need a hidden tamer
; and a Cu. Set up the silver serps at Blighted and sit
; sit back and collect silver.
;
;======================================================
Set %monster UF_BN_QGB_FB
Set %silver RY_
Set %BOS CKF
Loop:
Gosub Serverdown
If #hits < #maxhits
   {
   Gosub Send_Silver
   Gosub Logout
   }
If #weight >= #Maxweight -50
   {
   Gosub Send_silver
   }
If #charghost = Yes
   {
   Gosub Logout
   }
FindItem %monster G_4
If #findkind <> -1
   {
   Gosub Logout
   }

;=======================================================
;                Gosub ServerDown
;=======================================================
Sub Serverdown
 if #time > 055500 && #time < 060000
    {
       gosub logout
       halt
    }
 Return
 
;=======================================================
;                 Gosub Logout
;=======================================================

Sub Logout
    event macro 8 1
    wait 2s
    contpos 820 0
    wait 5
    click 1030 110
    wait 2s
    contpos 0 0
    wait 5
    click 125 85
    wait 10s
    Halt
    
;=======================================================
;                   Gosub Send_Silver
;=======================================================
Sub Send_Silver
    Finditem %silver c_ , #backpackid
    if #findkind <> -1
       {
        set #lobjectid %BOS
        event macro 17
        target
        if #targcurs <> 1
        set #ltargetid #findid
        set #ltargetkind 1
        event macro 22
       }
return
[code]
[/code]
« Last Edit: June 24, 2009, 10:52:40 AM by TrailMyx »

Offline rana70

  • Elite
  • *
  • *
  • Posts: 294
  • Activity:
    0%
  • Reputation Power: 5
  • rana70 has no influence.
  • Gender: Male
  • Respect: +37
  • Referrals: 2
    • View Profile
    • MyScripts
Re: Need some help making this work properly....
« Reply #1 on: June 16, 2009, 12:30:32 PM »
0
Hi,

maybe I am wrong .. but if nothing should happend
that causes logout ...

when do you go back to your
Loop:

Label ?

Did I miss the Goto ?

cu

Offline DeadIssue2Topic starter

  • Sr. Member
  • *
  • Posts: 287
  • Activity:
    0%
  • Reputation Power: 3
  • DeadIssue2 has no influence.
  • Gender: Male
  • Respect: +21
  • Referrals: 1
    • View Profile
Re: Need some help making this work properly....
« Reply #2 on: June 16, 2009, 12:48:12 PM »
0
Boy did you miss the goto alright.... actually no I missed it :)

Offline TrailMyx

  • Officially retired from UO
  • Administrator
  • *
  • *
  • Posts: 13303
  • Activity:
    0.4%
  • Reputation Power: 154
  • TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!TrailMyx is awe-inspiring!
  • Gender: Male
  • Viper!
  • Respect: +1349
  • Referrals: 33
    • View Profile
    • ScriptUO
Re: Need some help making this work properly....
« Reply #3 on: June 16, 2009, 12:59:35 PM »
0
And the SUO syntax checker won't actually catch that since it's not really a syntax error to just have labels.  ;)
Please read the ScriptUO site RULES
Come play RIFT with me!

Tags: