PtokaX forum

Archive => Archived 4.0 boards => Help with Lua 4 scripts => Topic started by: G4rF!3Ld on 16 April, 2004, 03:40:15

Title: How i make???
Post by: G4rF!3Ld on 16 April, 2004, 03:40:15
Hiya!

How i make new commands??
Ex:

!garfield
!daynews

etc etc etc ???

Thanks!
;)
Title:
Post by: ??????Hawk?????? on 16 April, 2004, 03:46:42
click here (http://www.lua.org/manual/4.0/manual.html)
Title:
Post by: pHaTTy on 16 April, 2004, 03:50:34
little template for ya


function DataArrival(user,data)
if strsub(vardy, 1, 1) == "<" then local vardy=strsub(vardy,1,strlen(vardy)-1)
local s,e,cmd = strfind(vardy, "%b<>%s+(%S+)")

if cmd == "!acommand" then
--//todo code

elseif cmd == "!bcommand" then
--//todo code

end; end; end;

cya
Title:
Post by: G4rF!3Ld on 16 April, 2004, 16:54:01
Thanks.....
But.  one more question..
where i put this code (uk-kingdom)pH?tt?  ?(

??????Hawk??????
Thanks for manual, but my english isin't good... it's very hard to me understand all the words there!  :P  

 ;(
Title:
Post by: [NL]Pur on 17 April, 2004, 23:50:34
in a file with a extension       .lua
Title:
Post by: Snooze on 17 April, 2004, 23:55:48
Try to explain what you want those commands to do and we can provide better examples ..


**Snooze
- Wanna learn lua ?
- Just hang here for a few weeks :D