// ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: //:::::::::::::::::::::::: Shayan's Subrace Engine ::::::::::::::::::::::::::::: // ::::::::::Extension: Moon's Subrace Selection Converstion for SSE ::::::::::: // ::::::::::::Contact: http://p2.forumforfree.com/shayan.html:::::::::::::::::: // :::: // :::: Written by: DM_Moon // :: // :: Description: Subrace Conversation used in SSE's Wand system. // :: #include "sha_subr_methds" //Conversation Consts const int CONV_START = 1; const int CONV_SELECT_NEW_TARGET = 2; const int CONV_LIST_OBJECTS = 3; const int CONV_LIST_RACES = 4; const int CONV_READ_RACE = 5; const int CONV_CACHED_OBJECT_LIST = 11; const int CONV_REASON = 12; const int CONV_WORK_TARGET = 14; const int CONV_MATCH = 15; const int CONV_TEST_LETO = 16; const int CONV_CONFIRM_SUBRACE_CHANGE = 17; const int CONV_DO_FUNCTION = 0x80000000; const int CONV_REMOVE_PARAM = 0x000000FF; //MENU const const int MENU_NEXT = 0x00000001; const int MENU_PREV = 0x00000002; //PARAM/FUNCTION const const int FUNCTION_DO_RESET = 0x00010000; const int FUNCTION_BUILD_CACHE = 0x00020000; const int FUNCTION_CACHE_2_TARGET = 0x00040000; const int FUNCTION_CHANGE_SUBRACE = 0x00080000; const int FUNCTION_DO_DISABLE_ENGINE = 0x00100000; const int FUNCTION_DO_SHUTDOWN_ENGINE =0x00200000; const int FUNCTION_RELOAD_SUBRACE = 0x00400000; //Conversation Header. int moon_conv_Start_DM(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_Start_PC(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_ListObjects(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_ListRaces(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_ReadRaces_DM(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_ReadRaces_PC(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_WorkWithTarget_DM(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_WorkWithTarget_PC(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_Match_DM(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_Match_PC(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_LetoTest(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_ConfirmSubraceChange_DM(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); int moon_conv_ConfirmSubraceChange_PC(int nCurrent, int nChoice, int iParams = 0, int iFunction = 0); //The Speaker (DM, PC whatever) The NPC (if any) is OBJECT_SELF object oMySpeaker = GetLastSpeaker(); //returns the current selected target. object GetMyTarget(); //Sets the current target to oTarget. void SetMyTarget(object oTarget); //returns Character Name, Login and Location (by Area) on oTarget. (Use on PC) string GetInfoCurrentTarget(object oTarget); //Saves either all or just a given character. void SaveCharacter(int All=TRUE, object oPlayer=OBJECT_INVALID); //Returns the level of o in the Class position of iPos (1 - 3 ) string GetClassAndLevel(int iPos, object o); //Sends a message to all DMs void Moon_DM_MSG(string sMSG); //Sends a message to a given PC void Moon_PC_MSG(object oPC, string sMSG); //Writes input into the log file. void WriteLog(string s); //Standard Message handling (especially useful for live testing :P) //returns the string with the given Prefix: //if iPart: //0 DEBUG //1 ERROR //2 SUCCESS //3 WARNING //4 ATTENTION //5 GRANTED //6 DENIED string CreateDebugString(int iPart=0, string s=""); //Put in RangeMin and RangeMax int FeatStuff(object oTarget, int RangeMin, int RangeMax); //input 0 to 6; string GetRaceByFlagNumber(int iNumber); //returns a little information about the given subrace. //used for listing subraces. //For Dialog string OutputSubraceInformation(string subraceName); //returns all information about the given subrace. //For Dialog string OutputFullSubraceInformation(string subraceName); //returns the req. of subraces coloured by whether or not oTarget //fulfills them. //For Dialog string GetTestMatch(object oTarget, string subraceName); const string _TAB_ = " "; const string COLOUR_RED = "þ "; const string COLOUR_GREEN = " þ "; const string COLOUR_BLUE = " þ"; const string COLOUR_YELLOW = "þþ "; const string COLOUR_PURPLE = "þ þ"; const string COLOUR_TEAL = " þþ"; const string COLOUR_LRED = "þdd"; const string COLOUR_LGREEN = "dþd"; const string COLOUR_LBLUE = "ddþ"; const string COLOUR_LYELLOW = "þþd"; const string COLOUR_LPURPLE = "þdþ"; const string COLOUR_LTEAL = "dþþ"; const string COLOUR_WHITE = "þþþ"; const string COLOUR_DARK = "ddd"; const string COLOUR_BLACK = " "; const string COLOUR_GREEN_SSE = "Ü"; string Moon_ColourString(string sText, string sColour=COLOUR_GREEN); string Moon_ColourString(string sText, string sColour=COLOUR_GREEN) { return "" +sText + ""; }