pls help meee
 

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

pls help meee

Started by satya, 27 April, 2008, 12:36:20

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

satya

hey guyss help me out b4 i scratch all my hairs off  :-X

i wanted to learn lua to script in ptokax, i just got a site from this very forum so here is the site wich i m usin for the same
http://wiki.ptokax.ath.cx/doku.php?id=scriptinghelp:ptokaxapi#the_frmhub_object


from this site i have used the xample codes in my hub just take a look at them

function NewUserConnected(user)
	user:SendData("Welcome-Bot","Welcome! Have a good time!")
end 


function ChatArrival(user,data)
  data=string.sub(data,1,string.len(data)-1) -- remove end pipe
  if string.find(data,"https?://") or string.find(data,"www%.") then -- if this string is found then
    user:SendData("AntiAdvBot","Do not post URLs!") -- send a message
    user:Disconnect() -- and disconnect
    return 1 -- block the chat message
  end
end


well this are 2 diff codes wich i have used for 2 diff scripts and nothin is happenin mannn i m usin ptokax 0.4.0.0 the latest one no error nothing but i don get output mannn can ne one tell me y

Eyes says everything,
Its on you how u read em...

PPK

You using examples that are for old PtokaX versions and not working on 0.4.0.0. Check scripting.docs folder that is in package with PtokaX.

For 0.4.0.0 that code will looks like..
function UserConnected(user)
	Core.SendToUser(user, "<Welcome-Bot> Welcome! Have a good time!")
end 


function ChatArrival(user, data)
  data=string.sub(data,1,string.len(data)-1) -- remove end pipe
  if string.find(data,"https?://") or string.find(data,"www%.") then -- if this string is found then
    Core.SendToUser(user, "<AntiAdvBot> Do not post URLs!") -- send a message
    Core.Disconnect(user) -- and disconnect
    return true -- block the chat message
  end
end
"Most of you are familiar with the virtues of a programmer. There are three, of course: laziness, impatience, and hubris." - Larry Wall

bastya_elvtars

This is a heads-up that the wiki badly needs updating. :-/
Everything could have been anything else and it would have just as much meaning.

satya


well thanks for dat but i copied the script wich u said dat is for the ptokax 0.4.0.0 but still its not working mann


well can u tell me a site or nething wich can help me to learn the scripting. and also is there ne software just like the C compiler where we write the codes n execute it, for tryin this scriptsss

Eyes says everything,
Its on you how u read em...

bastya_elvtars

For trying the scripts, you can run the Lua executable. The scripting documentation and the Lua manual can help you. You don't have to start with PtokaX, I recommend generic Lua first.
Everything could have been anything else and it would have just as much meaning.

SMF spam blocked by CleanTalk