Gagging messages

Gagging messages

Postby dracmas » Tue Jan 08, 2013 11:32 pm

Text on the screen you don't want to see? Gag it!

Use triggers to locate what you don't want to see and get rid of it.
For example:

A large sign with info for newbies has been placed here.

would trigger off of that sentence in mud. Then to gag:

deleteLine()

That's it! You'll never have to see that sentence again as long as the trigger is activated. Someone annoying you in chat? Use a trigger!
Soandso tells you (change the option to beginning of line substring)

deleteLine()

You can echo to let yourself know if you want to.
echo("Annoying player sent you a message")

You can even replace the text if you want to get more fancy.
Trigger : A large sign with info for newbies has been placed here.
Code:
selectString( "A large sign with info for newbies has been placed here.", 1 )
replace( "The only thing left of this defaced sign is a spray painted smiley face." )

Check the manual for different ways to trigger text:
http://wiki.mudlet.org/w/Manual:Trigger_Engine
dracmas
 
Posts: 10
Joined: Mon Dec 31, 2012 3:51 pm
Status: Offline

Re: Gagging messages

Postby dracmas » Wed Jan 09, 2013 7:58 pm

image: http://i.troll.ws/a72cbb46.png

Here's an example of how you can change text around in the mud to work for you client side.
Note: MSDP has to be running for this to work.

After installed go to the South Gate of Newbatia. See anything different?

First code is called cardboard and second one just in case is for msdp. Select the text for both in notepad/editor saving them as cardboard.xml and msdp.xml Then you can load them into Mudlet with the Package Manager.

cardboard.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
    <AliasPackage>
        <Alias isActive="yes" isFolder="no">
            <name>cardboard from taking</name>
            <script>if atcp.MSDPROOM_VNUM == &quot;34200&quot; then
echo(&quot;\nThis piece of cardboard is too heavy to pick up.&quot;)
end -- if</script>
            <command></command>
            <packageName></packageName>
            <regex>^(get|take) cardboard$</regex>
        </Alias>
<Alias isActive="yes" isFolder="no">
            <name>read-cardboard</name>
            <script>if atcp.MSDPROOM_VNUM == &quot;34200&quot; then
