cSlave 1.0 Full Precomplete Preview
 

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

cSlave 1.0 Full Precomplete Preview

Started by Corayzon, 17 August, 2004, 14:09:06

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Corayzon

cSlave 1.0 is now completly programmable!

Wanna learn lua4 for ptokax? but dont have the brains to pattern match or do anything else? Well this is for you!

And for the advanced ppl, dont be turned off, cause it also contains some super quick api resources for programing with speed and ease.

1 - Ptokax event scripting support for those scritps that return 1 to all process's, making it seem something strange is going on
-- cSlave 1.0 Demo pTokax Script

function Main()
	
end

function DataArrival(tUser, sData, bProcessReturned) 
	--SendToAll("*** " .. tUser.sName .. " -> " .. sData)
end

function NewUserConnected(tUser, bProcessReturned)
	
end

function OpConnected(tUser, bProcessReturned)
	
end

function UserDisconnected(tUser, bProcessReturned)
	
end

function OpDisconnected(tUser, bProcessReturned)
	
end
2 - Protocol event scripting to simply pass protocol to single functions for processing (very quick!)
-- Demo protocol script for cSlave 1.0

function doHello(tUser, sData)

	SendToAll(tUser.sName .. " sent " .. sData)

end

regProtocolEvent("$MyNick", doHello)
3 - Command based scripting allows inputted commands (+kick someone) to be directly linked to functions that are passed tUser, tArgs.
-- Script	:: Demo command event script for cSlave 1.0
--
-- Info		:: This scripts adds a command to cSlaves event system called 'hello'
--		   and loops through the arguments in the data
-----------------------------------------------------------
-- Dont have a clue whats happening?
-- More detailed information is in ptokax\scripts\cSlave Docs\

-- Example
-----------------------

-- Delcare a function for the command to execute
function doHello(tUser, tArgs, bProcessReturned)

	-- Skips executing this command if for some strange reason your hub uses it
	if bProcessReturned then return end

	-- Send a message to show doHello has started executing
	tUser:SendData("doHello() has started ")

	-- Loop through the arguments in the tArgs table
	for iIndex, sArgument in tArgs do

		-- Send the index with the inputted argument
		tUser:SendData("\ttArgs[" .. iIndex .. "] = " .. sArgument)
	end

	-- Return 1 to stop the server from sending the text
	return 1
end

-- Register the command 'hello' to call the function doHello
regCommand("HeLlo", doHello, 10)

-- Now type '!hello and some arguments' into the main chat

This demo version is complete with registering, profiles and other api's for your use.
Events.lua
----------------------------
regPtokaxEvent(sEvent, fFunction)
doPtokaxEvent(sEvent, vArg1, vArg2)
regProtocolEvent(sEvent, fFunction)
doProtocolEvent(sEvent, vArg1, vArg2)
regCommand(sCommand, fFunction, iLevel)
doCommand(sCommand, tUser, tArgs)

File Handling.lua
----------------------------
getFile(sFile)

Profiles.lua
----------------------------
addProfile(sProfileName, iLevel)
delProfile(sProfileName)
getProfileLevel(sProfileName)
getProfileName(iProfileLevel)
getRealProfileName(sProfileName)
getProfilesList()
isProfile(sProfileName)

Registering.lua
----------------------------
addRegisteredUser(sUsername, sPassword, sProfileName)
delRegisteredUser(sUsername)
getPassword(sUsername)
getUserProfile(sUsername)
getUserLevel(sUsername)
getRegisteredUserList(sProfileName)
sRegged(sUsername)

String Handling.lua
----------------------------
TranslateString(sString, tTranslations, bTranslateSystem, bTranslateHubInfo)
getHubInfoTranslation()
getSystemTranslationString()
ValidateString(sString, tBadStrings)
getSettingBlock(sSettingName, sString)

System.lua
----------------------------
ForwardCommand(sCommand)
AddPrefix(sPrefix)
convertShareSize(iSize, iSkip)
ClearCslavePtokaxFunctions()
RestoreCslavePtokaxFunctions()
BuildArgumentTable(sData)
isOnline(sUsername)

Table Handling.lua
----------------------------
saveTable(tTable, sTableName, sFile)
writeTable(tTable, sTableName, hFile, sTab)
loadTable(sFile)

cSlave Internal API
----------------------------
RestartcSlave()
RestartScripts()
ExecuteAPI()
ExecuteSystemScripts()
ExecuteSettings()
ExecuteAddonScripts()
ExecuteAddons()

If u havnt downloaded it, you havnt seen the power!

cSlave 1.0 Full PreComplete Preview

Herodes

is there smth wrong in Snooze's forum cause the cSlave section doesn't have anything in it ... :S

I am sure u put a lot of thinking in this Corayzon and I am eager to try it ;)

Good to see you ovecame the problem u had with ur pc and u are back online to lua us all ..... :D


Herodes

ok gracias .. ;) it is dnled as with no extension. .. adding ".rar" to it works ... off to try it ;)

plop

#4
it's also hosted here on my site.

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 <----<<

Corayzon

so what u guys like and what u guys dont like?

ei. HelpSystem? Registering? so on

i want to know so i can make it how ppl want =]

noza

SMF spam blocked by CleanTalk