Leviathan v4.1[FINAL] - Page 2
 

Leviathan v4.1[FINAL]

Started by Cêñoßy†ê, 09 January, 2009, 21:56:25

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

onkel

tja

somone manage take out the anti spam/advertize and make a standalone script from this one? looks awsome :)
works compared to older editions

the-master

#26
another problem  ??? timed messages won't stop, gives error about no messages in file..

in file Commands.lua, lines 2373 untill 2397, "function chatter" should be changed to avoid problems with start and stopping the chatter
function Command.chatter(user,data)
	local _,_,func = data:find("%b<>%s+%S+%s+(%S+)")
		if func then
			if func:lower() == "on" or func:lower() == "off" then
				if func:lower() == "on" and next(Tables.Messages) then
					if Cfg.Chatter.On_Off == "on" then
					SendMessage(user.sNick,Cfg.Bot_Name,"ERROR!! Timed Messages already running")		
					else
					Core.SendToOps("<"..Cfg.Bot_Name.."> *** "..Cvrt.P2[user.iProfile].." "..user.sNick.." changed Timed Messages to: "..func:upper())
					Cfg.Chatter.On_Off = func:lower()
					SaveToFile(ScriptSettingsFile,Cfg,"Cfg")
					Tmr.Chatter = TmrMan.AddTimer(Cfg.Chatter.Time*Cvrt.C2[Cfg.Chatter.What],"Chatter")
					end
				elseif func:lower() == "off" then
					if Cfg.Chatter.On_Off == "off" then
					SendMessage(user.sNick,Cfg.Bot_Name,"ERROR!! Timed Messages already stopped")
					else
					Core.SendToOps("<"..Cfg.Bot_Name.."> *** "..Cvrt.P2[user.iProfile].." "..user.sNick.." changed Timed Messages to: "..func:upper())
					Cfg.Chatter.On_Off = func:lower()
					SaveToFile(ScriptSettingsFile,Cfg,"Cfg")
					TmrMan.RemoveTimer(Tmr.Chatter)
					end
				else
					SendMessage(user.sNick,Cfg.Bot_Name,"*** No messages in table, Starting ignored !!")
				end
			end
		else
				SendMessage(user.sNick,Cfg.Bot_Name,wrong.."chatter <on/off>")
		end
	return true
end
keep on sharing :)

Cêñoßy†ê

Quote from: the-master on 29 May, 2010, 15:36:37
another problem  ??? timed messages won't stop, gives error about no messages in file..

in file Commands.lua, lines 2373 untill 2397, "function chatter" should be changed to avoid problems with start and stopping the chatter
function Command.chatter(user,data)
	local _,_,func = data:find("%b<>%s+%S+%s+(%S+)")
		if func then
			if func:lower() == "on" or func:lower() == "off" then
				if func:lower() == "on" and next(Tables.Messages) then
					if Cfg.Chatter.On_Off == "on" then
					SendMessage(user.sNick,Cfg.Bot_Name,"ERROR!! Timed Messages already running")		
					else
					Core.SendToOps("<"..Cfg.Bot_Name.."> *** "..Cvrt.P2[user.iProfile].." "..user.sNick.." changed Timed Messages to: "..func:upper())
					Cfg.Chatter.On_Off = func:lower()
					SaveToFile(ScriptSettingsFile,Cfg,"Cfg")
					Tmr.Chatter = TmrMan.AddTimer(Cfg.Chatter.Time*Cvrt.C2[Cfg.Chatter.What],"Chatter")
					end
				elseif func:lower() == "off" then
					if Cfg.Chatter.On_Off == "off" then
					SendMessage(user.sNick,Cfg.Bot_Name,"ERROR!! Timed Messages already stopped")
					else
					Core.SendToOps("<"..Cfg.Bot_Name.."> *** "..Cvrt.P2[user.iProfile].." "..user.sNick.." changed Timed Messages to: "..func:upper())
					Cfg.Chatter.On_Off = func:lower()
					SaveToFile(ScriptSettingsFile,Cfg,"Cfg")
					TmrMan.RemoveTimer(Tmr.Chatter)
					end
				else
					SendMessage(user.sNick,Cfg.Bot_Name,"*** No messages in table, Starting ignored !!")
				end
			end
		else
				SendMessage(user.sNick,Cfg.Bot_Name,wrong.."chatter <on/off>")
		end
	return true
end

runs fine on v5 ;)
Powered By Leviathan™ 2nd Generation v. 1.9

P_pan

#28
what im doing wrong guys?

im trying to get this script working
but do fail strait on start up
i do have also the patch included
the error im getting is :
LV_4.1.lua:33: attempt to index global 'Core' (a nil value)


found it and is fixed :)

baba.runner

Hi and where can we get the V5?

Thx in advance and happy holidays to all.

Sketer0070

Hello.

I'am working with PtokaX 4.1.1 /Lua5.1 under debian.
I want to add Leviathan to my Hub.

When extracting the files i'll put them in the folder "scripts"
LV_4.1.lua
changelog.txt
a Map called libs
and a Map called LV_DataBase

When i start the script I'll get the error : ***Error, script LV_4.1.lua. Start failed

What goes wrong ?
Can someone help me ?

the-master

Did you read my post about Levi on Ubuntu?
http://forum.ptokax.org/index.php?topic=8198#msg79213
To see what goes wrong, open logs/script-errors
keep on sharing :)

SMF spam blocked by CleanTalk