Nexus - Influence scripts part 2

Reworked a lot so I decided to start over.
onGMCP:

if (args.gmcp_method == "Char.Items.List")
{
    infTargets = []
    set_variable("infTarget","")
    gmcpArgs = args.gmcp_args.items
    for (var i = 0; i < args.gmcp_args.items.length; i++) 
    {
        if (typeof gmcpArgs[i].icon != 'undefined') 
        {
	        if (gmcpArgs[i].icon.localeCompare("humanoid") == 0 || gmcpArgs[i].icon.localeCompare("guard") == 0)
    	    	infTargets.push(gmcpArgs[i].id)
        }
    }
}
This automatically grabs an influence target when you enter or look into a room, into an array called infTargets. It works on most influenceable npcs, there's some weird ones that don't have an icon. Those I just target manually.

Function: InfluencingFunction

if (influenceArray.length > 0)
{
    if (!get_variable("infTarget") || get_variable("infTarget").length === 0)
    {
        if (infTargets.length > 0)
        {
        	set_variable("infTarget",infTargets[0])
        	infTargets.shift()
        }
   		else {
        	send_command("echo No target to influence")
            send_command("infoff")
            send_command("sm clear")
        	return
    	}
	}
	send_command("sm add influence " + get_variable("infTarget") + " with " + influenceArray[0],1)
	influenceArray.push(influenceArray.shift())
}
else
    send_command("echo No abilities to influence with!")

Function: InfluenceTables

if (get_variable("infType").localeCompare("cha") == 0 || get_variable("infType").localeCompare("beg") == 0)
{
    if (hasSkill.influence.includes('Wheedling'))
    	influenceArray = ["Wheedling","Supplication","Begging"];
    else if (client.hasSkill.influence.includes('Supplication'))
    	influenceArray = ["Supplication","Begging"];
    else
        influenceArray = ["Begging"]
}
else if (get_variable("infType").localeCompare("sed") == 0)
{
    if (client.hasSkill.influence.includes('Beguiling'))
    	influenceArray = ["Beguiling","Flattery","Charm"];
    else if (client.hasSkill.influence.includes('Charm'))
    	influenceArray = ["Flattery","Charm"];
    else if (client.hasSkill.influence.includes("Flattery"))
        influenceArray = ["Flattery"]
}
else if (get_variable("infType").localeCompare("emp") == 0)
{
    if (client.hasSkill.influence.includes('Praise'))
    	influenceArray = ["Praise","Admiration","Compliments"];
    else if (client.hasSkill.influence.includes('Admiration'))
    	influenceArray = ["Admiration","Compliments"];
    else if (client.hasSkill.influence.includes("Compliments"))
        influenceArray = ["Compliments"]
}
else if (get_variable("infType").localeCompare("weak") == 0)
{
    if (client.hasSkill.influence.includes('Derision'))
    	influenceArray = ["Derision","Mockery","Teasing"];
    else if (client.hasSkill.influence.includes('Mockery'))
    	influenceArray = ["Mockery","Teasing"];
    else if (client.hasSkill.influence.includes("Teasing"))
        influenceArray = ["Teasing"]
}
else if (get_variable("infType").localeCompare("para") == 0)
{
    if (client.hasSkill.influence.includes('Conspiracies'))
    	influenceArray = ["Conspiracies","Distrust","Rumours"];
    else if (client.hasSkill.influence.includes('Distrust'))
    	influenceArray = ["Distrust","Rumours"];
    else if (client.hasSkill.influence.includes("Rumours"))
        influenceArray = ["Rumours"]
}

Function: RevoltTable (one would need to set city with an alias)

