ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: silentsentinel on April 16, 2009, 09:46:44 AM

Title: Escort/Compassion Script?
Post by: silentsentinel on April 16, 2009, 09:46:44 AM
Hi guys, am new here, I've scoured around the net and have not come up with anything really useful. I'm looking for an AFK/semi-afk Compassion/Escort running script.

I realize it's not much gold income but I've seen a few people scripting it and can't find any good starter script.

Any chance someone could point me in the right direction? I'm competent enough to fix issues or make tweaks to scripts, but I'd really like to get something half started so I don't have to completely re-invent the wheel, I'm sure it's already been done in the past

Thanks all for any input!
Title: Re: Escort/Compassion Script?
Post by: TrailMyx on April 16, 2009, 09:52:30 AM
I started one of those a long time ago.  That was one of my first gold manufacturing methods after bowcraft.  I also wanted to have something like that for quite some time.

To be honest, it's not all that difficult to build, but the railing can be difficult if you try to do it yourself.  Other than that, just a good set of runes and some gating subs and your set.  (overly simplified, yes I know.....)
Title: Re: Escort/Compassion Script?
Post by: Cerveza on April 16, 2009, 09:57:57 AM
I'd assume the hardest part would be finding the escortee, and getting the destinations. If it's a dungeon, just refuse?

I know escorting used to be a great way to work up magery, back in the day.
Title: Re: Escort/Compassion Script?
Post by: silentsentinel on April 16, 2009, 10:06:00 AM
Hey TrailMix, any chance I could use what you have cobbled together and take it over for my use? Or anyone?

Starting from scratch seems like it'd be a huge amount of time, would love to have some sort of starting point and take it from there, if anyone has something :)

Much obliged for the responses
Title: Re: Escort/Compassion Script?
Post by: TrailMyx on April 16, 2009, 10:12:54 AM
You know, I don't think I even have that stuff anymore.  I've only lost data once, and that was on a laptop way back when.  I had a couple scripts I was working on with that machine. 
Title: Re: Escort/Compassion Script?
Post by: silentsentinel on April 16, 2009, 10:16:44 AM
but the railing can be difficult if you try to do it yourself.

Hm, can't just 'event pathfind' to the NPC?

I think another hard part, is I'm not sure how to best differentiate between normal and quest/escort npcs?
Title: Re: Escort/Compassion Script?
Post by: TrailMyx on April 16, 2009, 10:19:25 AM

I think another hard part, is I'm not sure how to best differentiate between normal and quest/escort npcs?

This is "THE" hard part really. 

It's been forever since I've actually done these quests.  Do you get a special quest gump now when you initiate a quest?  I remember back in the day it was just text commands and no gumps.
Title: Re: Escort/Compassion Script?
Post by: 12TimesOver on April 16, 2009, 10:31:59 AM
Silent - I responded to you on WinUO in the chatbox but perhaps I was misunderstanding your intention. I thought you were looking for something to gain Compassion.

