A lil help pls

For technical issues & scripting. Dump it all here!
Post Reply
Angyr
Posts: 12
Joined: Sun Aug 28, 2011 3:38 am

A lil help pls

Post by Angyr »

ok...following i robbed from aardwolf, but it's just continuing to countdown instead of telling me when next tic is...someone wanna tell me where i need to change it?


<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE muclient>
<!-- Saved on Saturday, July 05, 2008, 4:46 PM -->
<!-- MuClient version 4.31 -->

<!-- Plugin "Tick_Timer" generated by Plugin Wizard -->

<muclient>
<plugin
name="Tick_Timer"
author="Nick Gammon"
id="e50b1d08a0cfc0ee9c44947b"
language="Lua"
purpose="The time to the next tick is shown on the status bar."
date_written="2008-07-05 16:46:02"
requires="4.31"
version="1.0"
save_state="y"
>
</plugin>


<!-- Timers -->

<timers>
<timer enabled="y" second="2.00" offset_second="0.00" send_to="12"
>
<send>
last_tick = last_tick or os.time ()
SetStatus ("Time to tick: " .. (last_tick + 30) - os.time ())
</send>
</timer>
</timers>

<script>
<![CDATA[

function OnPluginTelnetOption (option)
if option == string.char (101,1) then
last_tick = os.time()
SetStatus ("Time to tick: " .. (last_tick + 30) - os.time ())
end -- if
end -- function

function OnPluginInstall ()
-- if disabled last time, stay disabled
if GetVariable ("enabled") == "false" then
ColourNote ("yellow", "", "Warning: Plugin " .. GetPluginName ().. " is currently disabled.")
check (EnablePlugin(GetPluginID (), false))
return
end -- they didn't enable us last time
end -- OnPluginInstall

-- pull in telnet option handling
dofile (GetPluginInfo (GetPluginID (), 20) .. "telnet_options.lua")

function OnPluginDisable ()
OnPluginSaveState()
end -- OnPluginSaveState

function OnPluginEnable ()
OnPluginSaveState()
end

function OnPluginSaveState ()
SetVariable ("enabled", tostring (GetPluginInfo (GetPluginID (), 17)))
end -- OnPluginSaveState

]]>
</script>
</muclient>
Angyr
Posts: 12
Joined: Sun Aug 28, 2011 3:38 am

Re: A lil help pls

Post by Angyr »

my guess is numbers are a lil off for kin...someone point me the right direction, this my first time tyring to script/do plugins...
Evilina
Posts: 1437
Joined: Wed Jan 25, 2006 8:42 am
Contact:

Re: A lil help pls

Post by Evilina »

http://arctic.elay.org/mushclient/Arcti ... 20v1.1.zip

This is what the plugin looks like

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE muclient>

<!-- Saved on Monday, July 14, 2003, 9:50 PM -->

<!-- MuClient version 3.42 -->

<!-- Plugin "TickTimer" generated by Plugin Wizard -->
-<muclient> -<plugin language="JScript" version="1.1" requires="3.42" date_written="2003-07-14 21:49:17" purpose="A Tick Timer for Arctic Mud" id="2875f28931f7f06be4bbe223" author="Yusuf Hayes" name="TickTimer"> +<description trim="y">

 </plugin> 
<!-- Get our standard constants -->
 <include name="constants.js"/> 
<!-- Aliases -->
 -<aliases> <alias enabled="y" match="tick" script="timeToTick"> </alias> <alias enabled="y" match="gtickon" script="groupTickOn"> </alias> <alias enabled="y" match="gtickoff" script="groupTickOff"> </alias> <alias enabled="y" match="tickon" script="tickOn"> </alias> <alias enabled="y" match="tickoff" script="tickOff"> </alias> </aliases>
 <!-- Triggers -->
 -<triggers> <trigger enabled="y" match="^It starts to snow\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^Darkness descends upon the mortals of Krynn\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^Lunitari is laughing as her light is obscured from Krynn by clouds\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^Solinari laughs as his light is obscured from Krynn by clouds\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^The darkness marks the end of another day\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^The rain has stopped.*$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^The rising sun.*$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^The sun disappears behind the cloudy skies of Krynn\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^You are hungry\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^You are thirsty\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^.*looks really sick, and shivers uncomfortably\.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^Your studies complete.*$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer"> </trigger> <trigger enabled="y" match="^(A|The|An) .* decays in your hands.$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" regexp="y" group="ticktimer" ignore_case="y"> </trigger> <trigger enabled="y" match="^.* closes (his|her).*$" script="resetTickTimer" other_back_colour="black" other_text_colour="black" sequence="100" group="ticktimer"> </trigger> </triggers>
 <!-- Timers -->
 -<timers> <timer name="ticktimer" enabled="y" script="tickTimer" offset_second="10" second="1" minute="1"> </timer> </timers>
 <!-- Script -->
 -<script> 
<![CDATA[ function tickTimer() { if(tick_group) { world.execute("gt TICK IN TEN SECONDS"); } else { world.note("TICK IN TEN SECONDS"); } } function resetTickTimer() { world->note("TICK TIMER RESET"); world.ResetTimer("ticktimer"); } function timeToTick() { var timetiltick; timetiltick = world.GetTimerInfo("ticktimer", 13); if(timetiltick > 50) { timetiltick = timetiltick - 50; } else { timetiltick = timetiltick + 10; } if(tick_group) { world.execute("gt TICK IN " + timetiltick); } else { world.note("TICK IN " + timetiltick); } } function groupTickOn() { tick_group = 1; tickOn(); world.note("Group Tick Timer ON"); } function groupTickOff() { tick_group = 0; world.note("Group Tick Timer OFF"); tickOn(); } function tickOn() { world.EnableTimer("ticktimer", true); world.note("Tick Timer ON"); } function tickOff() { world.EnableTimer("ticktimer", false); world.note("Tick Timer OFF"); } function OnPluginInstall() { var tick_group; groupTickOff(); } ]]>
 </script> 
<!-- Plugin help -->
 -<aliases> <alias enabled="y" match="TickTimer:help" script="OnHelp"> </alias> </aliases> -<script>
 <![CDATA[ function OnHelp (sName, sLine, wildcards) { world.Note (world.GetPluginInfo (world.GetPluginID, 3)); } ]]>
 </script> </muclient>
You need to change the triggers to events that happen in this game

I don't use mushclient nor have I ever, so this is about the best help your gonna get out of me.
Post Reply