|
Kendrick Beginner
Joined: 28 Aug 2003 Posts: 25 Location: USA
|
Posted: Wed Jan 21, 2004 2:14 am
[?]I need help on a script.... |
I've made a good script for casually fishing while I'm away. The only problem is, my character usually cleans out a single fishing area in a matter of minutes, and thus, has to wait another half hour or so before fish start appearing there again.
What I usually do, is leave it to fishing, and come back later to sell all the salted fish-fillets and wrap things up, then maybe if I feel like it, I got to another fishing-area and have at it some more. The task of fishing in that game is too boring to sit there and attend to yourself. You pretty much have to either have someone to talk to in the mud while you fish (who wants to pay attention for 10 minutes straight? If you miss a fish you caught, it flops back into the water...
Here's the thing though. My character cleans out a single fishing area in like, 5 minutes (a single room that is). I want him to move to differant areas when he's done. There's an actual message that tells you there are no fish biting. If the message were unique to each room, then I'd be set. It's not unique though
How do I trigger it to go to a new and differant area. I'm thinking of a long cycle. Maybe between 3-5 areas to fish. After each area, he gathers all the fish and junk he got, and sells them to someone, and moves onto the next area.
Any thoughts? |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Wed Jan 21, 2004 2:44 am |
Put the messages into a record variable as keys with appropiate movement commands as values. Then you can trigger something like:
#TR {^({@RecordVar})$} {#EXEC {%db(@RecordVar,"%1")};fish}
As long your fishing triggers won't automatically activate during the movement they don't need to be turned off, and as long as the fished out message in each room is distinct you can use this method. If it doesn't meet those conditions then you should probably post more information including actual mud text so we can help further. |
|
|
|
Kendrick Beginner
Joined: 28 Aug 2003 Posts: 25 Location: USA
|
Posted: Fri Jan 23, 2004 4:21 am |
Excuse my ineptness, but can you explain the trigger a bit more in depth?> If I knew how it worked, I'd be set. I fit the conditions you laid out... I've been trying to figure our what the whole trigger is, but I finally had to break down and ask...
And if anything, at least explain what %db does. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Jan 23, 2004 12:06 pm |
Records are the basis for a database. A record variable holds as many key+value pairs as you want. The trigger pattern will match on the keys in the variable and store them in %1. Then the %db function uses that key to look up the associated value which would be your movement commands. Then the #EXEC command causes them to happen.
If you need further explanation of how it works try looking up the %db function in the help. |
|
|
|
Kendrick Beginner
Joined: 28 Aug 2003 Posts: 25 Location: USA
|
Posted: Sun Jan 25, 2004 2:56 am |
It makes a little more sense here but I'm still confused. The text I need to trigger when the fishing area is cleaned out is this:
You get the impression that there are no fish here.
Now, it seems like there's a lot of behind the scenes work involved, the kind I've never done.
An example of what I'd need to do for say, the first room I start out in is this (I can insert #wait commands later, I tend to put #wait <random amount of time> in a lot of my triggers so it looks natural)... Ok, so if I start out in this one room, here's how it would go:
All EQ kept so: You get the impression that there are no fish here. <--makes me get all;w;w;s;w;w;s;w;w;w;w;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;n;ne;e;sell all;w;sw;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;s;e;enter mound;e;e;n;e;e;n;mend seine
the last command "mend seine" is part of my script. I start every fishing session with "mend seine" and my char proceeds to mend the seine until it can no longer be fixed and then is triggered to start fishing.... That's a big stack, and I would need "#wait" in there to make sure my char doesn't get hurt trying to go that fast but that's besides the point.
Ok, then from that area, I would need to do the same basic thing, only I'm in a differant area. So the command would be the same, only 1 room west of the room before. Then from there, it'd be 1 room south, then from there (once this 3rd room is cleaned out of fish) I would move to a differant area altogether, and so on... All off the same text.
Thanks you've been a big help. But I've never made a script with record vars in it (yes I'm a newbie) and I guess I need to know everything involded in the trigger given. Thanks in advance. |
|
|
|
Eyeless Wanderer
Joined: 02 Dec 2001 Posts: 80 Location: Canada
|
Posted: Sun Jan 25, 2004 4:58 am |
Heh Imma take a stab in the dark... but several years ago I played a mud called Ancient Anguish... Your directions and commands seem awefully familiar... <snickers> Why not kill the lich while you're there too!!! sell that vorpal blade and make some decent coins...
|
|
|
|
Kendrick Beginner
Joined: 28 Aug 2003 Posts: 25 Location: USA
|
Posted: Mon Jan 26, 2004 6:01 pm |
Let me bump this topic...
I talked to a friend about this, and he's never used Databases like this or something. He could probably figure it out with me, but he doesn't have his old computer anymore, it got fried, so he can't use Zmud.
I'm still utterly confused. I don't know what to put in the Data base, or into the variable etc... If I knew how to make this script, it would really help me in the long run. I have everything set up on this script except the moving from area to area when there's no fish left in a room. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Jan 27, 2004 1:35 am |
The best I can explain it is what I said above, so I will use your example to create an example that might help you.
#ADDKEY VijFisher {You get the impression that there are no fish here.} {get all;.2ws2ws4w4n43nje;sell all;.wk43se;enter mound;.2en2en;mend seine}
You would then add similar paths for other rooms, in the same fashion. Of course it would be better to make a shorter movement and continue fishing until inventory full. Then you merely need to track which room you are in to composite a path to the shop, and return route to your fishing zone. |
|
|
|
|
|