Author Topic: Subdual  (Read 3135 times)

HazNpho

  • Posts: 15
    • View Profile
Subdual
« on: July 01, 2012, 11:10:10 PM »
Any reason as to why Subdual is still a widget? I know that I had run into issues with it working correctly from a menu before, but this worked for me.

Code: [Select]
//::///////////////////////////////////////////////
//:: Name     Subduel Toggle switch.
//:: FileName ant_sd_toggle
//:: Copyright (c) 2007 - 2012
//:://////////////////////////////////////////////
/*
  This allows a player to set subduel to being turned on or off.
*/
//:://////////////////////////////////////////////
//:: Created By: Tim (HazNpho)
//:: Created On: July 05, 2007
//:: Modified By: Tim (HazNpho)
//:: Modified On: April 28, 2010
//:: Reason: Added debug and cleaned up.
//:://////////////////////////////////////////////

#include "ant_mod_func_01"

void main()
{
    object oPC = GetPCSpeaker();
    string sDebug = "Debug Mode: Sub Duel\nPlayer: "+GetName(oPC); //Begin Debug
    string sSDToggle; //Toggle string for debug
    int iSubD = GetLocalInt(oPC, "iSubD");
        switch (iSubD)
        {
            case FALSE:
                FloatingTextStringOnCreature("Subduel has been turned on.", oPC, FALSE);
                sSDToggle = "ON";
            break;
            case TRUE:
                FloatingTextStringOnCreature("Subduel has been turned off.", oPC, FALSE);
                sSDToggle = "OFF";
            break;
        }
    sDebug += "The player has turned "+sSDToggle+" subduel in "+GetName(GetArea(oPC))+".\nValue is: "+IntToString(iSubD);
    DebugSys(3, oPC, sDebug); //send debug
    SetLocalInt(oPC, "iSubD", !iSubD); //Apply opposite int to PC
}

Ignore me if this isn't a matter of conversation issue.

Sakes

  • Probably my fault.
  • Administrator
  • Posts: 1264
    • View Profile
Re: Subdual
« Reply #1 on: July 01, 2012, 11:33:06 PM »
I'm sure there are many ways subdual could be handled, it's just not something that's come up.  PvP has been known to happen but it's fairly rare.  It's more a matter of no one bothering to take the time to optimize it.

Edit: Oh, and a widget can be toggled in combat, if we stick it on the rest menu it would be problematic.
« Last Edit: July 02, 2012, 12:02:58 AM by Sakes »
DM Cat is watching you roleplay.

HazNpho

  • Posts: 15
    • View Profile
Re: Subdual
« Reply #2 on: July 02, 2012, 03:19:23 AM »
True, I'll see if I can find a way around that. But even as a widget, sometimes you get the busy or no action result.

Thanks for the update however.

 

Powered by EzPortal