If this is the case then I feel that the scripting is a waste of energy unless it was to include automated login routines to do multiple characters across multiple shards. However, if you were looking to do this for some other reason than Compassion (god knows I can't think of a reason) then this would obviously not matter.

The issue is simply that Compassion isn't something that can be "powergamed". Unless there has been a change or you've discovered a bug you get to gain Compassion no more than 5 times per day. Furthermore, unless you use the prisoner in Orc Dungeon, you can only take an escort every 5 minutes. As for gold farming, this equates to only in the neghborhood of 5k to 6k gold per hour.

What would the intent be of said script?

XII
Title: Re: Escort/Compassion Script?
Post by: silentsentinel on April 16, 2009, 10:37:29 AM
Heya, thanks for the reply - it is for (meager) gold farming.
4 accounts * ~1k gold per escort every 5 mins = 48k/hr (roughly)

Yes it's not much but it would equate to what I make farming with my tamer per hour. :)

Title: Re: Escort/Compassion Script?
Post by: TrailMyx on April 16, 2009, 10:43:50 AM
Unfortunately they nerfed this a long time ago.  There used to not be a timer on these quests, so you could really rake in the gold even though the gold return was less back then. 

Man, you could farm gold from a good lich spawn and get that much with one account.  Even the Arctic Orge lord in T2A Ice give around 55K/hr with one account.  And that's an easy one for a dexxer.

I even farm the mummies in Deceit for around 22K/hr.
Title: Re: Escort/Compassion Script?
Post by: silentsentinel on April 16, 2009, 10:49:14 AM
Totally true, and I may try a dexxer or tamer farming script for simplicitys sake. The reason I didn't immediately go that route tho is this: Large shard population. (Most every farming spot get checked fairly frequently on the shard I play.) Escorts at the least, while slow, would be a bit more sustainable as you can't as easily kill the bot as one could in a dungeon.

One thing I do know is that you can use context menus on the escorts here to ask for destination and accept/abandon escorts. The old text commands such as "I will take thee" work fine too.

Just throwing around the idea. :) There's plenty of monster farming scripts out there so I thought I'd check this out :D
Title: Re: Escort/Compassion Script?
Post by: TrailMyx on April 16, 2009, 10:51:20 AM
Ah, well that's a good argument for your idea.  A slow, safe, steady drip of gold versus a short flood before banning.  lol.  Something that you can AFK 24/7 with little possibility of being paged upon.
Title: Re: Escort/Compassion Script?
Post by: TrailMyx on April 16, 2009, 10:52:52 AM
Oh, and I have context menu manipulation routines here at the site, so that can help you out a bit.
Title: Re: Escort/Compassion Script?
Post by: 12TimesOver on April 16, 2009, 10:53:45 AM
Quote
4 accounts * ~1k gold per escort every 5 mins = 48k/hr (roughly)

Yes it's not much but it would equate to what I make farming with my tamer per hour.

Ah, well nowadays it equals one escort every 5 minutes at about 450gold per escort.

There are SOOOOO many easier and safer ways to script much more than that even on a single account. If you need to throw some gold together quickly while AFK spend one day a week farming ore or turning in Daishos for Folded Steel, you'll make more that one day than a month of escorts (450gold x 12 escorts an hour x 24 hours in a day x 30 days in a month = 3.1 mil per month. A single pair of Folded Steel will sell for three times that and can be obtained in 17 hours).

Although I do hate to be so negative, I just have a hard time not getting into logic efficiencies, etc. Kind of part of my job so it comes too naturally lol. Probably why I'm always in the doghouse with my wife...  :)

Could be fun to write either way.

XII
Title: Re: Escort/Compassion Script?
Post by: TrailMyx on April 16, 2009, 10:57:16 AM
Probably why I'm always in the doghouse with my wife...  :)

XII

You're just a natural troublemaker, aren't you!
Title: Re: Escort/Compassion Script?
Post by: 12TimesOver on April 16, 2009, 10:59:38 AM
Probably why I'm always in the doghouse with my wife...  :)

XII

You're just a natural troublemaker, aren't you!
"sigh" *shakes head slowly* If you only knew, my friend...if you only knew...
Title: Re: Escort/Compassion Script?
Post by: silentsentinel on April 16, 2009, 11:56:35 AM
Well, here's what I have so far, just for reference. (Not posted in the debug form or anything as I don't have a specific question yet, but thought I'd update and show what I've got.)

Of course, if you notice any major windfall problems with what I've got so far let me know :)

The outline:

Code: [Select]
set %loopscript #true
set %currentLocation escortDepot1

while %loopScript = #true
{
repeat
gosub checkStatus
until %statusOK = #true
gosub recallAround
gosub watchedCheck
gosub getEscort
}

sub watchedCheck
{
;scan journal for suspicious speech, if suspicious speech is found deflect and halt speech
;also check for odd things such as high weight w/o gold, possibly if character has been moved, etc
return
}

sub checkStatus
{
set %statusOK none
gosub watchedCheck
if #charghost = yes
{
display ok This character died!$
halt
}
if #gold > 3000 || #weight > 300
{
gosub bankGold
}
if #charghost = no && #gold < 3000 && #weight <= 300
{
set %statusOK #true
return
}
}

sub bankGold
{
;recall to bank and bank all gold found on character
return
}

