Issue 175 in anomalyjobs: +job/roll +job/spend

3 views
Skip to first unread message

anoma...@googlecode.com

unread,
Jun 24, 2014, 11:32:01 PM6/24/14
to anoma...@googlegroups.com
Status: New
Owner: ----

New issue 175 by K.Jisa...@gmail.com: +job/roll +job/spend
http://code.google.com/p/anomalyjobs/issues/detail?id=175

Is this a new command or change to an existing one?
new commands

If a new command, write suggested syntax and describe what the command
does:

A system for rolling dice and recording it into a job. as well as spending
pools into jobs

Have you coded this? If so, please attach a patch.
I have not

Please provide any additional information below.
I have seen this on other games. I don't know if anyone has a copy of it.
I'm not sure how to go about it. Anomaly jobs is rather complicated for my
coder as well.

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

anoma...@googlecode.com

unread,
Jun 24, 2014, 11:55:10 PM6/24/14
to anoma...@googlegroups.com
Updates:
Labels: Type-Task Component-Docs

Comment #1 on issue 175 by wid...@gmail.com: +job/roll +job/spend
http://code.google.com/p/anomalyjobs/issues/detail?id=175

The problem with making a +job/roll command is that so many different games
have so many different dice systems that it's hard to make a
consistent/general set of dice that works. That said, I have coded this on
a (TinyMUX) game and have a copy of the code. It probably deserves a spot
in the HOWTO.

Ultimately, all you need to do is use the Job system's &TRIG_ADD
functionality to add text to jobs. The parameters are customizable
depending on what you wanted to do.

In the game I coded, I added on optional syntax to the +roll command which
took all the other switches, plus an =<target> option, e.g., +roll
foo+bar=5 would roll your foo and bar stats and send the results to the
user's +myjob 5. In order to prevent players spoofing it, the job addition
came from an NPC. The way the command worked:
- The target was stored in the T register:
setq(t,squish(%5))
- I created a lookup function to get the job DBREF from the job number
(note the &VJ attribute contained the dbref of the job database object):
&FUN_ROLL_MYJOB #34=
if(isint(%0),filter(%vj/FIL_MYJOBS,locate(%vj,Job %0,iT)))
- In later code where the job would be emitted, it is instead added to the
job with TRIG_ADD as follows (note %qK contains the contents of the emit,
so is therefore the text of the job. %va is set to the DBREF of the NPC we
want the die rolls posted from):
@break setr(j,u(%vf/FUN_ROLL_MYJOB,%qT))={
@trigger %vj/TRIG_ADD=%qJ,%qK,%va,ADD,1;
@trigger %vj/TRIG_BROADCAST=%qJ,%#,ADD;
@pemit %#=Added to [name(%qJ)]: %qK
};
(The @break prevents the next code, which would have emitted %qk to the
room, etc.)

This should be enough information to incorporate into an existing dice
system.

The answer would be the same for a spend system... tack on to your existing
+spend commands using appropriate code to figure out what to send to
TRIG_ADD.
Reply all
Reply to author
Forward
0 new messages