if (get_variable("city").localeCompare("Celest") == 0)
{
    if (hasSkill.influence.includes('Evangelizing'))
    	influenceArray = ["Evangelizing","Preaching","Proselytizing"];
    else if (client.hasSkill.influence.includes('Preaching'))
    	influenceArray = ["Preaching","Proselytizing"];
    else if (client.hasSkill.influence.includes('Proselytizing'))
        influenceArray = ["Proselytizing"]
}
else if (get_variable("city").localeCompare("Glomdoring") == 0)
{
    if (hasSkill.influence.includes('Trickery'))
    	influenceArray = ["Trickery","Intrigue","Manipulation"];
    else if (client.hasSkill.influence.includes('Intrigue'))
    	influenceArray = ["Intrigue","Manipulation"];
    else if (client.hasSkill.influence.includes('Manipulation'))
        influenceArray = ["Manipulation"]
}
else if (get_variable("city").localeCompare("Magnagora") == 0)
{
    if (hasSkill.influence.includes('Brainwash'))
    	influenceArray = ["Brainwash","Awe","Shock"];
    else if (client.hasSkill.influence.includes('Awe'))
    	influenceArray = ["Awe","Shock"];
    else if (client.hasSkill.influence.includes('Shock'))
        influenceArray = ["Shock"]
}
else if (get_variable("city").localeCompare("Hallifax") == 0)
{
    if (hasSkill.influence.includes('Collaboration'))
    	influenceArray = ["Collaboration","Assimilation","Accordance"];
    else if (client.hasSkill.influence.includes('Assimilation'))
    	influenceArray = ["Assimilation","Accordance"];
    else if (client.hasSkill.influence.includes('Accordance'))
        influenceArray = ["Accordance"]
}
else if (get_variable("city").localeCompare("Gaudiguch") == 0)
{
    if (hasSkill.influence.includes('Revolution'))
    	influenceArray = ["Revolution","Freedom","Liberty"];
    else if (client.hasSkill.influence.includes('Freedom'))
    	influenceArray = ["Freedom","Liberty"];
    else if (client.hasSkill.influence.includes('Liberty'))
        influenceArray = ["Liberty"]
}
else if (get_variable("city").localeCompare("Serenwilde") == 0)
{
    if (hasSkill.influence.includes('Oration'))
    	influenceArray = ["Oration","Recitation","Lectures"];
    else if (client.hasSkill.influence.includes('Recitation'))
    	influenceArray = ["Recitation","Lectures"];
    else if (client.hasSkill.influence.includes('Lectures'))
        influenceArray = ["Lectures"]
}
The method for setting city via gmcp(conveniently, there is another possible way to do it but it's too much effort) works in Imperian but I can't make it work in Lusternia yet, which is why I put the note on the RevoltTable funtion.

Alias: inf (exact match)
call function: InfluencingFunction

Alias: infon (exact match)
call function: InfluencingFunction
modify variable: amInfluencing to value true

Alias: inf <infTarget> <infType> (begins with)
modify variable: infTarget to variable @infTarget
modify variable: infType to variable @infType 
call function: InfluenceTables

Alias: inf <infType) (begins with)
modify variable: infType to variable @infType 
call function: InfluenceTables

Alias: rev <revTarget> (begins with)
modify variable: revTarget to variable @revTarget
call function: RevoltTable

Alias: infoff (exact match>
modify variable: amInfluencing to value false
modify variable: infTarget to value 
Trigger: You have recovered equilibrium.

if variable amInfluencing is = value true then jump to label Keep Influencing otherwise stop
Label Keep Influencing
call function: InfluencingFunction

Trigger: ^.* keeps asking \w+ why \w+ considered giving so much away, and pays you no attention.$|.* sighs dramatically and searches \w+ pockets, looking for something to give you\.$|^.* snorts in derision at you and shoves you away\.$

Modify variable: infTarget set to value
call function: InfluencingFunction<br>
And the lines for when you're done with or can't use weakening, paranoia, empower, or seduction are set up the same. The regular expression here is a bit lazy, but it's just influencing so w/e.


Comments

  • Hi, I'm new to this. What does the "sm add ... " do?
  • Vermidius said:
    Hi, I'm new to this. What does the "sm add ... " do?
    ab combat stratagem

    COMBAT - STRATAGEM
     
    Syntax: STRATAGEM LIST
    STRATAGEM CLEAR
    STRATAGEM NOW
    STRATAGEM PAUSE
    STRATAGEM ECHO [ON|OFF]
    STRATAGEM ADD [<mods>] <action>
    STRATAGEM INSERT [<position>] [<mods>] <action>
    STRATAGEM REPLACE [<position>] [<mods>] <action>
    STRATAGEM REMOVE <action/position>
     
    Your knowledge of the flow of combat is such that you may now develop stratagems of assault. A stratagem can consist of no more than ten actions, each of which can consist of no more than five subactions (each separated by a single pipe character, '|'). If your stratagem stops, you may attempt to start it again with STRATAGEM NOW. Inserting points into your stratagem will add the new action BEFORE the position you supply. You may substitute SM for STRATAGEM for brevity.
     

    Modifiers can be applied to individual actions. The following modifiers are available:
    ARM - Requires only one arm on balance.
    SUB - Requires the Sub Psionic Channel.
    SUPER - Requires the Super Psionic Channel.
    ID - Requires the Id Psionic Channel.
    FREE - Does not consume equilibrium or balance.
    REPEAT - Will remain in the stratagem after triggering.
     
    You may pause your stratagem before creating it in order to compile a list of actions to perform at a later date (which you can start with STRATAGEM NOW), or pause a currently executing stratagem mid-flow.
     
    If you specify an action as repeating, it will not be removed from your stratagem when it is performed. It will continue ad infinitum until you manually remove the entry from your stratagem.

Sign In or Register to comment.