Page 1 of 1

picking up stuff

Posted: Tue Sep 28, 2010 4:49 am
by Trilliana
Alright, with the help of the mudlet manual (yay for learning) I've gotten to the point that I can pick stuff up off of balance, but my problem is sometimes hunting in groups or walking in on someone killing something and a drop happens, I'll pick it up.

The only idea- which I've gotten from my husband whom only codes for cmud- is have a way to turn off the balance trigger to pick stuff up until I kill something and making it a temp trigger.

this is the script I have so far:

Code: [show] | [select all] lua
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
    <TriggerPackage>
        <TriggerGroup isActive="yes" isFolder="yes" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
            <name>pick up stuff</name>
            <script></script>
            <triggerType>0</triggerType>
            <conditonLineDelta>99</conditonLineDelta>
            <mStayOpen>0</mStayOpen>
            <mCommand></mCommand>
            <mFgColor>#ff0000</mFgColor>
            <mBgColor>#ffff00</mBgColor>
            <mSoundFile></mSoundFile>
            <colorTriggerFgColor>#000000</colorTriggerFgColor>
            <colorTriggerBgColor>#000000</colorTriggerBgColor>
            <regexCodeList/>
            <regexCodePropertyList/>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>gotgold</name>
                <script>gold = 0
disableTrigger("bal")</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>0</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ff0000</mFgColor>
                <mBgColor>#ffff00</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>You pick up some gold sovereigns.</string>
                    <string>You scoop up some gold sovereigns.</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>0</integer>
                    <integer>0</integer>
                </regexCodePropertyList>
            </Trigger>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>gotshard</name>
                <script>shard = 0
disableTrigger("bal")</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>2</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ff0000</mFgColor>
                <mBgColor>#ffff00</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>You pick up a chipped iconic shard.</string>
                    <string>You pick up a jagged iconic shard.</string>
                    <string>You pick up a smooth iconic shard.</string>
                    <string>You scoop up a jagged iconic shard.</string>
                    <string>You scoop up a smooth iconic shard.</string>
                    <string>You scoop up a chipped iconic shard.</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>0</integer>
                    <integer>0</integer>
                    <integer>0</integer>
                    <integer>0</integer>
                    <integer>0</integer>
                    <integer>0</integer>
                </regexCodePropertyList>
            </Trigger>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>gold</name>
                <script>gold = 1
</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>99</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ffff7f</mFgColor>
                <mBgColor>#000000</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>A small pile of sovereigns spills from the corpse.</string>
                    <string>A tiny pile of sovereigns spills from the corpse.</string>
                    <string>A large pile of sovereigns spills from the corpse.</string>
                    <string>A few golden sovereigns spill from the corpse.</string>
                    <string>A small pile of sovereigns spills from the corpse.</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>1</integer>
                    <integer>1</integer>
                    <integer>1</integer>
                    <integer>1</integer>
                    <integer>1</integer>
                </regexCodePropertyList>
            </Trigger>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>shards</name>
                <script>shard = 1</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>39</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ffaa7f</mFgColor>
                <mBgColor>#000000</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>^A chipped iconic shard appears and clatters to the ground.</string>
                    <string>^A smooth iconic shard appears and clatters to the ground.</string>
                    <string>^A jagged iconic shard appears and clatters to the ground</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>1</integer>
                    <integer>1</integer>
                    <integer>1</integer>
                </regexCodePropertyList>
            </Trigger>
            <Trigger isActive="no" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>bal</name>
                <script>if gold == 1 then send("take gold")
end
if shard == 1 then send("take shard")
end
if pearl == 1 then send("take pearl") 
end</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>99</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ff0000</mFgColor>
                <mBgColor>#ffff00</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>^You have recovered balance on all limbs\.$</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>1</integer>
                </regexCodePropertyList>
            </Trigger>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>pearl</name>
                <script>pearl = 1</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>39</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ff0000</mFgColor>
                <mBgColor>#ffff00</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>A glistening iridescent pearl tumbles out of the corpse of a barnacle encrusted oyster.</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>0</integer>
                </regexCodePropertyList>
            </Trigger>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>got pearl</name>
                <script>pearl = 0
disableTrigger("bal")</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>39</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#ff0000</mFgColor>
                <mBgColor>#ffff00</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>You scoop up a glistening iridescent pearl.</string>
                    <string>You pick up a glistening iridescent pearl.</string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>0</integer>
                    <integer>0</integer>
                </regexCodePropertyList>
            </Trigger>
            <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="yes" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
                <name>slain</name>
                <script>slain = true