cecho(&quot;\n&lt;grey&gt;Cardboard with directions written upon it.\nNote: All runs are from Newbatia's South gate.&quot;)
cecho(&quot;\n&lt;grey&gt;1. Blaster's temple\nRun: 9n Overall Difficulty: Level 10+, 2-3 man group.&quot;)
cecho(&quot;\n&lt;grey&gt;2. Carnival\nRun: 10nenw6n Overall Difficulty: Newbie.&quot;)
cecho(&quot;\n&lt;grey&gt;3. Chessboard\nRun: 10nenen Overall difficulty: Level 1 Solo to Level 20 Group.&quot;)
cecho(&quot;\n&lt;grey&gt;4. Circus\nRun: s3w2n2w3n Overall Difficulty: Mid newbie and up.&quot;)
cecho(&quot;\n&lt;grey&gt;5. Daar\nRun: 3nu Overall Difficulty: Low level newbies.&quot;)
cecho(&quot;\n&lt;grey&gt;6. Fens\nRun:  s2w2n3w Overall Difficulty: Mid newbie to high newbie.&quot;)
cecho(&quot;\n&lt;grey&gt;7. Newbatia\nRun: You're here! Overall Difficulty: 1+.&quot;)
cecho(&quot;\n&lt;grey&gt;8. Newbatis Adventurer's School\nRun: 1u; enter portal Overall Difficulty: Level 1 and up.&quot;)
cecho(&quot;\n&lt;grey&gt;9. Shadow Playground\nRun: n2es; open shadow; d Overall Difficulty: Level 15-20 Newbie, Mage Oriented.&quot;)
cecho(&quot;\n&lt;grey&gt;10.Star City\nRun: Be Flying  sws2ue;open vines;6e;worship orion;n Overall Difficulty: low level.&quot;)
cecho(&quot;\n&lt;grey&gt;11.Tiger Glen\nRun: 10nenw5nw Overall Difficulty: Newbie.&quot;)
cecho(&quot;\n&lt;grey&gt;12.Waterfall\nRun: s3w2n3w3nw4ne2un2un Overall Difficulty: ?&quot;)
end -- if</script>
            <command></command>
            <packageName></packageName>
            <regex>^(look|read) cardboard$</regex>
        </Alias>
    </AliasPackage>
    <TriggerPackage>
        <Trigger isActive="yes" isFolder="no" isTempTrigger="no" isMultiline="no" isPerlSlashGOption="no" isColorizerTrigger="no" isFilterTrigger="no" isSoundTrigger="no" isColorTrigger="no" isColorTriggerFg="no" isColorTriggerBg="no">
            <name>tablet-trigger</name>
            <script>selectString( &quot;A large sign with info for newbies has been placed here.&quot;, 1 )
deleteLine()
cecho( &quot;&lt;green&gt;\nA large sign with info for newbies has been placed here.\nA piece of cardboard leans against the southern wall.&quot; )


</script>
            <triggerType>0</triggerType>
            <conditonLineDelta>0</conditonLineDelta>
            <mStayOpen>0</mStayOpen>
            <mCommand></mCommand>
            <packageName></packageName>
            <mFgColor>#ff0000</mFgColor>
            <mBgColor>#ffff00</mBgColor>
            <mSoundFile></mSoundFile>
            <colorTriggerFgColor>#000000</colorTriggerFgColor>
            <colorTriggerBgColor>#000000</colorTriggerBgColor>
            <regexCodeList>
                <string>A large sign with info for newbies has been placed here.</string>
            </regexCodeList>
            <regexCodePropertyList>
                <integer>0</integer>
            </regexCodePropertyList>
        </Trigger>
    </TriggerPackage>
</MudletPackage>


msdp.xml
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.0">
    <ScriptPackage>
        <ScriptGroup isActive="yes" isFolder="yes">
            <name>thesloth_layout</name>
            <packageName>testing</packageName>
            <script></script>
            <eventHandlerList/>
            <Script isActive="yes" isFolder="no">
                <name>SERVER_ID</name>
                <packageName></packageName>
                <script>function SERVER_ID(event, args)
   initialise_msdp()
end -- SERVER_ID
</script>
                <eventHandlerList>
                    <string>MSDPSERVER_ID</string>
                </eventHandlerList>
            </Script>
            <Script isActive="yes" isFolder="no">
                <name>initialise_msdp</name>
                <packageName></packageName>
                <script>    function initialise_msdp()
      -- Set the PLUGIN_ID so the mud knows which version you're using.
      sendATCP(&quot;@PLUGIN_ID&quot;, &quot;GW2_Mudlet_Plugin_(version_1.0)&quot;)
      -- Tell the mud which MSDP variables to report.
      sendATCP(&quot;@REPORT&quot;, &quot;WORLD_TIME CHARACTER_NAME HEALTH HEALTH_MAX MANA MANA_MAX MOVEMENT MOVEMENT_MAX AREA_NAME ROOM_NAME ROOM_VNUM AC HONOR CONTINENT LEVEL CLASS DRACHMA ALIGNMENT EXPERIENCE MONEY STR CON DEX WIS INT STR_PERM CON_PERM DEX_PERM WIS_PERM WEAPON_DAM SPELL_BONUS_CAP HEAL_BONUS HEAL_BONUS_CAP CHARISMA CHARISMA_CAP FLAIL_DAM KICK_DAM HAND_DAM HAND_DAM_CAP DAM_RED DAM_RED_CAP SEX GROUP_LEADER TANK_HEALTH TANK_HEALTH_MAX TANK_LEVEL TANK_NAME LEVEL_SEC LEVEL_TER LEVEL_QUA LEVEL_QUI LEVEL_HEX LEVEL_SEP LEVEL_OCT LEVEL_AVA CITIZEN CLASS_SEC CLASS_TER CLASS_QUA CLASS_QUI CLASS_HEX CLASS_SEP CLASS_OCT CLASS_AVA STAB_DAM STAB_DAM_CAP UNDEAD_CONT UNDEAD_CONT_CAP SPELL_BONUS INT_PERM HITROLL DAMROLL OPPONENT_HEALTH OPPONENT_HEALTH_MAX OPPONENT_LEVEL OPPONENT_NAME TERRAIN AFFECTS ROOM_EXITS&quot;)
    end -- initialise_msdp
</script>
                <eventHandlerList/>
            </Script>
        </ScriptGroup>
    </ScriptPackage>
</MudletPackage>
dracmas
 
Posts: 10
Joined: Mon Dec 31, 2012 3:51 pm
Status: Offline


Return to Mudlet - unlimited possibilities

Who is online

Users browsing this forum: No registered users and 6 guests

cron