sub recallAround
{
if %currentLocation = escortDepot1
{
;open runebook  and recall to location 1
return
}
if %currentLocation = escortDepot2
{
;open runebook  and recall to location 2
return
}
if %currentLocation = escortDepot3
{
;open runebook  and recall to location 3
return
}
if %currentLocation = escortDepot4
{
;open runebook  and recall to location 4
return
}
if %currentLocation = escortDepot5
{
;open runebook  and recall to location 5
return
}
if %currentLocation = escortDepot6
{
;open runebook  and recall to location 6
return
}
if %currentLocation = escortDepot7
{
;open runebook  and recall to location 7
return
}
if %currentLocation = escortDepot8
{
;open runebook  and recall to location 8
return
}
if %currentLocation = escortDepot9
{
;open runebook  and recall to location 9
return
}
if %currentLocation = escortDepot10
{
;open runebook  and recall to location 10
return
}
if %currentLocation = escortDepot11
{
;open runebook  and recall to location 11
return
}
if %currentLocation = escortDepot12
{
;open runebook  and recall to location 12
return
}
if %currentLocation = escortDepot13
{
;open runebook  and recall to location 13
return
}
if %currentLocation = escortDepot14
{
;open runebook  and recall to location 14
return
}
if %currentLocation = escortDepot15
{
;open runebook  and recall to location 15
return
}
if %currentLocation = escortDepot16
{
;open runebook  and recall to location 16
return
}
}

sub getEscort
{
;scan for npc escort{, approach escort
;determine if and accept escort
;set escort id to %escortID
;set %escortFound #true
if %escortFound = #true
{
set %destination none
;gate escort to safe location to steal their gold, hide for 4.5 minutes or so
set %jStart #jindex + 1
exevent popup %escortID 2
set %jTimeout #scnt + 2
set %jEnd #jindex
while #scnt < %jTimeout
{
for %ji %jStart %jEnd
{
scanjournal %ji
if i_am_looking_to_go_to_britain,_will_you_take_me? in #journal
{
set %destination britain
}
if i_am_looking_to_go_to_cove,_will_you_take_me? in #journal
{
set %destination cove
}
if i_am_looking_to_go_to_covetous,_will_you_take_me? in #journal
{
set %destination covetous
}
if i_am_looking_to_go_to_deceit,_will_you_take_me? in #journal
{
set %destination deceit
}
if i_am_looking_to_go_to_despise,_will_you_take_me? in #journal
{
set %destination despise
}
if i_am_looking_to_go_to_destard,_will_you_take_me? in #journal
{
set %destination destard
}
if i_am_looking_to_go_to_hythloth,_will_you_take_me? in #journal
{
set %destination hythloth
}
if i_am_looking_to_go_to_jhelom,_will_you_take_me? in #journal
{
set %destination jhelom
}
if i_am_looking_to_go_to_magincia,_will_you_take_me? in #journal
{
set %destination magincia
}
if i_am_looking_to_go_to_minoc,_will_you_take_me? in #journal
{
set %destination minoc
}
if i_am_looking_to_go_to_moonglow,_will_you_take_me? in #journal
{
set %destination moonglow
}
if i_am_looking_to_go_to_nujel'm,_will_you_take_me? in #journal
{
set %destination nujelm
}
if i_am_looking_to_go_to_ocllo,_will_you_take_me? in #journal
{
set %destination ocllo
}
if i_am_looking_to_go_to_serpent's_hold,_will_you_take_me? in #journal
{
set %destination serpentshold
}
if i_am_looking_to_go_to_shame,_will_you_take_me? in #journal
{
set %destination shame
}
if i_am_looking_to_go_to_skara_brae,_will_you_take_me? in #journal
{
set %destination skarabrae
}
if i_am_looking_to_go_to_trinsic,_will_you_take_me? in #journal
{
set %destination trinsic
}
if i_am_looking_to_go_to_vesper,_will_you_take_me? in #journal
{
set %destination vesper
}
if i_am_looking_to_go_to_wrong,_will_you_take_me? in #journal
{
set %destination wrong
}
if i_am_looking_to_go_to_yew,_will_you_take_me? in #journal
{
set %destination yew
}
}
}
if %destination = britain
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = cove
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = covetous
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = deceit
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = despise
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = destard
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = hythloth
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = jhelom
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = magincia
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = minoc
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = moonglow
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = nujelm
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = occlo
exevent popup %escortID 3
;gate escort to destination
}
if %destination = serpentshold
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = shame
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = skarabrae
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = trinsic
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = vesper
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = wrong
{
exevent popup %escortID 3
;gate escort to destination
}
if %destination = yew
exevent popup %escortID 3
;gate escort to destination
}
set %escortFound none
}
if %escortFound = #false
{
if %currentLocation = escortDepot1
{
set %currentLocation escortDepot2
return %currentLocation
}
if %currentLocation = escortDepot2
{
set %currentLocation escortDepot3
return %currentLocation
}
if %currentLocation = escortDepot3
{
set %currentLocation escortDepot4
return %currentLocation
}
if %currentLocation = escortDepot4
{
set %currentLocation escortDepot5
return %currentLocation
}
if %currentLocation = escortDepot5
{
set %currentLocation escortDepot6
return %currentLocation
}
if %currentLocation = escortDepot6
{
set %currentLocation escortDepot7
return %currentLocation
}
if %currentLocation = escortDepot7
{
set %currentLocation escortDepot8
return %currentLocation
}
if %currentLocation = escortDepot8
{
set %currentLocation escortDepot9
return %currentLocation
}
if %currentLocation = escortDepot9
{
set %currentLocation escortDepot10
return %currentLocation
}
if %currentLocation = escortDepot10
{
set %currentLocation escortDepot11
return %currentLocation
}
if %currentLocation = escortDepot11
{
set %currentLocation escortDepot12
return %currentLocation
}
if %currentLocation = escortDepot12
{
set %currentLocation escortDepot13
return %currentLocation
}
if %currentLocation = escortDepot13
{
set %currentLocation escortDepot14
return %currentLocation
}
if %currentLocation = escortDepot14
{
set %currentLocation escortDepot15
return %currentLocation
}
if %currentLocation = escortDepot15
{
set %currentLocation escortDepot16
return %currentLocation
}
if %currentLocation = escortDepot16
{
set %currentLocation escortDepot1
return %currentLocation
}
}
}
Title: Re: Escort/Compassion Script?
Post by: Khameleon on April 16, 2009, 02:49:58 PM
there is a place where the npc timer doesn't count... :)
Title: Re: Escort/Compassion Script?
Post by: silentsentinel on April 16, 2009, 03:58:15 PM
huh how so? :)
Title: Re: Escort/Compassion Script?
Post by: DeadIssue2 on April 16, 2009, 05:51:19 PM
I know you can do the Bravehart quest 5 times per day and get compassion up super fast without having to worry about any timer.
Title: Re: Escort/Compassion Script?
Post by: 12TimesOver on April 17, 2009, 02:33:14 AM
huh how so? :)
I mentioned it earlier in the thread already.