if selectString( line, 1 ) > -1 then fg("CornflowerBlue") resetFormat() end
enableTrigger("bal")</script>
                <triggerType>0</triggerType>
                <conditonLineDelta>99</conditonLineDelta>
                <mStayOpen>0</mStayOpen>
                <mCommand></mCommand>
                <mFgColor>#0037a5</mFgColor>
                <mBgColor>#000000</mBgColor>
                <mSoundFile></mSoundFile>
                <colorTriggerFgColor>#000000</colorTriggerFgColor>
                <colorTriggerBgColor>#000000</colorTriggerBgColor>
                <regexCodeList>
                    <string>^You have slain </string>
                </regexCodeList>
                <regexCodePropertyList>
                    <integer>1</integer>
                </regexCodePropertyList>
            </Trigger>
        </TriggerGroup>
    </TriggerPackage>
</MudletPackage>


suggestions??

Edit and bump. I -think- I got it right, I just need to test it out more and am hoping someone tells me if and what I did wrong

Re: picking up stuff

Posted: Thu Sep 30, 2010 3:08 pm
by Trilliana
pseudo-bump?

Re: picking up stuff

Posted: Thu Sep 30, 2010 7:21 pm
by tsuujin
I solve this problem by only activating the collection trigger when I've actually slain something, and turning it off asap.

Re: picking up stuff

Posted: Thu Sep 30, 2010 9:12 pm
by Quazzi
Code: [show] | [select all] lua
  <?xml version="1.0" encoding="UTF-8" ?> 
  <!DOCTYPE MudletPackage (View Source for full doctype...)> 
- <MudletPackage version="1.0">
- <TriggerPackage>
- <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="yes" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
  <name>slain</name> 
  <script /> 
  <triggerType>0</triggerType> 
  <conditonLineDelta>0</conditonLineDelta> 
  <mStayOpen>8</mStayOpen> 
  <mCommand /> 
  <mFgColor>#ff0000</mFgColor> 
  <mBgColor>#000000</mBgColor> 
  <mSoundFile /> 
  <colorTriggerFgColor>#000000</colorTriggerFgColor> 
  <colorTriggerBgColor>#000000</colorTriggerBgColor> 
- <regexCodeList>
  <string>^You have slain .*</string> 
  </regexCodeList>
- <regexCodePropertyList>
  <integer>1</integer> 
  </regexCodePropertyList>
- <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
  <name>money</name> 
  <script>goldtrigger = tempTrigger("You have recovered",[[send("get gold") killTrigger(goldtrigger)]]) setTriggerStayOpen("slain", 1) --killTrigger(goldtrigger)</script> 
  <triggerType>0</triggerType> 
  <conditonLineDelta>0</conditonLineDelta> 
  <mStayOpen>0</mStayOpen> 
  <mCommand /> 
  <mFgColor>#ff0000</mFgColor> 
  <mBgColor>#ffff00</mBgColor> 
  <mSoundFile /> 
  <colorTriggerFgColor>#000000</colorTriggerFgColor> 
  <colorTriggerBgColor>#000000</colorTriggerBgColor> 
- <regexCodeList>
  <string>sovereigns</string> 
  </regexCodeList>
- <regexCodePropertyList>
  <integer>0</integer> 
  </regexCodePropertyList>
  </Trigger>
- <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
  <name>shards</name> 
  <script>shardtrigger = tempTrigger("You have recovered",[[send("get shard") killTrigger(shardtrigger)]]) setTriggerStayOpen("slain", 1) --killTrigger(shardtrigger)</script> 
  <triggerType>0</triggerType> 
  <conditonLineDelta>39</conditonLineDelta> 
  <mStayOpen>0</mStayOpen> 
  <mCommand /> 
  <mFgColor>#ff0000</mFgColor> 
  <mBgColor>#ffff00</mBgColor> 
  <mSoundFile /> 
  <colorTriggerFgColor>#000000</colorTriggerFgColor> 
  <colorTriggerBgColor>#000000</colorTriggerBgColor> 
- <regexCodeList>
  <string>shard</string> 
  </regexCodeList>
- <regexCodePropertyList>
  <integer>0</integer> 
  </regexCodePropertyList>
  </Trigger>
  </Trigger>
  </TriggerPackage>
  </MudletPackage>

Re: picking up stuff

Posted: Thu Sep 30, 2010 9:14 pm
by Vadi
The above xml seems to have come out of an editor in it's partial form :|

Re: picking up stuff

Posted: Thu Sep 30, 2010 9:19 pm
by Quazzi
I copy and pasted it - how should i do it?

Re: picking up stuff

Posted: Thu Sep 30, 2010 9:22 pm
by Vadi
Try saving it as a file and opening the file in wordpad or somesuch.

Re: picking up stuff

Posted: Thu Sep 30, 2010 9:26 pm
by Quazzi
Hrm, i did. Lets try this.