|
Setepth Novice
Joined: 17 Dec 2001 Posts: 34 Location: USA
|
Posted: Fri Sep 12, 2003 10:06 pm
For all Great coders |
I have tried and tried again to perform a working model in zmud to
help me with these industries but time and time again i have failed.
Better now not harm myself in a mad fury and drive off a bridge but
rather send it to you all- the experts. In my mud, Elysium RPG, we
have industries that we have to run so that the city is successful.
However, paying maintenance is the worst pain in the butt. I have
tried to work with aliases, but problem is that eventually we change
around industries and it takes a LOONG time to reprogram. So I have
thought you guys would enjoy this tough task of producing a "auto- grabber" AND "automatic payment system". First off, to view the screen
of industries that you own and the ids of them as well as the costs
you type without the quotations: "industry maintenance list". From
there is produced a list that will look like this (in example from my
character).
>industry maintenance list
butchers (13167) Lvl: 3 Maint: 117 Vault: 323 (paid for)
sawmill (80256) Lvl: 3 Maint: 117 Vault: 123 (unpaid for) sawmill (80258) Lvl: 3 Maint: 117 Vault: 124 (unpaid for) sawmill (80260) Lvl: 3 Maint: 117 Vault: 123 (unpaid for)
metalsmiths (109289) Lvl: 2 Maint: 57 Vault: 18 (unpaid for)
butchers (219256) Lvl: 1 Maint: 19 Vault: 11 (unpaid for)
mint (670432) Lvl: 3 Maint: 90 Vault: 189 (paid for)
mine (2685407) Lvl: 2 Maint: 57 Vault: 156 (shutdown)
refinery (2621207) Lvl: 2 Maint: 57 Vault: 151 (paid for)
refinery (2675818) Lvl: 2 Maint: 57 Vault: 94 (paid for)
quarry (3944343) Lvl: 2 Maint: 57 Vault: 12 (unpaid for)
fishmongers (3944344) Lvl: 3 Maint: 117 Vault: 86 (unpaid for)
greengrocers (3944345) Lvl: 3 Maint: 36 Vault: 1958 (paid for)
mint (3976775) Lvl: 3 Maint: 90 Vault: 189 (paid for)
refinery (4056457) Lvl: 2 Maint: 57 Vault: 73 (paid for)
mint (4097352) Lvl: 3 Maint: 90 Vault: 189 (paid for)
mint (4097353) Lvl: 3 Maint: 90 Vault: 189 (paid for)
refinery (4196422) Lvl: 2 Maint: 57 Vault: 82 (paid for)
refinery (4206035) Lvl: 3 Maint: 117 Vault: 155 (unpaid for)
mine (4214985) Lvl: 2 Maint: 57 Vault: 121 (shutdown)
mine (4214986) Lvl: 2 Maint: 57 Vault: 61 (paid for)
refinery (4252532) Lvl: 2 Maint: 57 Vault: 193 (paid for)
refinery (4252533) Lvl: 2 Maint: 57 Vault: 44 (paid for)
refinery (4252534) Lvl: 3 Maint: 117 Vault: 128 (paid for)
mine (2687760) Lvl: 2 Maint: 57 Vault: 88 (paid for)
butchers (3232505) Lvl: 3 Maint: 117 Vault: 49 (unpaid for)
brewery (3330464) Lvl: 2 Maint: 57 Vault: 0 (unpaid for)
mine (3542204) Lvl: 2 Maint: 57 Vault: 129 (shutdown)
mine (3542205) Lvl: 2 Maint: 57 Vault: 137 (shutdown)
plot (3582397) Lvl: 1 Maint: 3 Vault: 2 (unpaid for)
plot (3582406) Lvl: 1 Maint: 3 Vault: 2 (unpaid for)
mine (3704500) Lvl: 2 Maint: 57 Vault: 105 (paid for)
plot (3834373) Lvl: 1 Maint: 3 Vault: 23 (paid for)
mine (3842528) Lvl: 2 Maint: 57 Vault: 125 (shutdown)
mine (3842529) Lvl: 2 Maint: 57 Vault: 183 (shutdown)
plot (3877899) Lvl: 1 Maint: 3 Vault: 23 (paid for)
mine (3892725) Lvl: 2 Maint: 57 Vault: 118 (shutdown)
mine (3892726) Lvl: 2 Maint: 57 Vault: 168 (shutdown)
plot (3945561) Lvl: 1 Maint: 3 Vault: 2 (unpaid for)
mine (3986438) Lvl: 2 Maint: 57 Vault: 72 (paid for)
mine (3986439) Lvl: 2 Maint: 57 Vault: 72 (paid for)
mine (4072438) Lvl: 2 Maint: 57 Vault: 57 (paid for)
library (4072439) Lvl: 2 Maint: 27 Vault: 2489 (paid for)
plot (2632810) Lvl: 1 Maint: 3 Vault: 2 (unpaid for)
weaving mill (2695604) Lvl: 1 Maint: 3 Vault: 4523 (paid for)
weaving mill (2695605) Lvl: 1 Maint: 3 Vault: 4449 (paid for)
spinning mill (2723855) Lvl: 1 Maint: 3 Vault: 1 (unpaid for)
butchers (2764863) Lvl: 1 Maint: 19 Vault: 9 (unpaid for)
plot (2792156) Lvl: 1 Maint: 3 Vault: 1468 (paid for)
refinery (2797792) Lvl: 3 Maint: 117 Vault: 136 (paid for)
refinery (2797793) Lvl: 3 Maint: 117 Vault: 147 (unpaid for)
refinery (2853148) Lvl: 3 Maint: 117 Vault: 132 (unpaid for)
butchers (2672813) Lvl: 3 Maint: 117 Vault: 330 (paid for)
quarry (4625253) Lvl: 2 Maint: 57 Vault: 26 (unpaid for)
mine (4734979) Lvl: 2 Maint: 57 Vault: 84 (paid for)
mine (4734980) Lvl: 2 Maint: 57 Vault: 84 (paid for)
mine (4734981) Lvl: 2 Maint: 57 Vault: 141 (shutdown)
mine (4744010) Lvl: 2 Maint: 57 Vault: 141 (shutdown)
mine (4744011) Lvl: 2 Maint: 57 Vault: 84 (paid for)
mine (4744012) Lvl: 2 Maint: 57 Vault: 84 (paid for)
mine (4886452) Lvl: 2 Maint: 57 Vault: 84 (paid for)
mine (4886453) Lvl: 2 Maint: 57 Vault: 105 (unpaid for)
mine (4886454) Lvl: 2 Maint: 57 Vault: 83 (unpaid for)
mine (4886456) Lvl: 2 Maint: 57 Vault: 84 (paid for)
mine (4886457) Lvl: 2 Maint: 57 Vault: 88 (paid for)
refinery (5547011) Lvl: 2 Maint: 57 Vault: 60 (paid for)
refinery (5547012) Lvl: 2 Maint: 57 Vault: 76 (paid for)
bakers (5655953) Lvl: 1 Maint: 3 Vault: 4481 (paid for)
quarry (5714370) Lvl: 1 Maint: 19 Vault: 228 (paid for)
leatherworkers (5757874) Lvl: 1 Maint: 19 Vault: 37 (paid for)
plot (5882555) Lvl: 1 Maint: 3 Vault: 216 (paid for)
refinery (7087144) Lvl: 2 Maint: 57 Vault: 100 (paid for)
mine (7087145) Lvl: 2 Maint: 57 Vault: 196 (paid for)
mint (7518181) Lvl: 3 Maint: 90 Vault: 299 (paid for)
refinery (7518182) Lvl: 2 Maint: 57 Vault: 57 (unpaid for)
refinery (7545076) Lvl: 1 Maint: 19 Vault: 0 (unpaid for)
refinery (7554905) Lvl: 1 Maint: 19 Vault: 0 (unpaid for)
refinery (7565354) Lvl: 1 Maint: 12 Vault: 0 (unpaid for)
refinery (7565355) Lvl: 1 Maint: 19 Vault: 0 (unpaid for)
>
Now in order to make a payment we must use both the id and the amount
it takes in gold to run per week. In example this is what I would type
without quotations or parenthesis: "pay maintenance (whatever id i
need) (the cost of that industry)". Due to the fact that the mud
doesn't allow a fast spread of commands but requires you to wait till
it has responded to the last command, it becomes quite time consuming
to have to go and search back and MAKE sure everything has been paid
for. Also, if i decide to "shutdown" an industry (making it so that i
dont have to pay for it or withdraw from it) than the structured lists
cause problems. So if zmud sees on the line of the industry:
(shutdown) I would like it to skip automatically over it.
So is there a way to set it up so that anytime that I type without the
quotations: "industry maintenance list" that it automatically chooses
the id's and payment amounts, and temporarily sets them up to be paid
one by one (in response to the mud response) and still skip over ones
that it finds as being shutdown? I'd almost be willing to pay you for
your aide if you can't find the time normally to help with this. If
you need more information, please let me know.
Thanks.
-Nurmek Leptin |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Fri Sep 12, 2003 11:10 pm |
This is pretty simple, I'll start writing it right after I finish my normal get home routine. Perhaps you could post the appropiate 'finished paying message' and 'didn't quite understand that message' so I can build those triggers and make the whole queue while I am at it.
|
|
|
|
LightBulb MASTER
Joined: 28 Nov 2000 Posts: 4817 Location: USA
|
Posted: Sat Sep 13, 2003 12:14 am |
Everything except sawmills is one industry to a line. I've assumed that that's normal, and the sawmills are either a typo or an oddity.
This will incorporate earlier work on this problem which I see no need to repeat.
Difficult Coding, Need Help
All you really need is a trigger to build the record variable, @Mines, for you. Even though it's named Mines, there's nothing to prevent it from containing sawmills, butchers, or any other industry. An additional trigger is desirable to clear the variable and enable the first trigger at the start of the list, and then disable the first trigger and possibly initiate payment at the end of the list.
Typical line, showing matchup. Items in blue will be %1, %2, %3. Items in red will match the *s. Struck out items occur before/after the pattern:
butchers (13167) Lvl: 3 Maint: 117 Vault: 323 (paid for)
butchers ((%d)) * Maint: (%d) * ((%w) for)
#TR AddMine {~((%d)~) * Maint: (%d) * ~((%w)} {#IF (%3 = "unpaid") {#ADDK Mines %1 %2}} {} {disable}
#T- AddMine
#TR ToggleMine {^industry maintenance list} {#VAR Mines {};#T+ AddMine} {} {input}
#COND {^~>} {#T- AddMine;PayMines} {Skip|Param=2}
NOTES:
1. For command-line entry
2. > is probably a prompt. If so, you'll want to change the final item to {nocr|prompt|Skip|Param=2}
3. This will pay unpaid industries. If you want the list to include paid industries also, change the #IF conditional to:
((%3 = "unpaid") OR (%3 = "paid"))
4. If you just want to make the list, remove PayMines from the #COND. I've assumed you have a working alias |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Sat Sep 13, 2003 2:02 am |
Guess Lightbulb got it covered. Good thing since it is Friday and I'm quite intoxicated.
|
|
|
|
RobMacAF Apprentice
Joined: 09 Jun 2002 Posts: 186 Location: USA
|
Posted: Sun Sep 14, 2003 2:03 am |
Just curious, What mud is this?
|
|
|
|
Setepth Novice
Joined: 17 Dec 2001 Posts: 34 Location: USA
|
Posted: Thu Sep 18, 2003 4:17 am |
quote: Originally posted by RobMacAF
Just curious, What mud is this?
Elysium-RPG. its located in my signature if not you can go to www.elysium-rpg.com and check it out or the address to connect is
telnet:www.elysium-rpg.com port:7777 |
|
|
|
|
|