Initial commit.
This commit is contained in:
commit
4f3db9e27f
5 changed files with 1505 additions and 0 deletions
112
scripts.xml
Normal file
112
scripts.xml
Normal file
|
@ -0,0 +1,112 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE MudletPackage>
|
||||
<MudletPackage version="1.0">
|
||||
<ScriptPackage>
|
||||
<ScriptGroup isActive="yes" isFolder="yes">
|
||||
<name>ftpd-scripts</name>
|
||||
<packageName></packageName>
|
||||
<script>-------------------------------------------------
|
||||
-- Put your Lua functions here. --
|
||||
-- --
|
||||
-- Note that you can also use external Scripts --
|
||||
-------------------------------------------------
|
||||
</script>
|
||||
<eventHandlerList/>
|
||||
<Script isActive="yes" isFolder="no">
|
||||
<name>disable</name>
|
||||
<packageName></packageName>
|
||||
<script>-------------------------------------------------
|
||||
-- Put your Lua functions here. --
|
||||
-- --
|
||||
-- Note that you can also use external Scripts --
|
||||
-------------------------------------------------
|
||||
tempTimer(1, function () disableAlias("wez_monety_z") end)
|
||||
tempTimer(1, function () disableAlias("wloz_monety_do") end)
|
||||
tempTimer(1, function () disableTrigger("przelamanie") end)
|
||||
tempTimer(1, function () disableTrigger("blokuje_cie") end)</script>
|
||||
<eventHandlerList/>
|
||||
</Script>
|
||||
<Script isActive="yes" isFolder="no">
|
||||
<name>collect</name>
|
||||
<packageName></packageName>
|
||||
<script>scripts.inv["collect"] = scripts.inv["collect"] or {}
|
||||
scripts.inv.collect["modes"] = {"monety",
|
||||
"kamienie",
|
||||
"monety i kamienie",
|
||||
"druzynowe monety",
|
||||
"druzynowe kamienie",
|
||||
"druzynowe monety i kamienie",
|
||||
"nic"}
|
||||
scripts.inv.collect["current_mode"] = 3
|
||||
scripts.inv.collect["footer_info_collect_to_text"] = {"M", "K", "MK", "M+", "K+", "M+K+", ""}
|
||||
scripts.ui.bind_color = "<LawnGreen>"
|
||||
|
||||
function scripts.inv.collect:set_mode(mode)
|
||||
if not scripts.inv.collect:check_option(mode) then
|
||||
return
|
||||
end
|
||||
scripts.inv.collect["current_mode"] = mode
|
||||
end
|
||||
|
||||
function scripts.inv.collect:check_option(mode)
|
||||
if not scripts.inv.collect["modes"][mode] then
|
||||
scripts:print_log("Nie ma takiej opcji, sprawdz /zbieranie")
|
||||
return false
|
||||
else
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
function scripts.inv.collect:key_pressed(force)
|
||||
if scripts.inv.collect.check_body or force == true then
|
||||
if scripts.inv.collect["current_mode"] == 1 or scripts.inv.collect["current_mode"] == 4 then
|
||||
sendAll("wez monety z ciala",
|
||||
"odloz miedziane monety",
|
||||
false)
|
||||
elseif scripts.inv.collect["current_mode"] == 2 or scripts.inv.collect["current_mode"] == 5 then
|
||||
sendAll("wez kamienie z ciala",
|
||||
"ocen kamienie",
|
||||
false)
|
||||
elseif scripts.inv.collect["current_mode"] == 3 or scripts.inv.collect["current_mode"] == 6 then
|
||||
sendAll("wez monety z ciala",
|
||||
"odloz miedziane monety",
|
||||
"wez kamienie z ciala",
|
||||
"ocen kamienie",
|
||||
false)
|
||||
end
|
||||
scripts.inv.collect.check_body = false
|
||||
end
|
||||
end
|
||||
|
||||
function scripts.inv.collect:killed_action()
|
||||
if scripts.inv.collect["current_mode"] ~= 7 then
|
||||
cecho("\n" .. scripts.ui.bind_color .. "[bind <yellow>ctrl+3]" .. scripts.ui.bind_color .. " wez z ciala\n")
|
||||
scripts.inv.collect.check_body = true
|
||||
end
|
||||
end
|
||||
|
||||
function scripts.inv.collect:team_killed_action(name)
|
||||
if scripts.inv.collect["current_mode"] ~= 4 and scripts.inv.collect["current_mode"] ~= 5
|
||||
and scripts.inv.collect["current_mode"] ~= 6 then
|
||||
return
|
||||
end
|
||||
|
||||
if ateam.team_names[name] then
|
||||
cecho("\n" .. scripts.ui.bind_color .. "[bind <yellow>ctrl+3]" .. scripts.ui.bind_color .." wez z ciala\n")
|
||||
scripts.inv.collect.check_body = true
|
||||
end
|
||||
end
|
||||
|
||||
function scripts.inv.collect:print_help()
|
||||
scripts:print_log("Wspierane opcje:")
|
||||
for k, v in pairs(scripts.inv.collect["modes"]) do
|
||||
echo (k .. " - " .. v .. "\n")
|
||||
end
|
||||
scripts:print_log("Aktualne ustawienie: " .. scripts.inv.collect.modes[scripts.inv.collect["current_mode"]])
|
||||
scripts:print_log("Ustaw poprzez zawolanie '/zbieranie [numer opcji]")
|
||||
end</script>
|
||||
<eventHandlerList/>
|
||||
</Script>
|
||||
</ScriptGroup>
|
||||
</ScriptPackage>
|
||||
</MudletPackage>
|
Loading…
Add table
Add a link
Reference in a new issue