PtokaX forum

Archive => Archived 5.0 boards => Request for scripts => Topic started by: antonio on 14 October, 2005, 23:37:38

Title: help
Post by: antonio on 14 October, 2005, 23:37:38
I try a script for the commandos of the mouse for single user and a script that it sendes is in pvt or in main to time rows from prefixed me... can be had that? thanks




cerco uno script per i comandi del mouse per soli user e uno script  che invia sia in pvt o in main a tempo un file da me prefissato... si pu? avere ci?? grazie
Title:
Post by: 6Marilyn6Manson6 on 15 October, 2005, 00:18:51
QuoteOriginally posted by antonio
a script that it sendes is in pvt or in main to time rows from prefixed me... can be had that? thanks

Try this:

--- Periodical PM and DATA send TxtFile? requested by antonio
--- Ripped by Herodes
--- optimized by 6Marilyn6Manson6 15 / 10 /2005

botsName = "SeNDeR"   --- Change this to whatever u want
TxtFile = "sendfile.txt"   --- be sure to have a file corresponding to this one in the 'scripts'
thecmd = "!sendfile"   --- change this to whatever u want ...

secs = 1000
mins = 60*secs
timerinterval = 20*mins   --- I hope this is clear enough ...

function Main()
frmHub:RegBot(botsName)--- and Register it again ... ( using the string defined by the ' botsName ' value, again )
SetTimer(timerinterval)
StartTimer()
end

function OnTimer()
SendEm()
end

function ChatArrival( user, data)
if user.bOperator then
data = string.sub(data,1,-2)
local s,e,cmd = string.find( data, "%b<>%s+(%S+)" )
if ( cmd == thecmd ) then
SendEm()
end
end
end
function SendEm()
local sText = ReadTextFile(TxtFile)
for i, user in frmHub:GetOnlineUsers() do
if user.iProfile == -1 then
user:SendData(botsName, sText)
user:SendPM(botsName, sText)
end
end
end

function ReadTextFile(file)
local f=io.open(file, "r");
if f then local m=f:read("*all");f:close;return m;end;
return "file isn't there";
end

c ya
Title: help
Post by: antonio on 15 October, 2005, 17:48:44
ciao  6Marilyn6Manson6 ti cercavo anche in un'altro sito ma felice di trovarti mi da questo errore dove sbaglio? mi dici la procedura come salvarlo... scusa so negato in merito. grazie.


Syntax C:\Documents and Settings\user\Desktop\ptokax2\scripts\SeNDeR.lua:6: function arguments expected near `='
Title:
Post by: bastya_elvtars on 15 October, 2005, 20:16:26
Copy from between the horiz. lines only! ;)
Title:
Post by: 6Marilyn6Manson6 on 15 October, 2005, 21:35:05
Copi da quando comincia sta riga:

--- Periodical PM and DATA send TxtFile? requested by antonio
fino all'ultimo

end
ci si becca. ciao
Title: help
Post by: antonio on 15 October, 2005, 22:13:41
nada non va .. ecco l'errore.
[22:12] Syntax [string "--- Periodical PM and DATA send TxtFile? requested by antonio
..."]:44: function arguments expected near `;'
Title:
Post by: 6Marilyn6Manson6 on 15 October, 2005, 22:58:40
QuoteOriginally posted by antonio
nada non va .. ecco l'errore.
[22:12] Syntax [string "--- Periodical PM and DATA send TxtFile? requested by antonio
..."]:44: function arguments expected near `;'

Appena ho un p? di tempo lo vedo credimi sono incasinato, penso domani. Ciao :)