Title: Re: Escort/Compassion Script?
Post by: silentsentinel on April 17, 2009, 02:51:59 AM
Cool. Things are coming together, very close to being done.

Here's what I have so far if anyone's interested in peeking/commenting:

Code: [Select]
set %rbDepot TLIMJOD
set %rbDestination1 MYIMJOD
set %rbDestination2 ZKJMJOD
set %loopscript #true
set %baseLocation escortDepot12

while %loopScript = #true
{
repeat
gosub checkStatus
until %statusOK = #true
gosub recallAround
;gosub watchedCheck
gosub getEscort
}

sub watchedCheck
{
return
}

sub checkStatus
{
set %statusOK none
;gosub watchedCheck
if #charghost = yes
{
display ok This character died!$
halt
}
if #gold > 3000 || #weight > 300
{
gosub bankGold
}
if #charghost = no && #gold < 3000 && #weight <= 300
{
set %statusOK #true
return
}
}

sub bankGold
{
return
}

sub recallAround
{
if %baseLocation = escortDepot1
{
gosub useRunebook recall 1 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot2
{
gosub useRunebook recall 2 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot3
{
gosub useRunebook recall 3 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot4
{
gosub useRunebook recall 4 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot5
{
gosub useRunebook recall 5 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot6
{
gosub useRunebook recall 6 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot7
{
gosub useRunebook recall 7 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot8
{
gosub useRunebook recall 8 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot9
{
gosub useRunebook recall 9 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot10
{
gosub useRunebook recall 10 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot11
{
gosub useRunebook recall 11 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot12
{
gosub useRunebook recall 12 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot13
{
gosub useRunebook recall 13 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot14
{
gosub useRunebook recall 14 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot15
{
gosub useRunebook recall 15 %rbDepot dangerNo
wait 20
return
}
if %baseLocation = escortDepot16
{
gosub useRunebook recall 16 %rbDepot dangerNo
wait 20
return
}
}

sub getEscort
{
finditem HS G_4
if #findkind <> -1 && #findkind <> #charid
{
set %npcID #findid
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
wait 40
event pathfind %npcPosX %npcPosY
wait 60
set %escortFound #true
}
if #findkind = -1 || #findkind = #charid
set %escortFound #false
if %escortFound = #true
{
set %destination none
set %jStart #jindex + 1
event macro 1 0 What is your destination?
wait 20
set %jTimeout #scnt2 + 20
set %jEnd #jindex
while #scnt2 < %jTimeout
{
for %ji %jStart %jEnd
{
scanjournal %ji
if i_am_looking_to_go_to_britain in #journal
{
set %destination britain
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_cove in #journal
{
set %destination cove
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_covetous in #journal
{
set %destination covetous
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_deceit in #journal
{
set %destination deceit
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_despise in #journal
{
set %destination despise
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_destard in #journal
{
set %destination destard
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_hythloth in #journal
{
set %destination hythloth
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_jhelom in #journal
{
set %destination jhelom
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_magincia in #journal
{
set %destination magincia
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_minoc in #journal
{
set %destination minoc
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_moonglow in #journal
{
set %destination moonglow
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_nujel'm in #journal
{
set %destination nujelm
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_ocllo in #journal
{
set %destination ocllo
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_serpent's_hold in #journal
{
set %destination serpentshold
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_shame in #journal
{
set %destination shame
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_skara_brae in #journal
{
set %destination skarabrae
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_trinsic in #journal
{
set %destination trinsic
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_vesper in #journal
{
set %destination vesper
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_wrong in #journal
{
set %destination wrong
set %jTimeout #scnt2
}
if i_am_looking_to_go_to_yew in #journal
{
set %destination yew
set %jTimeout #scnt2
}
if %destination = none
{
ignoreitem %npcID
set %escortFound #false
}
}
}
if %destination = britain
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 1 %rbDestination1 dangerNo
}
if %destination = cove
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 2 %rbDestination1 dangerNo
}
if %destination = covetous
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 3 %rbDestination1 dangerYes
}
if %destination = deceit
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 4 %rbDestination1 dangerYes
}
if %destination = despise
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 5 %rbDestination1 dangerYes
}
if %destination = destard
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 6 %rbDestination1 dangerYes
}
if %destination = hythloth
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 7 %rbDestination1 dangerYes
}
if %destination = jhelom
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 8 %rbDestination1 dangerNo
}
if %destination = magincia
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 9 %rbDestination1 dangerNo
}
if %destination = minoc
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 10 %rbDestination1 dangerNo
}
if %destination = moonglow
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 11 %rbDestination1 dangerNo
}
if %destination = nujelm
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 12 %rbDestination1 dangerNo
}
if %destination = ocllo
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 13 %rbDestination1 dangerYes
}
if %destination = serpentshold
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 14 %rbDestination1 dangerNo
}
if %destination = shame
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 15 %rbDestination1 dangerYes
}
if %destination = skarabrae
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 16 %rbDestination1 dangerNo
}
if %destination = trinsic
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 1 %rbDestination2 dangerNo
}
if %destination = vesper
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 2 %rbDestination2 dangerNo
}
if %destination = wrong
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 3 %rbDestination2 dangerYes
}
if %destination = yew
{
finditem %npcID G_6
set %npcPosX #findx
set %npcPosY #findy
event pathfind %npcPosX %npcPosY
wait 40
event macro 1 0 I will take thee.
;gosub stealGold %npcID
gosub useRunebook gate 4 %rbDestination2 dangerNo
}
}
if %escortFound = #false
{
if %baseLocation = escortDepot1
{
set %baseLocation escortDepot2
return %baseLocation
}
if %baseLocation = escortDepot2
{
set %baseLocation escortDepot3
return %baseLocation
}
if %baseLocation = escortDepot3
{
set %baseLocation escortDepot4
return %baseLocation
}
if %baseLocation = escortDepot4
{
set %baseLocation escortDepot5
return %baseLocation
}
if %baseLocation = escortDepot5
{
set %baseLocation escortDepot6
return %baseLocation
}
if %baseLocation = escortDepot6
{
set %baseLocation escortDepot7
return %baseLocation
}
if %baseLocation = escortDepot7
{
set %baseLocation escortDepot8
return %baseLocation
}
if %baseLocation = escortDepot8
{
set %baseLocation escortDepot9
return %baseLocation
}
if %baseLocation = escortDepot9
{
set %baseLocation escortDepot10
return %baseLocation
}
if %baseLocation = escortDepot10
{
set %baseLocation escortDepot11
return %baseLocation
}
if %baseLocation = escortDepot11
{
set %baseLocation escortDepot12
return %baseLocation
}
if %baseLocation = escortDepot12
{
set %baseLocation escortDepot13
return %baseLocation
}
if %baseLocation = escortDepot13
{
set %baseLocation escortDepot14
return %baseLocation
}
if %baseLocation = escortDepot14
{
set %baseLocation escortDepot15
return %baseLocation
}
if %baseLocation = escortDepot15
{
set %baseLocation escortDepot16
return %baseLocation
}
if %baseLocation = escortDepot16
{
set %baseLocation escortDepot1
return %baseLocation
}
}
set %escortFound none
return
}

sub stealGold
{
return
}

sub useRunebook
{
set %rbAction %1
set %rbRune %2 - 1
set %rb %3
set %dangerousLocation %4
set %reGate none
reGate:
if %reGate = #true
wait 60
finditem %rb C_ , #backpackid
set #lobjectid #findid
event macro 17
wait 20
set %rbPage ( %rbRune / 2 ) + 1
if %rbPage < 5
set %rbPage %rbPage - 1
set %rbX #contposx + 140 + ( 35 * %rbPage )
set %rbY #contposy + 200
wait 20
click %rbX %rbY dmc
wait 20
if %rbAction = recall
{
set %rbX #contposx + 140 + ( 160 * ( %rbRune % 2 ) )
set %rbY #contposy + 145
click %rbX %rbY dmc
wait 20
}
if %rbAction = gate
{
if %dangerousLocation = dangerNo
{
set %rbX #contposx + 205 + ( 160 * ( %rbRune % 2 ) )
set %rbY #contposy + 145
set %jStart #jindex + 1
click %rbX %rbY dmc
wait 50
set %jTimeout #scnt2 + 20
set %jEnd #jindex
while #scnt2 < %jTimeout
{
for %ji %jStart %jEnd
{
scanjournal %ji
if spell_fizzles in #journal || location_is_blocked in #journal
{
set %jTimeout #scnt2
set %reGate #true
goto reGate
}
}
}
finditem OTF G_1
set %gateID #findid
set #lobjectid %gateID
event macro 17
wait 40
finditem OTF G_1
set %gateID #findid
set #lobjectid %gateID
event macro 17
wait 40
event macro 13 21
wait 6000
}
if %dangerousLocation = dangerYes
{
set %rbX #contposx + 205 + ( 160 * ( %rbRune % 2 ) )
set %rbY #contposy + 145
set %jStart #jindex + 1
click %rbX %rbY dmc
wait 50
set %jTimeout #scnt2 + 20
set %jEnd #jindex
while #scnt2 < %jTimeout
{
for %ji %jStart %jEnd
{
scanjournal %ji
if spell_fizzles in #journal || location_is_blocked in #journal
{
set %jTimeout #scnt2
set %reGate #true
goto reGate
}
}
}

click %rbX %rbY dmc
wait 50
finditem OTF G_1
set %gateID #findid
set #lobjectid %gateID
event macro 17
wait 40
;confirm dangerous location gump
wait 40
finditem OTF G_1
set %gateID #findid
set #lobjectid %gateID
event macro 17
wait 40
event macro 13 21
wait 6000
}
}
return
}
Title: Re: Escort/Compassion Script?
Post by: TrailMyx on April 17, 2009, 11:34:39 AM
Will you be doing any pathfinding to your escorts?

Also, what happens if an escort is in a building?

Looks good otherwise