mudlet-scripts/scripts.xml
2017-12-25 18:55:04 +01:00

232 lines
10 KiB
XML

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE MudletPackage>
<MudletPackage version="1.001">
<ScriptPackage>
<ScriptGroup isActive="yes" isFolder="yes">
<name>ftpd-scripts</name>
<packageName></packageName>
<script></script>
<eventHandlerList/>
<Script isActive="yes" isFolder="no">
<name>ftpd-disable</name>
<packageName></packageName>
<script>-------------------------------------------------
-- Put your Lua functions here. --
-- --
-- Note that you can also use external Scripts --
-------------------------------------------------
tempTimer(1, function () disableAlias(&quot;wez_monety_z&quot;) end)
tempTimer(1, function () disableAlias(&quot;wloz_monety_do&quot;) end)
tempTimer(1, function () disableTrigger(&quot;przelamanie&quot;) end)
tempTimer(1, function () disableTrigger(&quot;blokowanie_proba_kogos&quot;) end)
tempTimer(1, function () disableTrigger(&quot;blokowanie_proba_ciebie&quot;) end)
tempTimer(1, function () disableTrigger(&quot;blokuje_cie&quot;) end)
tempTimer(1, function () disableTrigger(&quot;walczysz_bez_broni&quot;) end)
tempTimer(1, function () disableTrigger(&quot;wytracenie_tobie&quot;) end)
tempTimer(1, function () disableTrigger(&quot;mozesz_dobywac&quot;) end)
tempTimer(1, function () disableTrigger(&quot;ogluch&quot;) end)
tempTimer(1, function () disableTrigger(&quot;powrot-z-oglucha&quot;) end)
tempTimer(1, function () disableTrigger(&quot;masz_poczte&quot;) end)
tempTimer(1, function () disableTrigger(&quot;zaslaniasz_ty&quot;) end)
tempTimer(1, function () disableScript(&quot;ui_new_location_event&quot;) end)</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd-collect</name>
<packageName></packageName>
<script>function scripts.inv.collect:key_pressed(force)
if scripts.inv.collect.check_body or force == true then
if scripts.inv.collect[&quot;current_mode&quot;] == 1 or scripts.inv.collect[&quot;current_mode&quot;] == 3
or scripts.inv.collect[&quot;current_mode&quot;] == 4 or scripts.inv.collect[&quot;current_mode&quot;] == 6 then
if scripts.inv.collect.money_type == 1 then
sendAll(&quot;wez monety z ciala&quot;, true)
elseif scripts.inv.collect.money_type == 2 then
sendAll(&quot;wez srebrne monety z ciala&quot;, &quot;wez zlote monety z ciala&quot;, true)
elseif scripts.inv.collect.money_type == 3 then
sendAll(&quot;wez zlote monety z ciala&quot;, true)
end
end
if scripts.inv.collect[&quot;current_mode&quot;] == 2 or scripts.inv.collect[&quot;current_mode&quot;] == 3
or scripts.inv.collect[&quot;current_mode&quot;] == 5 or scripts.inv.collect[&quot;current_mode&quot;] == 6 then
sendAll(&quot;wez kamienie z ciala&quot;,
&quot;ocen kamienie&quot;, false)
end
scripts.inv.collect.check_body = false
end
end</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd-beep-bind</name>
<packageName></packageName>
<script>function scripts.utils.bind_functional(command, silent)
scripts.utils.functional_key = command
if not silent then
cecho(&quot;\n\n&quot; .. scripts.ui.bind_color .. &quot;bind &lt;yellow&gt;]&quot; .. scripts.ui.bind_color .. &quot;: &quot; .. command .. &quot;\n\n&quot;)
raiseEvent(&quot;playBeep&quot;)
end
end
function scripts.utils.bind_ship(command, if_locate, silent)
scripts.utils.ship_key = command
cecho(&quot;\n\n&quot; .. scripts.ui.bind_color .. &quot;bind &lt;yellow&gt;[&quot; .. scripts.ui.bind_color .. &quot;: &quot; .. command .. &quot;\n\n&quot;)
raiseEvent(&quot;playBeep&quot;)
end</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd-sneaky-click</name>
<packageName></packageName>
<script>function scripts_ui_info_sneaky_click(id)
if id then
if id &lt; 1 or id &gt; 3 then
error(&quot;Wrong input&quot;)
end
amap.walk_mode = id
scripts:print_log(&quot;Zmieniam tryb chodzenia.&quot;)
scripts.ui.footer_info_sneaky:echo(&quot;&lt;font color='&quot;..scripts.ui[&quot;footer_info_normal&quot;]..&quot;'&gt;Przemykam:&lt;/font&gt; &quot; .. scripts.ui[&quot;footer_info_walk_mode_to_text&quot;][amap.walk_mode] .. &quot;&lt;/font&gt;&quot;)
else
amap.walk_mode = amap.walk_mode%3 + 1
scripts:print_log(&quot;Zmieniam tryb chodzenia.&quot;)
scripts.ui.footer_info_sneaky:echo(&quot;&lt;font color='&quot;..scripts.ui[&quot;footer_info_normal&quot;]..&quot;'&gt;Przemykam:&lt;/font&gt; &quot; .. scripts.ui[&quot;footer_info_walk_mode_to_text&quot;][amap.walk_mode] .. &quot;&lt;/font&gt;&quot;)
end
end</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd-new-location</name>
<packageName></packageName>
<script>function ui_new_location_event(...)
if not amap[&quot;went_sneaky&quot;] then
scripts.ui:info_hidden_update(&quot;&quot;)
scripts.ui.info_hidden_value = 0
scripts.ui.footer_map:setColor(scripts.ui.footer_r, scripts.ui.footer_g, scripts.ui.footer_b)
scripts.ui.footer_main:setColor(scripts.ui.footer_r, scripts.ui.footer_g, scripts.ui.footer_b)
disableTimer(&quot;hidden_timer&quot;)
else
scripts.ui.info_hidden_value = 0
scripts.ui:info_hidden_update(&quot;0&quot;)
scripts.ui.footer_map:setColor(128,128,128)
scripts.ui.footer_main:setColor(128,128,128)
enableTimer(&quot;hidden_timer&quot;)
end
amap[&quot;went_sneaky&quot;] = false
end</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd-temp_bind</name>
<packageName></packageName>
<script>scripts.temp_binds = scripts.temp_binds or {}
scripts.temp_binds.binds = {[&quot;-&quot;] = nil, [&quot;=&quot;] = nil, [&quot;f5&quot;] = nil, [&quot;f6&quot;] = nil, [&quot;f7&quot;] = nil, [&quot;f8&quot;] = nil}
disableKey(&quot;temp_bind-&quot;)
disableKey(&quot;temp_bind=&quot;)
disableKey(&quot;temp_bindf5&quot;)
disableKey(&quot;temp_bindf6&quot;)
disableKey(&quot;temp_bindf7&quot;)
disableKey(&quot;temp_bindf8&quot;)
function scripts.temp_binds.unbind_temp(silent)
scripts.temp_binds.binds = {[&quot;-&quot;] = nil, [&quot;=&quot;] = nil, [&quot;f5&quot;] = nil, [&quot;f6&quot;] = nil, [&quot;f7&quot;] = nil, [&quot;f8&quot;] = nil}
disableKey(&quot;temp_bind-&quot;)
disableKey(&quot;temp_bind=&quot;)
disableKey(&quot;ftpd-temp_bindf5&quot;)
disableKey(&quot;ftpd-temp_bindf6&quot;)
disableKey(&quot;ftpd-temp_bindf7&quot;)
disableKey(&quot;ftpd-temp_bindf8&quot;)
if not silent then
scripts:print_log(&quot;Wyczyszczone&quot;)
end
end
scripts.utils:enable_keybinds(true)</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd-trigger-people</name>
<packageName></packageName>
<script>function scripts.people:process_person_trigger(text)
local to_select_string = text
local r, g, b
if scripts.people.trigger_suffix[string.lower(text)] then
to_select_string = to_select_string .. &quot; (&quot; .. scripts.people.trigger_suffix[string.lower(text)] .. &quot;)&quot;
selectString(text, 1)
r, g, b = getFgColor()
fg(&quot;slate_gray&quot;)
replace(to_select_string)
end
selectString(text, 1)
setFgColor(r, g, b)
resetFormat()
end
function scripts.people:process_trigger_name(short)
selectString(short, 1)
local add_text = &quot;&quot;
local obj = scripts.people.people_triggers_objects[scripts.people.people_triggers[string.lower(short)]]
local guild_name = scripts.people:get_guild_name(obj[&quot;guild&quot;])
if obj[&quot;name&quot;] ~= &quot;&quot; and guild_name then
add_text = obj[&quot;name&quot;] .. &quot;, &quot; .. guild_name
elseif obj[&quot;name&quot;] ~= &quot;&quot; then
add_text = obj[&quot;name&quot;]
elseif guild_name then
add_text = guild_name
end
local r, g, b = getFgColor()
replace(short .. &quot; (&quot; .. add_text .. &quot;)&quot;)
selectString(short, 1)
setFgColor(r, g, b)
if obj[&quot;name&quot;] ~= &quot;&quot; then
selectString(obj[&quot;name&quot;], 1)
fg(&quot;slate_grey&quot;)
end
if guild_name then
selectString(guild_name, 1)
fg(&quot;slate_grey&quot;)
end
resetFormat()
end</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd-amap-notes</name>
<packageName></packageName>
<script>function amap_db_check_note()
if amap.curr.id then
if getRoomUserData(amap.curr.id, &quot;note&quot;) ~= &quot;&quot; and amap.db.show_notes then
--amap:print_log(&quot;&lt;light_slate_blue&gt;&quot; .. getRoomUserData(amap.curr.id, &quot;note&quot;))
cecho(scripts.ui.bind_color .. &quot;\ninfo: &quot; .. scripts.ui.bind_color .. getRoomUserData(amap.curr.id, &quot;note&quot;) .. &quot;\n&quot;)
end
end
end
</script>
<eventHandlerList/>
</Script>
<Script isActive="yes" isFolder="no">
<name>ftpd-attack-mode</name>
<packageName></packageName>
<script>function scripts_ui_info_attack_mode_click()
ateam.attack_mode = ateam.attack_mode%3 + 1
scripts.ui.footer_info_attack_mode:echo(&quot;&lt;font color='&quot;..scripts.ui[&quot;footer_info_normal&quot;]..&quot;'&gt;Atak:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/font&gt; &lt;font color='&quot;..scripts.ui[&quot;footer_info_neutral&quot;]..&quot;'&gt;&quot; .. ateam[&quot;footer_info_attack_mode_to_text&quot;][ateam.attack_mode] .. &quot;&lt;/font&gt;&quot;)
scripts:print_log(&quot;Zmieniam tryb ataku.&quot;)
end</script>
<eventHandlerList/>
</Script>
</ScriptGroup>
</ScriptPackage>
</MudletPackage>