can some body give me a few hints plz
 

News:

29 December 2022 - PtokaX 0.5.3.0 (20th anniversary edition) released...
11 April 2017 - PtokaX 0.5.2.2 released...
8 April 2015 Anti child and anti pedo pr0n scripts are not allowed anymore on this board!
28 September 2015 - PtokaX 0.5.2.1 for Windows 10 IoT released...
3 September 2015 - PtokaX 0.5.2.1 released...
16 August 2015 - PtokaX 0.5.2.0 released...
1 August 2015 - Crowdfunding for ADC protocol support in PtokaX ended. Clearly nobody want ADC support...
30 June 2015 - PtokaX 0.5.1.0 released...
30 April 2015 Crowdfunding for ADC protocol support in PtokaX
26 April 2015 New support hub!
20 February 2015 - PtokaX 0.5.0.3 released...
13 April 2014 - PtokaX 0.5.0.2 released...
23 March 2014 - PtokaX testing version 0.5.0.1 build 454 is available.
04 March 2014 - PtokaX.org sites were temporary down because of DDOS attacks and issues with hosting service provider.

Main Menu

can some body give me a few hints plz

Started by ((UKSN))shad_dow, 23 July, 2004, 17:24:50

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

((UKSN))shad_dow

lo all

right here goes ,

can sombody give me a few hints/tips on
how i can do this

user types !add therapyuk 1

addys { "sytes.net" = 1 , "no-ip.com"= 2, }

when another user tpes !view

bot rsponces with

nick added therapyuk.sytes.net

any help would be appeciated

yours
shad
creator of Therapy-X? bot

plop

add a 2nd table.
tTable = { ["therapyuk"] = "((UKSN))shad_dow" }
for a,b in tTable do
   print(a.." added by: "..b)
end

plop
http://www.plop.nl lua scripts/howto\'s.
http://www.thegoldenangel.net
http://www.vikingshub.com
http://www.lua.org

>>----> he who fights hatred with hatred, drives the spreading of hatred <----<<

((UKSN))shad_dow

creator of Therapy-X? bot

??????Hawk??????

hi m8  maby  something like this  ???


addys {
 "sytes.net" ,
 "no-ip.com",
 }
FullAddys{}

!add therepy- 1    <-------- command in chat

_,_,prefix , command, text, action   <----------  your  strfind

FullAddys[text..addys[action]] = 1

((UKSN))shad_dow

cheers hawk andplop but i manged to do it diffent way ,

still to add save function

--// Addy-Test by shad_dow 
--// help by plop and hawk


Bot = "addy-test"


tAddys = {
[1]="styes.net",
[2]="no-ip.com",
[3]="beer.net"
}



function DataArrival(user,data)
	if (strsub(data,1,1)=="<") or (strsub(data,1,5+strlen(Bot))=="$To: "..Bot) then
		data=strsub(data,1,strlen(data)-1)
		s,e,cmd = strfind(data,"%b<>%s+(%S+)")

		if (cmd == "!add")   then
			doaddy(user,data)
			return 1
                                    
		end
	end
end


function doaddy(user,data)
	local s,e,cmd,hub,unit = strfind( data, "%b<>%s+(%S+)%s+(%S+)%s+(%d+)" )
	--local usr = GetItemByName(usr)
	if hub == nil and unit == nil then
		user:SendData(Bot,"Syntex is !add [hub name] [reason] ")
	else
		local add = tAddys[tonumber(unit)]
                if add == nil then
                                    user:SendData(Bot,"addy not found")

else
		SendToAll(Bot, "User "..user.sName.." added "..hub.."."..add.."")


	end	
end
end

yours shad
creator of Therapy-X? bot

SMF spam blocked by CleanTalk