示例#1
0
void BaseClient::_stat(vector<DataEventRaw>& UpdateEvents, vector<DataEventRaw>& CreditEvents)
{
    ByteArray req;
    MAKEREQBEGIN("stat");
    ADDPARAM("UploadEvents", UpdateEvents);
    ADDPARAM("CreditEvents", CreditEvents);
    MAKEREQEND(req);
    request(req, boost::bind(&BaseClient::_onStat, getPtr(), _1, _2), NET_CMD_RPC, COMPRESS_DOUBLE_ZLIB); 
}
示例#2
0
文件: Main.cpp 项目: aolko/construct
void DefineACES(MicroAceTime* at)
{
	// Conditions
	ADDPARAM(PARAM_STRING, "Animation name", "Enter the name of the animation.");
	ADDCND("On animation finished", "Animations", "%o Animation %0 finished", &ExtObject::cOnAnimationFinish, "AnimFinished", CND_TRIGGERED);

//	ADDCND("On any animation finished", "Animations", "%o Any animation finished", &ExtObject::cTrigger, "AnyAnimFinished", CND_TRIGGERED);

	ADDPARAM(PARAM_STRING, "Animation name", "Enter the name of the animation.");
	ADDCND("An animation is playing", "Animations", "%o Animation %0 is playing", &ExtObject::cAnimationPlaying, "AnimPlaying", 0);

	ADDPARAMCOMBO("Comparison", "Select the comparison to make.", "Equal to|Not equal to|Less than|Less or equal|Greater than|Greater or equal");
	ADDPARAMDEF(PARAM_VALUE, "Animation frame", "Animation frame to compare to", "1");
	ADDCND("Compare animation frame", "Animations", "%o Animation frame %0 %1", &ExtObject::cCompareAnimFrame, "CompareAnimFrame", 0);

	// Actions
	ADDACT("Play animation", "Animation", "Play current animation", &ExtObject::aPlayAnimation, "PlayAnim", 0);
	ADDACT("Pause animation", "Animation", "Pause current animation", &ExtObject::aPauseAnimation, "PauseAnim", 0);

	ADDPARAM(PARAM_VALUE, "Twean time", "Transission time");
	ADDPARAM(PARAM_STRING, "Name", "Enter the name of the animation");
	ADDACT("Set animation", "Animation", "Set animation to %1 (time: %0 ms)", &ExtObject::aSetAnimation, "SetAnim", 0);
	
	ADDPARAM(PARAM_VALUE, "Twean time", "Transission time");
	ADDPARAM(PARAM_VALUE, "Frame number", "Animation frame number to change to, starting at 1.");
	ADDACT("Set animation frame", "Animation", "Set animation frame to %0", &ExtObject::aSetAnimFrame, "SetAnimFrame", 0);

	ADDPARAM(PARAM_VALUE, "Speed", "Enter the speed of the animation (frames per second)");
	ADDACT("Set animation speed", "Animation", "Set animation speed to %0", &ExtObject::aSetAnimationSpeed, "SetAnimSpeed", 0);


	ADDPARAM(PARAM_VALUE, "Scale", "Enter the scale of the bone strucutre");
	ADDACT("Set scale", "Size & Angle", "Set scale to %0", &ExtObject::aSetScale, "SetScale", 0);

	ADDPARAMCOMBO("Mirror", "Select if the bone structure should be mirrored", "Yes|No");
	ADDACT("Set mirror", "Size & Angle", "Set mirrored? - %0", &ExtObject::aSetMirrored, "SetMirrored", 0);

	ADDPARAMCOMBO("Flipped", "Select if the bone structure should be flipped", "Yes|No");
	ADDACT("Set flip", "Size & Angle", "Set flipped? - %0", &ExtObject::aSetFlipped, "SetFlipped", 0);

	ADDPARAM(PARAM_VALUE, "Angle", "Enter the angle offset in degrees");
	ADDACT("Set angle", "Size & Angle", "Set angle to %0", &ExtObject::aSetAngle, "SetHeightScale", 0);

	ADDACT ("Force bone repositioning", "Bone", "Force bone repositioning", &ExtObject::aForceBoneRepositioning, "ForceBoneRepositioning", 0);



	// Expressions	
	ADDEXP("Get animation frame", "Animation", "AnimFrame", &ExtObject::eGetAnimFrame, RETURN_VALUE);
	ADDEXP("Get animation name", "Animation", "AnimName", &ExtObject::eGetAnimName, RETURN_STRING);



}
示例#3
0
void BaseClient::_test(int id)
{
    ByteArray req;
    MAKEREQBEGIN("test");
    ADDPARAM("id", id);
    MAKEREQEND(req);
    request(req, boost::bind(&BaseClient::_onTest, getPtr(), _1, _2), NET_CMD_RPC, COMPRESS_DOUBLE_ZLIB); 
}
示例#4
0
文件: Main.cpp 项目: aolko/construct
void DefineACES(MicroAceTime* at)
{
	/////////////////////////////
	// Conditions

	ADDPARAM(PARAM_STRING, "Function name", "The name of the function to call");
	ADDCND("On function", "Function", "On function <i>%0</i>", &ExtObject::cOnFunction, "OnFunction", CND_TRIGGERED);

	ADDCND("On any function", "Function", "On any function", &ExtObject::cOnAnyFunction, "OnAnyFunction", CND_TRIGGERED);

	ADDPARAM(PARAM_STRING, "Alias name", "Some text to identify the condition");
	ADDPARAMCOMBO("Object picking mode", "Choose whether objects picked by the alias are remembered back in this event", "Isolated|Inline");
	ADDCND("Call alias", "Condition aliasing", "%o %0 (%1)", &ExtObject::cAlias, "Alias", SOL_MODIFIER);

	ADDPARAM(PARAM_STRING, "Alias name", "Some text to identify this condition");
	ADDCND("On alias",	"Condition aliasing", "%o On Alias %0", &ExtObject::cOnAlias, "OnAlias", CND_TRIGGERED);

	/////////////////////////////
	// Actions
	// ADDACT(menuID, routine, scriptname, displaytext, flags)
	ADDPARAM(PARAM_UNDEFINED, "Value", "Enter a value for the parameter.");
	ADDACT("Add parameter", "Parameters", "Add parameter <i>%0</i>", &ExtObject::aAddParam, "AddParam", 0);

	ADDACT("Clear parameters", "Parameters", "Clear parameters", &ExtObject::aClearParams, "ClearParams", 0);

	ADDPARAM(PARAM_STRING, "Function name", "The name of the function to call.");
	ADDPARAMCOMBO("Remember picked objects?", "If yes, objects picked by this event's conditions are remembered in the 'On Function' event.", "Forget|Remember");
	ADDACT("Call function", "Function", "Call function <b>%0</b> (and %1 picked objects)", &ExtObject::aCall, "Call", 0);

	ADDPARAM(PARAM_STRING, "Function name", "The name of the function to call.");
	ADDPARAM(PARAM_VALUE, "Delay (ms)", "Enter the delay before calling the function, in milliseconds.");
	ADDACT("Call function after delay", "Function", "Call function <b>%0</b> after %1 ms", &ExtObject::aCallDelayed, "CallDelayed", 0);

	ADDPARAM(PARAM_UNDEFINED, "Value", "Enter the return value.");
	ADDACT("Set return value", "Function", "Set return value to %0", &ExtObject::aSetReturn, "SetReturn", 0);

	ADDACT("Return true", "Condition aliasing", "(Alias) Return true", &ExtObject::aAliasTrue, "AliasTrue", 0);

	/////////////////////////////
	// Expressions
	// ADDEXP(menuID, routine, expressionName, displaytext, flags)
	// Same format as conditions, except with the expression editor text.
	// expressionName = the name in the expression editor, e.g "Width" would
	// associate this expression when the user types YourObject.Width

	ADDEXP("Get number of parameters",	"Parameters",		"NumParams",	&ExtObject::eGetNumParams,	RETURN_VALUE);
	ADDPARAM(PARAM_VALUE, "Param number", "Number of the parameter to get.");
	ADDEXP("Get parameter",				"Parameters",		"Param",		&ExtObject::eGetParam,		0);
	ADDEXP("Get function name",			"Function",		"Name",			&ExtObject::eGetFuncName,	RETURN_STRING);
	ADDEXP("Get return value",			"Function",		"Return",		&ExtObject::eGetReturn,		0);
}
示例#5
0
void DefineACES(MicroAceTime* at)
{
	// Define your ACE tables here.
	// Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add parameters.
	// See the documentation for full details.

	// Note in the display string, %o is your object icon and %0-%9 make up parameters.
	// Note the script name should be a name suitable for the routine as if it were a member function in a
	// scripting language, eg. "Clear Stored Items" -> "ClearStoredItems"

	/////////////////////////////
	// Conditions
	// Format:
	// ADDCND(List name, Category, Display string, Function address, Script name, Flags)
	ADDPARAM(PARAM_STRING, "Trigger Name", "Name of the trigger");
	ADDCND("On Trigger", "Lua", "%o On %0", &ExtObject::cTrigger, "OnTrigger", CND_TRIGGERED);

	/////////////////////////////
	// Actions
	// Format:
	// ADDCND(List name, Category, Display string, Function address, Script name, Flags)
	ADDPARAM(PARAM_STRING, "Example parameter", "Here is an example parameter.");
	ADDACT("Do string", "Lua", "Do String (%0)", &ExtObject::aDoString, "DoString", 0);

	/////////////////////////////
	// Expressions
	// ADDEXP(List name, Category, Display string, Function address, Flags)
	ADDPARAM(PARAM_STRING, "name", "Variable name");
	ADDEXP("Get global value", "Lua", "GlobalValue", &ExtObject::eGetGlobalValue, RETURN_FLOAT);

	ADDPARAM(PARAM_STRING, "name", "Variable name");
	ADDEXP("Get global string", "Lua", "GlobalString", &ExtObject::eGetGlobalString, RETURN_FLOAT);

	ADDPARAM(PARAM_VALUE, "1", "Index");
	ADDEXP("Get param value", "Callback", "ParamValue", &ExtObject::eGetParamValue, RETURN_FLOAT);

	ADDPARAM(PARAM_VALUE, "1", "Index");
	ADDEXP("Get param string", "Callback", "ParamString", &ExtObject::eGetParamString, RETURN_FLOAT);

	// This line includes your common ACEs as specified in Main.h
#include "..\..\Common\CommonAceTable.hpp"
}
示例#6
0
void DefineACES(MicroAceTime* at)
{
	// Define your ACE tables here.
	// Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add parameters.
	// See the documentation for full details.

	// Note in the display string, %o is your object icon and %0-%9 make up parameters.
	// Note the script name should be a name suitable for the routine as if it were a member function in a
	// scripting language, eg. "Clear Stored Items" -> "ClearStoredItems"

	/////////////////////////////
	// Conditions
	// Format:
	// ADDCND(List name, Category, Display string, Function address, Script name, Flags)
	//ADDCND("My condition", "My category", "%o My condition", &ExtObject::cMyCondition, "MyCondition", 0);
	ADDCND("For each item", "Player inventory", "%o For each item", &ExtObject::cForEachItem, "ForEachItem", SOL_MODIFIER);

	/////////////////////////////
	// Actions
	// Format:
	// ADDCND(List name, Category, Display string, Function address, Script name, Flags)
	//ADDPARAM(PARAM_VALUE, "Example parameter", "Here is an example parameter.");
	//ADDACT("My action", "My category", "Example action (%0)", &ExtObject::aMyAction, "MyAction", 0);
	ADDPARAM(PARAM_STRING, "Filename", "File to save to.");
	ADDACT("Save", "Data", "Save to %0", &ExtObject::aSave, "Save", 0);
	ADDPARAM(PARAM_STRING, "Filename", "File to load from.");
	ADDACT("Load", "Data", "Load from %0", &ExtObject::aLoad, "Load", 0);

	ADDPARAM(PARAM_VALUE, "Count", "Number of sectors to create");
	ADDACT("Generate sectors", "Sectors", "Generate %0 sectors", &ExtObject::aGenerateSectors, "GenerateSectors", 0);
	ADDPARAM(PARAM_VALUE, "Count", "Max number of missions to create");
	ADDACT("Generate missions", "Missions", "Generate %0 missions", &ExtObject::aGenerateMissions, "GenerateMissions", 0);

	ADDPARAM(PARAM_STRING, "Item string", "|-delimited item structure");
	ADDACT("Add item", "Player inventory", "Add %0 to inventory", &ExtObject::aAddItem, "AddItem", 0);
	ADDPARAM(PARAM_VALUE, "Item ID", "Identifier of item to remove");
	ADDACT("Remove item", "Player inventory", "Remove item %0", &ExtObject::aRemoveItem, "RemoveItem", 0);

	ADDPARAM(PARAM_VALUE, "Item ID", "Item identifier");
	ADDPARAM(PARAM_VALUE, "Location ID", "0=Storage 1=Slot1 2=Slot2");
	ADDACT("Equip item", "Player inventory", "Equip item %0 in %1",
		&ExtObject::aEquipItem, "EquipItem", 0);

	ADDPARAM(PARAM_VALUE, "Item ID", "Inventory item identifier");
	ADDPARAM(PARAM_STRING, "Property name", "Item property name");
	ADDPARAM(PARAM_VALUE, "New value", "New value for the property");
	ADDACT("Set item property", "Player inventory", "Set %1 in item %0 to %2",
		&ExtObject::aSetInventoryItemValue, "SetItemProperty", 0);

	ADDACT("Clear data", "Data", "Clear data", &ExtObject::aClearData, "ClearData", 0);

	ADDCND("Error occurred", "Utils", "%o Error occurred", &ExtObject::cErrorOccurred, "ErrorOccurred", 0);

	/////////////////////////////
	// Expressions
	// ADDEXP(List name, Category, Display string, Function address, Flags)
	//ADDEXP("My expression", "My category", "MyExpression", &ExtObject::eMyExpression, RETURN_INTEGER);
	ADDEXP("Number of sectors", "Sectors", "NumSectors", &ExtObject::eNumSectors, RETURN_INTEGER);
	ADDPARAM(PARAM_VALUE, "Sector number", "Sector number");
	ADDEXP("Sector string", "Sectors", "SectorString", &ExtObject::eSectorString, RETURN_STRING);
	
	ADDEXP("Number of missions", "Missions", "NumMissions", &ExtObject::eNumMissions, RETURN_INTEGER);
	ADDPARAM(PARAM_VALUE, "Mission number", "1-n");
	ADDEXP("Mission string", "Missions", "MissionString", &ExtObject::eMissionString, RETURN_STRING);
	ADDPARAM(PARAM_VALUE, "Mission number", "1-n");
	ADDEXP("Drop cost", "Missions", "DropCost", &ExtObject::eDropCost, RETURN_INTEGER);

	ADDPARAM(PARAM_STRING, "File name", "File to read lines from");
	ADDEXP("Get random line from file", "Utils", "RandomLine", &ExtObject::eRandomLine, RETURN_STRING);
	ADDEXP("Get last error string", "Utils", "GetLastErrorString", &ExtObject::eErrorString, RETURN_STRING);

	ADDEXP("Number of items", "Player inventory", "NumberOfItems", &ExtObject::eItemCount, RETURN_VALUE);

	ADDPARAM(PARAM_VALUE, "Item index", "Item to return as | delimited string (1-n)");
	ADDEXP("Item string", "Player inventory", "InventoryItemString", &ExtObject::eInventoryItemString, RETURN_STRING);

	ADDPARAM(PARAM_VALUE, "Item ID", "Inventory item identifier");
	ADDPARAM(PARAM_STRING, "Property name", "Item property name");
	ADDEXP("Item property", "Player inventory", "ItemProperty", &ExtObject::eInventoryItemValue, 0);

	ADDEXP("Current item", "Player inventory", "CurrItem", &ExtObject::eCurrentInventoryItem, SOL_MODIFIER);

	ADDPARAM(PARAM_VALUE, "Mission ID", "Mission ID (number)");
	ADDPARAM(PARAM_STRING, "Property name", "Mission property name");
	ADDEXP("Mission property", "Missions", "MissionProperty", &ExtObject::eMissionValue, 0);

	ADDPARAM(PARAM_VALUE, "Sector ID", "Sector ID (number)");
	ADDPARAM(PARAM_STRING, "Property name", "Sector property name");
	ADDEXP("Sector property", "Sectors", "SectorProperty", &ExtObject::eSectorProperty, 0);

	ADDPARAM(PARAM_STRING, "File name", ".item file to load, with full path");
	ADDPARAM(PARAM_VALUE, "Location", "Location identifier for the new item");
	ADDACT("Load item", "Player inventory", "Load item %0 into %1", &ExtObject::aLoadItem, "LoadItem", 0);

	// This line includes your common ACEs as specified in Main.h
#include "..\Common\CommonAceTable.hpp"
}
示例#7
0
void DefineACES(MicroAceTime* at)
{
	// Define your ACE tables here.
	// Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add parameters.
	// See the documentation for full details.

	// Note in the display string, %o is your object icon and %0-%9 make up parameters.
	// Note the script name should be a name suitable for the routine as if it were a member function in a
	// scripting language, eg. "Clear Stored Items" -> "ClearStoredItems"

	/////////////////////////////
	// Conditions
	// Format:
	// ADDCND(List name, Category, Display string, Function address, Script name, Flags)
	//ADDCND("My condition", "My category", "%o My condition", &ExtObject::cMyCondition, "MyCondition", 0);
	ADDCND("Error occurred", "Utils", "%o Error occurred", &ExtObject::cErrorOccurred, "ErrorOccurred", 0);

	/////////////////////////////
	// Actions
	// Format:
	// ADDCND(List name, Category, Display string, Function address, Script name, Flags)
	//ADDPARAM(PARAM_VALUE, "Example parameter", "Here is an example parameter.");
	//ADDACT("My action", "My category", "Example action (%0)", &ExtObject::aMyAction, "MyAction", 0);
	ADDPARAM(PARAM_STRING, "File name", "File to save to");
	ADDACT("Save room", "Rooms", "Save room to %0", &ExtObject::aSaveRoom, "SaveRoom", 0);
	ADDPARAM(PARAM_STRING, "File name", "File to load from");
	ADDACT("Load room", "Rooms", "Load room from %0", &ExtObject::aLoadRoom, "LoadRoom", 0);
	ADDACT("Clear room data", "Rooms", "Clear room data", &ExtObject::aClearData, "ClearRoomData", 0);
	ADDPARAM(PARAM_STRING, "Data string", "|-delimited string. See docs!");
	ADDACT("Add object from string", "Rooms", "Add %0 as string to objects", &ExtObject::aAddObjectString, "AddObjectString", 0);
	ADDPARAM(PARAM_STRING, "File name", "File to save to");
	ADDPARAM(PARAM_VALUE, "X", "X position");
	ADDPARAM(PARAM_VALUE, "Y", "Y position");
	ADDPARAM(PARAM_VALUE, "Angle", "Rotation");
	ADDACT("Load and create room", "Rooms", "Load room %0 and create at %1 %2, rot %3",
		   &ExtObject::aLoadAndCreateRoom, "LoadAndCreateRoom", 0);

	//Room saving
	ADDPARAM(PARAM_VALUE, "Type", "0=Sprite, 1=Tiled");
	ADDPARAM(PARAM_STRING, "Name", "Object name");
	ADDPARAM(PARAM_VALUE, "X", "X position");
	ADDPARAM(PARAM_VALUE, "Y", "Y position");
	ADDPARAM(PARAM_VALUE, "Angle", "Rotation");
	ADDPARAM(PARAM_VALUE, "Width", "Width");
	ADDPARAM(PARAM_VALUE, "Height", "Height");
	ADDPARAM(PARAM_STRING, "XData", "|-delimited string for custom data");
	ADDACT("Add object", "Rooms", "Add %1 to objects", &ExtObject::aAddObject, "AddObject", 0);

	ADDPARAM(PARAM_VALUE, "X offset", "Room object coordinates X offset");
	ADDPARAM(PARAM_VALUE, "Y offset", "Room object coordinates Y offset");
	ADDPARAM(PARAM_VALUE, "Angle", "Room object rotation (0/90/180/270)");
	ADDACT("Set offset", "Rooms", "Set offset to %0,%1 at %2 degrees", &ExtObject::aSetOffset, "SetOffset", 0);

	/////////////////////////////
	// Expressions
	// ADDEXP(List name, Category, Display string, Function address, Flags)
	//ADDEXP("My expression", "My category", "MyExpression", &ExtObject::eMyExpression, RETURN_INTEGER);
	ADDEXP("Object count", "Rooms", "ObjectCount", &ExtObject::eObjectCount, RETURN_VALUE);
	ADDPARAM(PARAM_VALUE, "Object number", "1-n");
	ADDEXP("Object", "Rooms", "Object", &ExtObject::eObject, RETURN_STRING);

	ADDPARAM(PARAM_VALUE, "Object number", "1-n");
	ADDPARAM(PARAM_VALUE, "Value index", "1-6");
	ADDEXP("Object value", "Rooms", "ObjectValue", &ExtObject::eObjectValue, RETURN_VALUE);
	ADDPARAM(PARAM_VALUE, "Object number", "1-n");
	ADDEXP("Object name", "Rooms", "ObjectName", &ExtObject::eObjectName, RETURN_STRING);
	ADDPARAM(PARAM_VALUE, "Object number", "1-n");
	ADDEXP("Object XData", "Rooms", "ObjectXData", &ExtObject::eObjectXData, RETURN_STRING);

	ADDEXP("Get last error string", "Utils", "GetLastErrorString", &ExtObject::eErrorString, RETURN_STRING);

	// This line includes your common ACEs as specified in Main.h
#include "..\Common\CommonAceTable.hpp"
}
示例#8
0
void DefineACES(MicroAceTime* at)
{
	// Define your ACE tables here.
	// Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add formal parameters.
	
	// Format:
	// ADDPARAM(type, title, description)
	//
	// type = the type of parameter.  See the PARAMS enum.
	// title = title of parameter, in expression editor
	// description = text to go in the text box describing this parameter.  Try to give
	//				 a helpful description.

	/////////////////////////////
	// Conditions

	// Format:
	// ADDCND(menuID, routine, scriptname, displaytext, flags)
	//
	// menuID = ID in the menu resource, must start at 2000
	// routine = address of the function associated
	// scriptname = reserved for future script use, e.g. "Set X position" script name could be "SetX"
	// displaytext = text to display in event editor, %0 is first param, %1 second etc
	// flags: can be
	// 0: ordinary evaluated event
	// CND_TRIGGERED: ordinary event trigger


	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to test.");
	ADDPARAMCOMBO("Comparison", "Select the comparison to make", "Equal to|Not equal to|Less than|Less or equal|Greater than|Greater or equal");
	ADDPARAM(PARAM_VALUE, "Value", "Value to compare to");
	ADDCND("Comapre private variable", "Private variables", "%o Value %0 %1 %2", &ExtObject::cValueCmp, "CompareValue", 0);

	ADDPARAM(PARAM_STRING, "Text to compare", "Enter the text to compare with the object's content.");
	ADDPARAMDEF(PARAM_COMBO, "Case sensitive?", "Choose whether or not capital letters count as different.", "No|Yes");
	ADDCND("Compare text", "Text", "%o Text is %0 (case: %1)", &ExtObject::cCompareText, "CompareText", 0);

	ADDCND("Writing finished", "Text", "%o Text writing finished", &ExtObject::cWriteFinished, "WriteFinished", CND_TRIGGERED);

	/////////////////////////////
	// Actions

	// ADDACT(menuID, routine, scriptname, displaytext)
	// Same format as ADDCND, but actions have no flags.

	ADDPARAM(PARAM_STRING, "Text", "Text to display in object");
	ADDACT("*Set text", "Text", "Set text to %0", &ExtObject::aSetText, "SetText", 0);

	ADDPARAM(PARAM_COLOR, "Colour", "New text colour to display");
	ADDACT("Set text colour", "Text", "Set text colour to %0", &ExtObject::aSetTextColour, "SetTextColour", 0);

	ADDPARAM(PARAM_VALUE, "Text size", "New text size");
	ADDACT("Set text size", "Text", "Set text size to %0", &ExtObject::aSetTextSize, "SetTextSize", 0);

	ADDPARAMDEF(PARAM_COMBO, "Bold", "Whether or not to show bold text.", "No|Yes");
	ADDACT("Set bold", "Text", "Set bold: %0", &ExtObject::aSetBold, "SetBold", 0);

	ADDPARAMDEF(PARAM_COMBO, "Italics", "Whether or not to show italic text.", "No|Yes");
	ADDACT("Set italic", "Text", "Set italic: %0", &ExtObject::aSetItalic, "SetItalic", 0);

	ADDPARAMDEF(PARAM_COMBO, "Horizontal alignment", "Choose the text horizontal alignment.", "Left|Center|Right");
	ADDACT("Set horizontal alignment", "Text", "Set horizontal aligmnent to %0", &ExtObject::aSetHorizAlign, "SetHorizAlign", 0);

	ADDPARAMDEF(PARAM_COMBO, "Vertical alignment", "Choose the text vertical alignment.", "Top|Center|Bottom");
	ADDACT("Set vertical alignment", "Text", "Set vertical aligmnent to %0", &ExtObject::aSetVertAlign, "SetVertAlign", 0);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to store");
	ADDACT("Set value", "Private variables", "Set %0 to %1", &ExtObject::aSetValue, "SetValue", 0);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to add.");
	ADDACT("Add to value", "Private variables", "Add %1 to %0", &ExtObject::aAddValue, "AddValue", 0);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to subtract.");
	ADDACT("Subtract from value", "Private variables", "Subtract %1 from %0", &ExtObject::aSubValue, "SubValue", 0);

	ADDPARAM(PARAM_STRING, "Font face", "Enter the desired font, eg. \"Verdana\".");
	ADDACT("Set font", "Text", "Set font to %0", &ExtObject::aSetFont, "SetFont", 0);

	ADDPARAM(PARAM_STRING, "Text", "Text to write");
	ADDPARAM(PARAM_VALUE, "Speed", "Milliseconds per letter written");
	ADDACT("Write text", "Text", "Write text <i>%0</i> at 1 letter per <i>%1</i> milliseconds", &ExtObject::aWriteText, "WriteText", 0);

	ADDPARAM(PARAM_VALUE, "Speed", "Milliseconds per letter written");
	ADDACT("Set write speed", "Text", "Set write speed to 1 letter per <i>%0</i> milliseconds", &ExtObject::aSetWriteSpeed, "SetWriteSpeed", 0);

	/////////////////////////////
	// Expressions

	// ADDEXP(menuID, routine, expressionName, displaytext, flags)
	// Same format as conditions, except with the expression editor text.
	// expressionName = the name in the expression editor, e.g "Width" would
	// associate this expression when the user types YourObject.Width
	// Flags:  RETURN_VALUE, RETURN_STRING, RETURN_UNDEFINED

	ADDEXP("Get text", "Text", "Text", &ExtObject::eGetText, RETURN_STRING);

	ADDPARAM(PARAM_STRING, "Value", "Name of value");
	ADDEXP("Get private variable", "Private variables", "Value", &ExtObject::eGetValue, 0);

	ADDPARAM(PARAM_STRING, "Text", "Text to calculate");
	ADDEXP("Get text width", "Text size", "TextWidth", &ExtObject::eGetTextWidth, RETURN_VALUE);

	ADDPARAM(PARAM_STRING, "Text", "Text to calculate");
	ADDEXP("Get text height", "Text size", "TextHeight", &ExtObject::eGetTextHeight, RETURN_VALUE);

	ADDEXP("Get write speed", "Text", "GetWriteSpeed", &ExtObject::eGetWriteSpeed, RETURN_VALUE);

#include "..\..\Common\CommonAceTable.hpp"
}
示例#9
0
void DefineACES(MicroAceTime* at)
{
	// Define your ACE tables here.
	// Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add parameters.
	// See the documentation for full details.

	// Note in the display string, %o is your object icon and %0-%9 make up parameters.
	// Note the script name should be a name suitable for the routine as if it were a member function in a
	// scripting language, eg. "Clear Stored Items" -> "ClearStoredItems"

	/////////////////////////////
	// Conditions
	// Format:
	// ADDCND(List name, Category, Display string, Function address, Script name, Flags)
	//ADDCND("OnDisconnect", "My category", "%o My condition", &ExtObject::cMyCondition, "MyCondition", CND_TRIGGERED);
	ADDCND("On disconnect", "Triggers", "%o On disconnect", &ExtObject::cOnDisconnect, "OnDisconnect", CND_TRIGGERED);
	ADDCND("On connection lost", "Triggers", "%o On connection Lost", &ExtObject::cOnConnectionLost, "OnConnectionLost", CND_TRIGGERED);
	ADDCND("On banned", "Triggers", "%o On banned", &ExtObject::cOnBanned, "OnBanned", CND_TRIGGERED);
	ADDCND("On connect", "Triggers", "%o On connect", &ExtObject::cOnConnect, "OnConnect", CND_TRIGGERED);
	ADDCND("On server full", "Triggers", "%o On server full", &ExtObject::cOnServerFull, "OnServerFull", CND_TRIGGERED);
	ADDCND("On player disconnect", "Triggers", "%o On player disconnect", &ExtObject::cOnPlayerDisconnect, "OnPlayerDisconnect", CND_TRIGGERED);
	ADDCND("On player connect", "Triggers", "%o On player connect", &ExtObject::cOnPlayerConnect, "OnPlayerConnect", CND_TRIGGERED);
	ADDPARAM(PARAM_STRING, "Message", "The text that was sent");
	ADDCND("On message", "Messages", "%o On message %0", &ExtObject::cOnMessage, "OnMessage", CND_TRIGGERED);
	ADDCND("On any message", "Messages", "%o On any message", &ExtObject::cOnAnyMessage, "OnAnyMessage", CND_TRIGGERED);
	ADDCND("On player here", "Triggers", "%o On player here", &ExtObject::cOnPlayerHere, "OnPlayerHere", CND_TRIGGERED);
	ADDCND("Is Server", "Hosting", "%o Is Server", &ExtObject::cIsServer, "IsServer", 0);
	/////////////////////////////
	// Actions
	// Format:
	// ADDCND(List name, Category, Display string, Function address, Script name, Flags)
	ADDPARAMDEF(PARAM_STRING, "Host", "The IP address of the host", "\"localhost\"");
	ADDPARAMDEF(PARAM_VALUE, "Host Port", "The port we are connecting to", "1234");
	ADDPARAMDEF(PARAM_VALUE, "Local Port", "The port we are listening on", "0");
	ADDPARAMDEF(PARAM_STRING, "Password", "Here is an example parameter.", "\"construct\"");
	ADDACT("Connect", "Client", "Connect to %0 on port %1 using local port %2 (password %3)", &ExtObject::aConnect, "Connect", 0);
	ADDACT("Disconnect", "Client", "Disconnect", &ExtObject::aDisconnect, "Disconnect", 0);
	ADDPARAM(PARAM_UNDEFINED, "Param", "Any number of string for the param");
	ADDACT("Add parameter", "Message", "Add parameter %0", &ExtObject::aAddParameter, "AddParameter", 0);
	ADDPARAM(PARAM_STRING, "Message", "The message that will be sent and recieved by others");
	ADDACT("Send message", "Message", "Send message %0", &ExtObject::aSendMessage, "SendMessage", 0);
	ADDPARAMDEF(PARAM_VALUE, "Host port", "The port we are listening on", "1234");
	ADDPARAMDEF(PARAM_STRING, "Password", "Here is an example parameter.", "\"construct\"");
	ADDPARAMCOMBO("Playing Mode", "Set the playing mode of the server. If you select player it means you become a player in the game, otherwise your a host and have no presence in the game", "Dedicated server|Player");
	ADDACT("Host server", "Server", "Host server on port %0 ( password: %1, playing mode: %2)", &ExtObject::aHostServer, "HostServer", 0);
	ADDACT("Forward message", "Server", "Forward message to other clients", &ExtObject::aForwardMessage, "ForwardMessage", 0);
	ADDPARAM(PARAM_STRING, "Message", "The message that will be sent and recieved by others");
	ADDPARAM(PARAM_VALUE, "PlayerID", "The player ID of who to send the message to");
	ADDACT("Send message to", "Message", "Send message %0 to %1", &ExtObject::aSendMessageTo, "SendMessageTo", 0);

	ADDPARAM(PARAM_STRING, "Variable", "The name of the player variable to use");
	ADDPARAM(PARAM_UNDEFINED, "Value", "The value to set the variable to");
	ADDACT("Set variable", "Player Variables", "Set variable %0 to %1", &ExtObject::aSetPlayerVariable, "SetPlayerVariable", 0);

	////////////////////////////
	// Expressions
	// ADDEXP(List name, Category, Display string, Function address, Flags)
	ADDEXP("Get message", "Message", "Message", &ExtObject::eMessage, RETURN_STRING);
	ADDEXP("Number of params", "Message", "NumberOfParams", &ExtObject::eNumberOfParams, RETURN_INTEGER);
	ADDPARAM(PARAM_VALUE, "1", "Parameter");
	ADDEXP("Get param", "Message", "Param", &ExtObject::eParam, 0);
	ADDEXP("Get IP", "Information", "IP", &ExtObject::eGetIP, RETURN_STRING);
	ADDEXP("Get player ID", "Information", "PlayerID", &ExtObject::eGetPlayerID, RETURN_INTEGER);
	ADDEXP("Get remote player ID", "Information", "RemotePlayerID", &ExtObject::eGetRemotePlayerID, RETURN_INTEGER);

	ADDEXP("Get number of players", "Information", "RemotePlayerID", &ExtObject::eGetNumberOfPlayers, RETURN_INTEGER);

	ADDPARAM(PARAM_VALUE, "1", "Index");
	ADDEXP("Lookup player ID from index", "Information", "PlayerIDFromIndex", &ExtObject::ePlayerIDFromIndex, RETURN_INTEGER);

	ADDPARAM(PARAM_VALUE, "Name", "The name of the variable");
	ADDEXP("Get player variable", "Player Variables", "PlayerVariable", &ExtObject::ePlayerVariable, 0);

	ADDPARAM(PARAM_VALUE, "Name", "The name of the variable");
	ADDEXP("Get remote player variable", "Player Variables", "RemotePlayerVariable", &ExtObject::eRemotePlayerVariable, 0);



#include "..\..\Common\CommonAceTable.hpp"
}
示例#10
0
void DefineACES(MicroAceTime* at)
{
    ADDPARAM(PARAM_VALUE, "Set the x speed in pixels per second", "X speed");
    ADDACT("Set x speed", "Plasma", "Set plasma x speed to %0", &ExtObject::aSetPlasmaXSpeed, "SetPlasmaXSpeed", 0);

    ADDPARAM(PARAM_VALUE, "Set the y speed in pixels per second", "Y speed");
    ADDACT("Set y speed", "Plasma", "Set plasma y speed to %0", &ExtObject::aSetPlasmaYSpeed, "SetPlasmaYSpeed", 0);

    ADDPARAM(PARAM_VALUE, "Set the speed in pixels per second", "Speed");
    ADDACT("Set speed", "Plasma", "Set plasma speed to %0", &ExtObject::aSetPlasmaSpeed, "SetPlasmaSpeed", 0);

    ADDPARAM(PARAM_VALUE, "Set the angle of the plasma", "Angle");
    ADDACT("Set angle", "Plasma", "Set plasma angle to %0", &ExtObject::aSetPlasmaAngle, "SetPlasmaAngle", 0);

    ADDPARAM(PARAM_VALUE, "Set the x speed in pixels per second", "X Speed");
    ADDACT("Set pattern x speed", "Subtract Pattern", "Set subtract patter x speed to %0", &ExtObject::aSetPatternXSpeed, "SetPatternXSpeed", 0);

    ADDPARAM(PARAM_VALUE, "Set the y speed in pixels per second", "Y Speed");
    ADDACT("Set pattern y speed", "Subtract Pattern", "Set subtract patter y speed to %0", &ExtObject::aSetPatternYSpeed, "SetPatternYSpeed", 0);

    ADDPARAM(PARAM_VALUE, "Set the speed in pixels per second", "Speed");
    ADDACT("Set pattern speed", "Subtract Pattern", "Set subtract patter speed to %0", &ExtObject::aSetPatternSpeed, "SetPatternSpeed", 0);

    ADDPARAM(PARAM_VALUE, "Set the angle", "Angle");
    ADDACT("Set pattern move angle", "Subtract Pattern", "Set subtract pattern move angle to %0", &ExtObject::aSetPatternMoveAngle, "SetPatternMoveAngle", 0);

    ADDPARAM(PARAM_VALUE, "Set the scale", "Scale");
    ADDACT("Set pattern scale", "Subtract Pattern", "Set subtract pattern scale to %0", &ExtObject::aSetPatternScale, "SetPatternScale", 0);

    ADDPARAM(PARAM_VALUE, "Set the angle", "Angle");
    ADDACT("Set pattern angle", "Subtract Pattern", "Set subtract pattern angle to %0", &ExtObject::aSetPatternAngle, "SetPatternAngle", 0);

    ADDPARAM(PARAM_OBJECT, "Object", "Object to draw");
    ADDACT("Paste Object", "Paste", "Paste %0 into plasma", &ExtObject::aPasteObject, "PasteObject", 0);




#include "..\..\Common\CommonAceTable.hpp"

}
示例#11
0
void DefineACES(MicroAceTime* at)
{

	// Define your ACE tables here.
	// Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add formal parameters.
	
	// Format:
	// ADDPARAM(type, title, description)
	//
	// type = the type of parameter.  See the PARAMS enum.
	// title = title of parameter, in expression editor
	// description = text to go in the text box describing this parameter.  Try to give
	//				 a helpful description.

	/////////////////////////////
	// Conditions

	// Format:
	// ADDCND(menuID, routine, scriptname, displaytext, flags)
	//
	// menuID = ID in the menu resource, must start at 2000
	// routine = address of the function associated
	// scriptname = reserved for future script use, e.g. "Set X position" script name could be "SetX"
	// displaytext = text to display in event editor, %0 is first param, %1 second etc
	// flags: can be
	// 0: ordinary evaluated event
	// CND_TRIGGERED: ordinary event trigger
	// CND_FASTTRIGGERED: fast trigger

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to test.");
	ADDPARAMCOMBO("Comparison", "Select the comparison to make.", "Equal to|Not equal to|Less than|Less or equal|Greater than|Greater or equal");
	ADDPARAM(PARAM_VALUE, "Value", "Value to compare to");
	ADDCND("Compare private variable", "Private variables", "%o Value %0 %1 %2", &ExtObject::cValueCmp, "CompareValue", 0);

	/////////////////////////////
	// Actions

	// ADDACT(menuID, routine, scriptname, displaytext)
	// Same format as ADDCND, but actions have no flags.

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to store");
	ADDACT("Set value", "Private variables", "Set %0 to %1", &ExtObject::aSetValue, "SetValue", 0);

	ADDPARAM(PARAM_VALUE, "Opacity", "New semitransparency value, 0 (invisible) to 100 (opaque)");
	ADDACT("Set opacity", "Appearance", "Set opacity to %0", &ExtObject::aSetOpacity, "SetOpacity", 0);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to add.");
	ADDACT("Add to value", "Private variables", "Add %1 to %0", &ExtObject::aAddValue, "AddValue", 0);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to subtract.");
	ADDACT("Subtract from value", "Private variables", "Subtract %1 from %0", &ExtObject::aSubValue, "SubValue", 0);

	ADDPARAM(PARAM_OBJECT, "Object", "Object to attach to.");
	ADDPARAM(PARAM_VALUE, "Padding", "Pixels padding around the object to attach.");
	ADDACT("Attach to object", "Attach", "Attach to object %0 with %1 padding", &ExtObject::aAttachToObj, "Attach", 0);

	ADDPARAM(PARAM_OBJECT, "Object", "Object to use texture from");
	ADDACT("Copy image from object", "Image", "Use image from %0", &ExtObject::aCopyImageFromObj, "CopyImage", 0);

	ADDPARAMCOMBO("Corner", "Select the corner of the image", "Top-left|Top-right|Bottom-left|Bottom-right");
	ADDPARAMDEF(PARAM_COLOR, "Colour", "Colour", "16777215");
	ADDPARAMDEF(PARAM_VALUE, "Opacity", "0 - 100", "100");
	ADDACT("Set corner filter", "Appearance", "Set corner %0 colour to %1 (%2%)", &ExtObject::aSetVertex, "SetCornerFilter", 0);

	ADDPARAM(PARAM_VALUE, "Left Margin", "Pixels");
	ADDPARAM(PARAM_VALUE, "Top Margin", "Pixels");
	ADDPARAM(PARAM_VALUE, "Right Margin", "Pixels");
	ADDPARAM(PARAM_VALUE, "Bottom Margin", "Pixels");
	ADDACT("Set Image Margin", "Image", "Set image margin to (%0,%1,%2,%3)", &ExtObject::aSetMargin, "SetMargin", 0);


	/////////////////////////////
	// Expressions

	// ADDEXP(menuID, routine, expressionName, displaytext, flags)
	// Same format as conditions, except with the expression editor text.
	// expressionName = the name in the expression editor, e.g "Width" would
	// associate this expression when the user types YourObject.Width
	// Flags:  RETURN_VALUE, RETURN_STRING, RETURN_UNDEFINED
	ADDEXP("Get opacity", "Appearance", "Opacity", &ExtObject::eGetOpacity, RETURN_FLOAT);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Value", "Name of value.");
	ADDEXP("Get private variable", "Private variables", "Value", &ExtObject::eGetValue, 0);

#include "..\..\Common\CommonAceTable.hpp"
}
示例#12
0
void DefineACES(MicroAceTime* at)
{
    // Define your ACE tables here.
    // Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add parameters.
    // See the documentation for full details.

    // Note in the display string, %o is your object icon and %0-%9 make up parameters.
    // Note the script name should be a name suitable for the routine as if it were a member function in a
    // scripting language, eg. "Clear Stored Items" -> "ClearStoredItems"

    /////////////////////////////
    // Conditions
    // Format:
    // ADDCND(List name, Category, Display string, Function address, Script name, Flags)
    //ADDCND("My condition", "My category", "%o My condition", &ExtObject::cMyCondition, "MyCondition", 0);
    ADDCND("On finished", "BulletML", "%o On finished", &ExtObject::cFinished, "Finished", 0);
    ADDCND("On error occurred", "BulletML", "%o On error occurred", &ExtObject::cErrorOccurred, "ErrorOccurred", 0);
    ADDPARAM(PARAM_OBJECT, "Object name", "Name of the object");
    ADDCND("On collision", "BulletML", "%o A bullet collides with %0", &ExtObject::cOnCollision, "OnCollision", SOL_MODIFIER);
    ADDCND("Is running", "BulletML", "%o Script is running", &ExtObject::cIsRunning, "IsRunning", 0);
    //privatevar conditions
    ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to test.");
    ADDPARAMCOMBO("Comparison", "Select the comparison to make.", "Equal to|Not equal to|Less than|Less or equal|Greater than|Greater or equal");
    ADDPARAM(PARAM_VALUE, "Value", "Value to compare to");
    ADDCND("*Compare a private variable", "Private variables", "%o %n:  Value %0 %1 %2", &ExtObject::cValueCmp, "CompareValue", 0);
    ADDPARAM(PARAM_PRIVATEVARIABLE, "Variable name", "Variable to find lowest value in.");
    ADDCND("Pick object with lowest variable", "Private variables", "%o %n: Pick with lowest '%0'", &ExtObject::cPickLowestVar, "PickLowestVar", CND_STATIC);
    ADDPARAM(PARAM_PRIVATEVARIABLE, "Variable name.", "Variable to find highest value in.");
    ADDCND("Pick object with highest variable", "Private variables", "%o %n: Pick with highest '%0'", &ExtObject::cPickHighestVar, "PickHighestVar", CND_STATIC);

    /////////////////////////////
    // Actions
    // Format:
    // ADDCND(List name, Category, Display string, Function address, Script name, Flags)
    //ADDPARAM(PARAM_VALUE, "Example parameter", "Here is an example parameter.");
    //ADDACT("My action", "My category", "Example action (%0)", &ExtObject::aMyAction, "MyAction", 0);
    ADDPARAM(PARAM_STRING, "File name", "BulletML file to load.");
    ADDACT("Load", "BulletML", "Load file %0", &ExtObject::aLoad, "Load", 0);
    ADDACT("Restart", "BulletML", "Restart", &ExtObject::aRestart, "Restart", 0);
    ADDACT("Stop", "BulletML", "Stop", &ExtObject::aStop, "Stop", 0);
    ADDACT("Clear", "BulletML", "Remove all bullets", &ExtObject::aClear, "Clear", 0);
    ADDPARAM(PARAM_VALUE, "X", "X coordinate");
    ADDPARAM(PARAM_VALUE, "Y", "Y coordinate");
    ADDACT("Set target position", "BulletML",
           "Set aim target at %0, %1", &ExtObject::aSetTargetPos,
           "SetTargetPos", 0);
    ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
    ADDPARAM(PARAM_VALUE, "Value", "Value to add.");
    ADDACT("Add to value", "Private variables", "Add %1 to %0", &ExtObject::aAddValue, "AddValue", 0);
    ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
    ADDPARAM(PARAM_VALUE, "Value", "Value to subtract.");
    ADDACT("Subtract from value", "Private variables", "Subtract %1 from %0", &ExtObject::aSubValue, "SubValue", 0);
    ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
    ADDPARAM(PARAM_VALUE, "Value", "Value to store");
    ADDACT("*Set value", "Private variables", "Set %0 to %1", &ExtObject::aSetValue, "SetValue", 0);
    ADDPARAM(PARAM_VALUE, "Rank (difficulty)", "Rank (difficulty) for new bullets. 0.0 - 1.0.");
    ADDACT("Set rank", "BulletML", "Set rank to %0", &ExtObject::aSetRank,
           "SetRank", 0);
    ADDPARAM(PARAM_OBJECT, "Object", "Object type to use as bullet.");
    ADDACT("Set bullet object type", "BulletML", "Set %0 as bullet object type",
           &ExtObject::aSetBulletObject, "SetBulletObject", 0);
    ADDPARAM(PARAM_STRING, "File name", "BulletML file to load.");
    ADDPARAM(PARAM_VALUE, "Times", "Number of times to play the file");
    ADDPARAM(PARAM_VALUE, "Delay", "Milliseconds to wait between repeats");
    ADDACT("Play and loop file with delay", "BulletML",
           "Play %0 %1 times with delay %2", &ExtObject::aPlayAndLoop,
           "PlayAndLoop", 0);

    /////////////////////////////
    // Expressions
    // ADDEXP(List name, Category, Display string, Function address, Flags)
    //ADDEXP("My expression", "My category", "MyExpression", &ExtObject::eMyExpression, RETURN_INTEGER);
    // This line includes your common ACEs as specified in Main.h
    ADDEXP("Bullet count", "BulletML", "BulletCount", &ExtObject::eBulletCount, RETURN_INTEGER);
    ADDEXP("Last error string", "BulletML", "LastErrorString", &ExtObject::eErrorString, RETURN_STRING);
    ADDPARAM(PARAM_PRIVATEVARIABLE, "'Variable name'", "Name of value.");
    ADDEXP("Get private variable", "Private variables", "Value", &ExtObject::eGetValue, 0);
    ADDEXP("Get private variable count", "Private variables", "NumVars", &ExtObject::eNumPVs, RETURN_VALUE);
    ADDEXP("Rank", "BulletML", "Rank", &ExtObject::eRank, RETURN_FLOAT);
#include "..\Common\CommonAceTable.hpp"
}
示例#13
0
void AdcHub::info() {
	if(state != STATE_IDENTIFY && state != STATE_NORMAL)
		return;
	if(!getMe())
		return;

	string minf = "BINF " + getMe()->getCID().toBase32();
	unsigned size = minf.size();
	string tmp;

	StringMapIter i;
#define ADDPARAM(var, content) \
	tmp = content; \
	if((i = lastInfoMap.find(var)) != lastInfoMap.end()) { \
		if(i->second != tmp) { \
			if(tmp.empty()) \
				lastInfoMap.erase(i); \
			else \
				i->second = tmp; \
			minf += var + tmp; \
		} \
	} else if(!tmp.empty()) { \
		minf += var + tmp; \
		lastInfoMap[var] = tmp; \
	}

	ADDPARAM(" NI", Command::escape(getNick()));
	ADDPARAM(" DE", Command::escape(getDescription()));
	ADDPARAM(" SL", Util::toString(SETTING(SLOTS)));
	ADDPARAM(" SS", ShareManager::getInstance()->getShareSizeString());
	ADDPARAM(" HN", Util::toString((int64_t)counts.normal));
	ADDPARAM(" HR", Util::toString((int64_t)counts.registered));
	ADDPARAM(" HO", Util::toString((int64_t)counts.op));
	ADDPARAM(" VE", "++\\ " VERSIONSTRING);
	if(SETTING(CONNECTION_TYPE) == SettingsManager::CONNECTION_ACTIVE) {
		ADDPARAM(" I4", "0.0.0.0");
		ADDPARAM(" U4", Util::toString(SETTING(IN_PORT)));
	} else {
		ADDPARAM(" I4", "");
		ADDPARAM(" U4", "");
	}

#undef ADDPARAM

	if(minf.size() != size) {
		minf += "\n";
		send(minf);
	}
}
示例#14
0
void DefineACES(MicroAceTime* at)
{
	// Add conditions
	ADDPARAMCOMBO("Mouse button", "Select the mouse button to check for.", "Left|Middle|Right");
	ADDPARAMCOMBO("Click type",	"Select whether to check for a click or double click.", "Clicked|Double-clicked|Either single or double clicked");
	ADDCND("On click", "Mouse", "%o On %0 mouse button %1", &ExtObject::cOnMouseButton, "OnClick", CND_TRIGGERED);

	ADDCND("On any click", "Mouse", "%o On any click", &ExtObject::cTrigger, "OnAnyClick", CND_TRIGGERED);

	ADDPARAMCOMBO("Mouse button", "Select the mouse button to check for.", "Left|Middle|Right");
	ADDCND("On mouse button released", "Mouse", "%o On %0 mouse button released", &ExtObject::cOnMouseButtonReleased, "OnRelease", CND_TRIGGERED);

	ADDPARAMCOMBO("Mouse button", "Select the mouse button to check for.", "Left|Middle|Right");
	ADDCND("Mouse button is down?", "Mouse", "%o %0 mouse button is down", &ExtObject::cMouseButtonDown, "MouseButtonDown", 0);

	ADDPARAMCOMBO("Mouse button", "Select the mouse button to check for.", "Left|Middle|Right");
	ADDPARAMCOMBO("Click type",	"Select whether to check for a click or double click.", "Clicked|Double-clicked|Either single or double clicked");
	ADDPARAM(PARAM_OBJECT, "Object", "Object to test clicked.");
	ADDCND("On object clicked", "Mouse", "%o On %0 %1 on %2", &ExtObject::cOnClickObject, "OnClickObject", CND_TRIGGERED | SOL_MODIFIER);

	ADDPARAM(PARAM_OBJECT, "Object", "Object to test for mouse over.");
	ADDCND("Mouse is over object?", "Mouse", "%o Mouse is over %0", &ExtObject::cMouseOverObject, "MouseOverObject", SOL_MODIFIER);

	ADDCND("On mouse wheel up", "Mouse", "%o On Mouse Wheel Up", &ExtObject::cTrigger, "OnWheelUp", CND_TRIGGERED);
	ADDCND("On mouse wheel down", "Mouse", "%o On Mouse Wheel Down", &ExtObject::cTrigger, "OnWheelDown", CND_TRIGGERED);

	CString keysCombo;
	for (int i = 0; keyTable[i].vk != -1; i++) {
		keysCombo += keyTable[i].name;

		if (keyTable[i+1].vk != -1)
			keysCombo += "|";
	}

	ADDPARAMCOMBO("Key", "Key to check if pressed.", keysCombo);
	ADDCND("On key pressed", "Keyboard", "%o On key %0 pressed", &ExtObject::cOnKey, "OnKey", 0);

	ADDPARAMCOMBO("Key", "Key to check if down.", keysCombo);
	ADDCND("Key is down?", "Keyboard", "%o Key %0 is down", &ExtObject::cKeyDown, "KeyDown", 0);

	ADDCND("On any key pressed", "Keyboard", "%o On any key pressed", &ExtObject::cTrigger, "OnAnyKey", CND_TRIGGERED);

	ADDPARAM(PARAM_STRING, "Control", "Name of the control to test.");
	ADDPARAMDEF(PARAM_VALUE, "Player (1-10)", "Player number who has this control.", "1");
	ADDCND("On control pressed", "Controls", "%o On player %1 pressed %0", &ExtObject::cOnControl, "OnControl", 0);

	ADDPARAM(PARAM_STRING, "Control", "Name of the control to test.");
	ADDPARAMDEF(PARAM_VALUE, "Player (1-10)", "Player number who has this control.", "1");
	ADDCND("Control is down?", "Controls", "%o Player %1 %0 is down", &ExtObject::cControlDown, "ControlDown", 0);

	ADDPARAMCOMBO("Key", "Key to check if released.", keysCombo);
	ADDCND("On key released", "Keyboard", "%o On key %0 released", &ExtObject::cKeyReleased, "OnRelease", 0);

	///////////////////////////////////

	ADDPARAMCOMBO("Cursor visibility", "Select whether to hide or show the cursor.", "Invisible|Visible");
	ADDACT("Set cursor visible", "Mouse", "Make cursor %0", &ExtObject::aSetCursorVisible, "SetCursorVisible", 0);

	ADDPARAM(PARAM_VALUE, "X co-ordinate on screen", "The X co-ordinate to place the cursor on screen.");
	ADDACT("Set mouse X", "Mouse", "Set mouse X to %0", &ExtObject::aSetMouseX, "SetMouseX", 0);

	ADDPARAM(PARAM_VALUE, "Y co-ordinate on screen", "The Y co-ordinate to place the cursor on screen.");
	ADDACT("Set mouse Y", "Mouse", "Set mouse Y to %0", &ExtObject::aSetMouseY, "SetMouseY", 0);

	ADDPARAM(PARAM_STRING, "Control", "Name of the control to set.");
	ADDPARAMDEF(PARAM_VALUE, "Player", "Player number who has this control.", "1");
	ADDPARAM(PARAM_VALUE, "State Value", "Value from 0 to 1");
	ADDACT("Set control state", "Controls", "Set control %0 of player %1 to %2", &ExtObject::aSetControlState, "SetControlState", 0);


	// Shortcuts to sys expression
	ADDEXP("Get mouse absolute X", "Screen", "AbsMouseX", &ExtObject::eGetAbsoluteMouseX, RETURN_VALUE);
	ADDEXP("Get mouse absolute Y", "Screen", "AbsMouseY", &ExtObject::eGetAbsoluteMouseY, RETURN_VALUE);
	ADDEXP("Get mouse X", "Mouse", "<MouseX>", NULL, 0);
	ADDEXP("Get mouse Y", "Mouse", "<MouseY>", NULL, 0);

	ADDPARAM(PARAM_STRING, "\"\"", "Name of the control to test.");
	ADDPARAMDEF(PARAM_VALUE, "1", "Player number who has this control.", "1");
	ADDEXP("Get control state", "Controls", "ControlState", &ExtObject::eGetControlState, RETURN_VALUE);
}
示例#15
0
void DefineACES(MicroAceTime* at)
{
	// Define your ACE tables here.
	// Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add parameters.
	// See the documentation for full details.

	/////////////////////////////
	// Conditions
	ADDPARAMCOMBO("Comparison", "Select how to compare the Z position", "Equal to|Not equal to|Less than|Less or equal|Greater than|Greater or equal");
	ADDPARAM(PARAM_VALUE, "Z", "Z to compare to");
	ADDCND("Compare Z position", "Size & Position", "%o Z %0 %1", &ExtObject::cCompareZ, "CompareZ", 0);

	ADDPARAMCOMBO("Comparison", "Select how to compare the depth", "Equal to|Not equal to|Less than|Less or equal|Greater than|Greater or equal");
	ADDPARAM(PARAM_VALUE, "Depth", "Depth to compare to");
	ADDCND("Compare depth", "Size & Position", "%o Depth %0 %1", &ExtObject::cCompareDepth, "CompareDepth", 0);

	// PRIVATE VARIABLES
	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to test.");
	ADDPARAMCOMBO("Comparison", "Select the comparison to make.", "Equal to|Not equal to|Less than|Less or equal|Greater than|Greater or equal");
	ADDPARAM(PARAM_VALUE, "Value", "Value to compare to");
	ADDCND("Compare a private variable", "Private variables", "%o Value %0 %1 %2", &ExtObject::cValueCmp, "CompareValue", 0);


	/////////////////////////////
	// Actions
	ADDPARAM(PARAM_VALUE, "Z", "Enter the new Z position");
	ADDACT("Set Z", "Size & Position", "Set Z to %0", &ExtObject::aSetZ, "SetZ", 0);

	ADDPARAM(PARAM_VALUE, "Depth", "Enter the new depth");
	ADDACT("Set depth", "Size & Position", "Set depth to %0", &ExtObject::aSetDepth, "SetDepth", 0);

	ADDPARAM(PARAM_VALUE, "Yaw", "Enter new yaw rotation, in degrees.");
	ADDACT("Set yaw", "Angle", "Set yaw to %0 degrees", &ExtObject::aSetYaw, "SetYaw", 0);

	ADDPARAM(PARAM_VALUE, "Pitch", "Enter new pitch rotation, in degrees.");
	ADDACT("Set pitch", "Angle", "Set pitch to %0 degrees", &ExtObject::aSetPitch, "SetPitch", 0);

	ADDPARAM(PARAM_VALUE, "Roll", "Enter new roll rotation, in degrees.");
	ADDACT("Set roll", "Angle", "Set roll to %0 degrees", &ExtObject::aSetRoll, "SetRoll", 0);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to store");
	ADDACT("Set value", "Private variables", "Set %0 to %1", &ExtObject::aSetValue, "SetValue", 0);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to add.");
	ADDACT("Add to value", "Private variables", "Add %1 to %0", &ExtObject::aAddValue, "AddValue", 0);

	ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
	ADDPARAM(PARAM_VALUE, "Value", "Value to subtract.");
	ADDACT("Subtract from value", "Private variables", "Subtract %1 from %0", &ExtObject::aSubValue, "SubValue", 0);

	/////////////////////////////
	// Expressions
	ADDEXP("Get Z", "Size & Position", "Z", &ExtObject::eGetZ, RETURN_FLOAT);
	ADDEXP("Get depth", "Size & Position", "Depth", &ExtObject::eGetDepth, RETURN_FLOAT);
	ADDEXP("Get yaw", "Angle", "Yaw", &ExtObject::eGetYaw, RETURN_FLOAT);
	ADDEXP("Get pitch", "Angle", "Pitch", &ExtObject::eGetPitch, RETURN_FLOAT);
	ADDEXP("Get roll", "Angle", "Roll", &ExtObject::eGetRoll, RETURN_FLOAT);
	ADDPARAM(PARAM_STRING, "Value", "Name of value.");
	ADDEXP("Get private variable", "Private variables", "Value", &ExtObject::eGetValue, 0);


#include "..\..\Common\CommonAceTable.hpp"
}
示例#16
0
void DefineACES(MicroAceTime* at)
{

    // Define your ACE tables here.
    // Use ADDPARAM before each ADDACT/ADDCND/ADDEXP to add formal parameters.

    // Format:
    // ADDPARAM(type, title, description)
    //
    // type = the type of parameter.  See the PARAMS enum.
    // title = title of parameter, in expression editor
    // description = text to go in the text box describing this parameter.  Try to give
    //				 a helpful description.

    /////////////////////////////
    // Conditions

    // Format:
    // ADDCND(menuID, routine, scriptname, displaytext, flags)
    //
    // menuID = ID in the menu resource, must start at 2000
    // routine = address of the function associated
    // scriptname = reserved for future script use, e.g. "Set X position" script name could be "SetX"
    // displaytext = text to display in event editor, %0 is first param, %1 second etc
    // flags: can be
    // 0: ordinary evaluated event
    // CND_TRIGGERED: ordinary event trigger
    // CND_FASTTRIGGERED: fast trigger
    ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to test.");
    ADDPARAMCOMBO("Comparison", "Select the comparison to make.", "Equal to|Not equal to|Less than|Less or equal|Greater than|Greater or equal");
    ADDPARAM(PARAM_VALUE, "Value", "Value to compare to");
    ADDCND("Compare value", "Private variables", "%o Value %0 %1 %2", &ExtObject::cValueCmp, "CompareValue", 0);
    /////////////////////////////
    // Actions

    // ADDACT(menuID, routine, scriptname, displaytext)
    // Same format as ADDCND, but actions have no flags.

    ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
    ADDPARAM(PARAM_VALUE, "Value", "Value to store");
    ADDACT("Set value", "Private variables", "Set %0 to %1", &ExtObject::aSetValue, "SetValue", 0);

    ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
    ADDPARAM(PARAM_VALUE, "Value", "Value to add.");
    ADDACT("Add to value", "Private variables", "Add %1 to %0", &ExtObject::aAddValue, "AddToValue", 0);

    ADDPARAM(PARAM_PRIVATEVARIABLE, "Private variable", "Select the private variable to modify.");
    ADDPARAM(PARAM_VALUE, "Value", "Value to subtract.");
    ADDACT("Subtract from value", "Private variables", "Subtract %1 from %0", &ExtObject::aSubValue, "SubtractFromValue", 0);

    ADDACT("Clear to transparent", "Canvas", "Clear to transparent", &ExtObject::aClearTransparent, "ClearTransparent", 0);

    ADDPARAM(PARAM_COLOR, "Colour", "Colour to clear the surface with.");
    ADDPARAMDEF(PARAM_VALUE, "Opacity", "Opacity to clear surface to.  100 = solid, 0 = transparent.", "100");
    ADDACT("Clear to colour", "Canvas", "Clear %0 opacity %1", &ExtObject::aClearColour, "ClearColour", 0);

    ADDPARAM(PARAM_COLOR, "Colour", "Colour to clear surface with.");
    ADDPARAMDEF(PARAM_VALUE, "Opacity", "Opacity to clear surface to.  100 = solid, 0 = transparent.", "100");
    ADDPARAM(PARAM_VALUE, "Left", "X co-ordinate of left of fill area.");
    ADDPARAM(PARAM_VALUE, "Top", "Y co-ordinate of top of fill area.");
    ADDPARAM(PARAM_VALUE, "Right", "X co-ordinate of right of fill area.");
    ADDPARAM(PARAM_VALUE, "Bottom", "Y co-ordinate of bottom of fill area.");
    ADDACT("Fill rectangle", "Canvas", "Fill area (%2, %3, %4, %5) with %0 opacity %1", &ExtObject::aFill, "Fill", 0);

    ADDPARAM(PARAM_VALUE, "X", "X co-ordinate of point to draw");
    ADDPARAM(PARAM_VALUE, "Y", "Y co-ordinate of point to draw");
    ADDPARAM(PARAM_COLOR, "Colour", "Colour of point to draw.");
    ADDPARAMDEF(PARAM_VALUE, "Opacity", "Opacity of dot.  100 = solid, 0 = transparent.", "100");
    ADDACT("Draw point", "Canvas", "Draw %2 point at (%0, %1) opacity %3", &ExtObject::aPoint, "Point", 0);

    ADDPARAM(PARAM_VALUE, "X1", "X co-ordinate of start of line");
    ADDPARAM(PARAM_VALUE, "Y1", "Y co-ordinate of start of line");
    ADDPARAM(PARAM_VALUE, "X2", "X co-ordinate of end of line");
    ADDPARAM(PARAM_VALUE, "Y2", "Y co-ordinate of end of line");
    ADDPARAM(PARAM_COLOR, "Colour", "Colour of point to draw.");
    ADDPARAMDEF(PARAM_VALUE, "Opacity", "Opacity of line.  100 = solid, 0 = transparent.", "100");
    ADDACT("Draw line", "Canvas", "Draw %4 line opacity %5 from (%0, %1) to (%2, %3)", &ExtObject::aLine, "Line", 0);

    ADDPARAM(PARAM_OBJECT, "Object", "Object to draw");
    ADDACT("Paste Object", "Canvas", "Paste %0 into canvas", &ExtObject::aPasteObject, "PasteObject", 0);

    ADDACT("Update collision mask", "Canvas", "Update collision mask", &ExtObject::aGenerateMask, "UpdateCollisions", 0);

    ADDPARAM(PARAM_VALUE, "Width", "Number of horizontal pixels");
    ADDPARAM(PARAM_VALUE, "Height", "Number of vertical pixels");
    ADDACT("Resize Canvas", "Canvas", "Resize Canvas to (%0, %1)", &ExtObject::aResize, "Resize", 0);


    //ADDPARAM(PARAM_OBJECT, "Object", "DEBUG");
    //ADDACT("Set pathfinding object", "DEBUG", "Set debugging pathfinding from RTS of %0", &ExtObject::aSetDebuggingPf, "SetDebug", 0);

    /////////////////////////////
    // Expressions

    // ADDEXP(menuID, routine, expressionName, displaytext, flags)
    // Same format as conditions, except with the expression editor text.
    // expressionName = the name in the expression editor, e.g "Width" would
    // associate this expression when the user types YourObject.Width
    // Flags:  RETURN_VALUE, RETURN_STRING, RETURN_UNDEFINED

    ADDPARAM(PARAM_PRIVATEVARIABLE, "'Variable name'", "Name of value.");
    ADDEXP("Get private variable", "Private variables", "Value", &ExtObject::eGetValue, 0);





    // additional distortmap stuff
    ADDPARAMDEF(PARAM_VALUE, "Columns", "The number of columns in the distort map.", "1");
    ADDPARAMDEF(PARAM_VALUE, "Rows", "The number of rows in the distort map", "1");
    ADDACT("Set distort map size", "Distort Map", "Set distort map size to %0, %1", &ExtObject::aSetDistortMapSize, "SetDistortMapSize", 0);

    ADDPARAMDEF(PARAM_VALUE, "Column", "Column number", 0);
    ADDPARAMDEF(PARAM_VALUE, "Row", "Row number", 0);
    ADDPARAMDEF(PARAM_VALUE, "X displace", "X displacement", 0);
    ADDPARAMDEF(PARAM_VALUE, "Y displace", "Y displacement", 0);
    ADDPARAMDEF(PARAM_VALUE, "U displace", "U displacement", 0);
    ADDPARAMDEF(PARAM_VALUE, "V displace", "V displacement", 0);
    ADDPARAMDEF(PARAM_COLOR, "Filter", "The colour", "16777215");
    ADDPARAMDEF(PARAM_VALUE, "Opacity", "The opacity", "100");
    ADDPARAMDEF(PARAM_VALUE, "Z position", "Z position", 0);
    ADDACT("Set relative displacement at", "Distort Map", "Set relative displacement at (%0, %1) to XYZ(%2, %3, %8) UV(%4, %5) %7 % %6", &ExtObject::aSetDisplacementAt, "SetDisplacementAt", 0);


    ADDPARAMDEF(PARAM_VALUE, "Column", "Column number", 0);
    ADDPARAMDEF(PARAM_VALUE, "Row", "Row number", 0);
    ADDPARAMDEF(PARAM_VALUE, "X position", "X position", 0);
    ADDPARAMDEF(PARAM_VALUE, "Y positon", "Y position", 0);
    ADDPARAMDEF(PARAM_VALUE, "U displace", "U position", 0);
    ADDPARAMDEF(PARAM_VALUE, "V displace", "V position", 0);
    ADDPARAMDEF(PARAM_COLOR, "Filter", "The colour", "16777215");
    ADDPARAMDEF(PARAM_VALUE, "Opacity", "The opacity", "100");
    ADDPARAMDEF(PARAM_VALUE, "Z position", "Z position", 0);
    ADDACT("Set absolute displacement at", "Distort Map", "Set absolute displacement at (%0, %1) to XYZ(%2, %3, %8) UV(%4, %5) %7 % %6", &ExtObject::aSetDisplacementRealAt, "SetDisplacementRealAt", 0);

    ADDEXP("Get mesh columns", "Distort Map", "MeshCols", &ExtObject::eGetMeshCols, RETURN_VALUE);
    ADDEXP("Get mesh rows", "Distort Map", "MeshRows", &ExtObject::eGetMeshRows, RETURN_VALUE);

    ADDPARAM(PARAM_VALUE, "Column", "Column to retrieve from");
    ADDPARAM(PARAM_VALUE, "Row", "Row to retrieve from");
    ADDEXP("Vertex X", "Distort Map", "VertexX", &ExtObject::eGetMeshX, RETURN_VALUE);

    ADDPARAM(PARAM_VALUE, "Column", "Column to retrieve from");
    ADDPARAM(PARAM_VALUE, "Row", "Row to retrieve from");
    ADDEXP("Vertex Y", "Distort Map", "VertexY", &ExtObject::eGetMeshY, RETURN_VALUE);

    ADDPARAM(PARAM_VALUE, "Column", "Column to retrieve from");
    ADDPARAM(PARAM_VALUE, "Row", "Row to retrieve from");
    ADDEXP("Vertex Z", "Distort Map", "VertexZ", &ExtObject::eGetMeshZ, RETURN_VALUE);

    ADDPARAM(PARAM_VALUE, "Column", "Column to retrieve from");
    ADDPARAM(PARAM_VALUE, "Row", "Row to retrieve from");
    ADDEXP("Vertex U", "Distort Map", "VertexU", &ExtObject::eGetMeshU, RETURN_VALUE);

    ADDPARAM(PARAM_VALUE, "Column", "Column to retrieve from");
    ADDPARAM(PARAM_VALUE, "Row", "Row to retrieve from");
    ADDEXP("Vertex V", "Distort Map", "VertexV", &ExtObject::eGetMeshV, RETURN_VALUE);

    ADDPARAM(PARAM_VALUE, "Column", "Column to retrieve from");
    ADDPARAM(PARAM_VALUE, "Row", "Row to retrieve from");
    ADDEXP("Vertex filter", "Distort Map", "VertexFilter", &ExtObject::eGetMeshFilter, RETURN_VALUE);

    ADDPARAM(PARAM_VALUE, "Column", "Column to retrieve from");
    ADDPARAM(PARAM_VALUE, "Row", "Row to retrieve from");
    ADDEXP("Vertex opacity", "Distort Map", "VertexOpacity", &ExtObject::eGetMeshOpacity, RETURN_VALUE);

#include "..\..\Common\CommonAceTable.hpp"
}