Author Topic: REQUEST FOR NEW IDEAS TO SCRIPT  (Read 2617 times)

Legacy_CalSailX

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #30 on: November 27, 2010, 03:31:52 am »


               

Avonos the Rogue wrote...  I’d like to see a few things scripted.  I don’t know if they exist on the vault.  I intended to write them someday, but I doubt I will ever get the time.  I have always wanted to see contagious diseases between players, creatures, from some areas, triggers, etc. I had an outline with magical and natural diseases that didn’t just wear off, and would spread transparently among players.  Usually to be contracted from creatures, or chance by area.  Give NPCs a memory, probably SQL driven with unique IDs for characters with an opportunity for the NPC to react accordingly.  This could be made so that the NPCs would forget a PC after enough time.    Optional PvP set and stored server side by a NPC so it’s not just a one-sided instant toggle on a whim.  If this is associated with an auto-hostile subsystem as well is up in the air.  I'm sure there are other things I would like to see, but these are what I remembered off the top of my head.

PRR hasn't been converted to use a SQL database as near as I know, but would be a starting point for giving NCP's a memory... use it in a module I'm working on. Contagious diseases can be handled by faction area creature who's function is to infect and dispence disease. Using a custom disease.2da and effect scripts, and a bit to spellhooking. Enter the STD that can't be cured or only cured with the intervention of a quest NPC... wicked I know but rewards those that can show a bit of restaint when it comes to that type interaction with other PC/NPC's. Could easily be used to for generic custom diseases, add a target object to faction disease depensing creature fire a ude for  the creature and zap... bad things happen to your hero or the target depending on ude fired.


               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #31 on: November 27, 2010, 03:49:59 am »


               

ehye_khandee wrote...

It is in, tested a bit (not every spell but it seems to work so far). Here it is, the 'impossible to make in nwscript' script to allow your PCs to remove spells on themselves which they cast themselves. 31 lines of lean, clean code. Enjoy.

Its impossible to do the way I wanted. Your solution is very ugly and not user friendly. Thats for your blustering about.

For me, it wouldn't be such problem to use this, I even remember some spells ID. But for general player this wouldn't be much to use. The conversation option is also not ideal. Only right way is to code it into nwn client. But thanks to try.
               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #32 on: November 27, 2010, 07:40:22 am »


               

ShaDoOoW wrote...

ehye_khandee wrote...
It is in, tested a bit (not every spell but it seems to work so far). Here it is, the 'impossible to make in nwscript' script to allow your PCs to remove spells on themselves which they cast themselves. 31 lines of lean, clean code. Enjoy.

Its impossible to do the way I wanted. Your solution is very ugly and not user friendly. Thats for your blustering about.

For me, it wouldn't be such problem to use this, I even remember some spells ID. But for general player this wouldn't be much to use. The conversation option is also not ideal. Only right way is to code it into nwn client. But thanks to try.


Ouch.  I think it's a fine bit of scripting ehye_khandee did, which seems to be what the title of this thread is leaning towards.  If there's no way to be happy about a scripted solution, why ask for something in a "scripting ideas" thread?

Most scripting I know of is of no use to the general player...only to a builder that can use that script to deliver a better playing experience in a module/PW.

And for those wondering, a conversation option can work, as long as there is a call to ClearAllActions(TRUE) right before firing up the conversation (the "TRUE" part drops the PC out of combat so that the conversation can be started).  I just prefer the chat-command version to save on adding multiple scripts to my module.
               
               

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #33 on: November 27, 2010, 07:52:51 am »


               

The Amethyst Dragon wrote...

ShaDoOoW wrote...

ehye_khandee wrote...
It is in, tested a bit (not every spell but it seems to work so far). Here it is, the 'impossible to make in nwscript' script to allow your PCs to remove spells on themselves which they cast themselves. 31 lines of lean, clean code. Enjoy.

Its impossible to do the way I wanted. Your solution is very ugly and not user friendly. Thats for your blustering about.

For me, it wouldn't be such problem to use this, I even remember some spells ID. But for general player this wouldn't be much to use. The conversation option is also not ideal. Only right way is to code it into nwn client. But thanks to try.


Ouch.  I think it's a fine bit of scripting ehye_khandee did, which seems to be what the title of this thread is leaning towards.  If there's no way to be happy about a scripted solution, why ask for something in a "scripting ideas" thread?

Most scripting I know of is of no use to the general player...only to a builder that can use that script to deliver a better playing experience in a module/PW.

And for those wondering, a conversation option can work, as long as there is a call to ClearAllActions(TRUE) right before firing up the conversation (the "TRUE" part drops the PC out of combat so that the conversation can be started).  I just prefer the chat-command version to save on adding multiple scripts to my module.

Ah, he changed the thread name, I noticed just now.

It was "REQUEST FOR NEW IDEAS TO CODE" first.
               
               

               
            

Legacy_dickloraine

  • Newbie
  • *
  • Posts: 5
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #34 on: November 27, 2010, 10:19:36 am »


               @Vhaeraun Baenre:
Doesn't look like the whole script, oLootBag and the constants aren't there. Maybe there is an nclude file? This systems seems to need a object called "TM_Vault" somewhere in your mod and on it some variables, which control the behavior of the script. First check, if the constants and the variables needed are set. If you didn't find them, set values per hand for trying it.

This should have nothing to do with not doing its job, but the while loop in the script seems to be an infinite loop, if the PC dying is naked. That needs to be redone.
               
               

               


                     Modifié par dickloraine, 27 novembre 2010 - 10:23 .
                     
                  


            

Legacy_Avonos the Rogue

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #35 on: November 27, 2010, 07:36:30 pm »


               

CalSailX wrote...

Avonos the Rogue wrote...  I’d like to see a few things scripted.  I don’t know if they exist on the vault.  I intended to write them someday, but I doubt I will ever get the time.  I have always wanted to see contagious diseases between players, creatures, from some areas, triggers, etc. I had an outline with magical and natural diseases that didn’t just wear off, and would spread transparently among players.  Usually to be contracted from creatures, or chance by area.  Give NPCs a memory, probably SQL driven with unique IDs for characters with an opportunity for the NPC to react accordingly.  This could be made so that the NPCs would forget a PC after enough time.    Optional PvP set and stored server side by a NPC so it’s not just a one-sided instant toggle on a whim.  If this is associated with an auto-hostile subsystem as well is up in the air.  I'm sure there are other things I would like to see, but these are what I remembered off the top of my head.

PRR hasn't been converted to use a SQL database as near as I know, but would be a starting point for giving NCP's a memory... use it in a module I'm working on. Contagious diseases can be handled by faction area creature who's function is to infect and dispence disease. Using a custom disease.2da and effect scripts, and a bit to spellhooking. Enter the STD that can't be cured or only cured with the intervention of a quest NPC... wicked I know but rewards those that can show a bit of restaint when it comes to that type interaction with other PC/NPC's. Could easily be used to for generic custom diseases, add a target object to faction disease depensing creature fire a ude for  the creature and zap... bad things happen to your hero or the target depending on ude fired.




The initial work I'd done on sorting out NPC
memory/attitudes was based mostly on the on perception event of the NPC
combined with NWNx2, and MySQL.  Probably each involved NPC remembering
every UID they see, then running it twice for each on perceive event would be
too much.  But I still like the idea, and as there are better coders out
there than I, it's worth a mention.  This
could give rise to reactions and reputation, among other things.



As far as the diseases go, I entirely enjoyed some of the contagious disease
events that occurred in WoW.  Also it could give some fun opportunities to
low chance random encounters or plagues, demon ****houses, whatever. 
Having the custom diseases spread in a variety of ways, and transparently, I thought
it would be a particularly evil way to torment people.

I will certainly put a link to this post into my notes in
the event I ever actually get the time to sit down and script this in the
future.  Thanks for the feedback!
               
               

               


                     Modifié par Avonos the Rogue, 27 novembre 2010 - 07:36 .
                     
                  


            

Legacy_ehye_khandee

  • Hero Member
  • *****
  • Posts: 1415
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #36 on: November 27, 2010, 08:27:48 pm »


               

ShaDoOoW wrote...


ehye_khandee wrote...

It is in, tested a bit (not every spell but it seems to work so far). Here it is, the 'impossible to make in nwscript' script to allow your PCs to remove spells on themselves which they cast themselves. 31 lines of lean, clean code. Enjoy.

Its impossible to do the way I wanted. Your solution is very ugly and not user friendly. Thats for your blustering about.

For me, it wouldn't be such problem to use this, I even remember some spells ID. But for general player this wouldn't be much to use. The conversation option is also not ideal. Only right way is to code it into nwn client. But thanks to try.


I think you underestimate other PLAYERS, they can well use cheat sheets or even memorize a handful of spell numbers to use (their frequent use ones). This is consistent with the rest of guile's posts, er, ShaDoOoW that is. You might well recall advice I gave prior in this thread.

"In many things, the difference between possible and impossible, is in the approach. -GM_ODA"

The approach I choose leads to the realm of possible. You should try it sometime.

':devil:'
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #37 on: November 28, 2010, 12:07:59 am »


               

ehye_khandee wrote...

It is in, tested a bit (not every spell but it seems to work so far). Here it is, the 'impossible to make in nwscript' script to allow your PCs to remove spells on themselves which they cast themselves. 31 lines of lean, clean code. Enjoy.


Here's what we use on HG to do this. It's a lot slicker, but it takes a lot more code, and some plugins to boot. It's done via custom SIMTools (chat) command, and takes a lot more types of input (you can cancel AoEs, weapon props, etc). I'm also including our listing function, which solves the whole issue of pcs having to look up / write their favorites. Code is acaos'.

First, the listing command (players do this by speaking '!effects'):

            } else if (sCText == "effects") {
                DeleteLocalString(oCPC, "FKY_CHAT_LOCAL_CTEXT");

                if (!GetIsObjectValid(oCTarget)) {
                    oCTarget = GetLocalObject(oCPC, "FKY_CHAT_TARGET");

                    if (!GetIsObjectValid(oCTarget)) {
                        FloatingTextStringOnCreature(COLOR_GOLD + REQUIRES_TARGET + COLOR_END, oCPC, FALSE);
                        SetLocalString(oCPC, "FKY_CHAT_COMMAND", OBJECT_TARGET + "!" + sCText);

                        if (!GetIsObjectValid(GetItemPossessedBy(oCPC, "fky_chat_target")))
                            CreateItemOnObject("fky_chat_target", oCPC);
                        return;
                    }
                    else
                        DeleteLocalObject(oCPC, "FKY_CHAT_TARGET");
                }


                int nSpellId, nDur;
                string sSpellName, sSpellId, sSpellsListed = "";
                string sMessage;

                if (GetObjectType(oCTarget) == OBJECT_TYPE_CREATURE) {
                    if (oCTarget == oCPC)
                        sMessage = COLOR_LT_GREEN + "Effects on you:\\n";
                    else
                        sMessage = COLOR_LT_GREEN + "Effects you cast on " + GetName(oCTarget) + ":\\n";

                    effect eEff = GetFirstEffect(oCTarget);

                    while (GetIsEffectValid(eEff)) {
                        if ((nSpellId = GetListableEffectSpellId(oCPC, oCTarget, eEff)) >= 0  &&
                            FindSubString(sSpellsListed, (sSpellId = "#" + IntToString(nSpellId) + " ")) < 0) {

                            if ((sSpellName = SFGetSpellName(nSpellId)) != "") {
                                sMessage += COLOR_WHITE + "    " + sSpellId + COLOR_LT_GREEN + sSpellName;

                                if (GetEffectDurationType(eEff) == DURATION_TYPE_TEMPORARY) {
                                    nDur = FloatToInt(GetEffectDurationRemaining(eEff));

                                    if (nDur > 60)
                                        sMessage += " [" + IntToString(nDur / 60) + "m" + IntToString(nDur % 60) + "s left]";
                                    else
                                        sMessage += " [" + IntToString(nDur) + "s left]";
                                } else
                                    sMessage += " [perm]";

                                object oCreator = GetListableEffectCreator(oCTarget, eEff);

                                if (oCreator != oCPC)
                                    sMessage += " (" + GetName(oCreator) + ")\\n";
                                else
                                    sMessage += "\\n";
                            }

                            sSpellsListed += sSpellId;
                        }

                        eEff = GetNextEffect(oCTarget);
                    }
                } else if (GetObjectType(oCTarget) == OBJECT_TYPE_ITEM && GetItemPossessor(oCTarget) == oCPC) {
                    sMessage = COLOR_LT_GREEN + "Magical effects on " + GetName(oCTarget) + ":\\n";

                    itemproperty ip = GetFirstItemProperty(oCTarget);

                    while (GetIsItemPropertyValid(ip)) {
                        if (GetItemPropertyDurationType(ip) == DURATION_TYPE_TEMPORARY &&
                            (nSpellId = GetItemPropertySpellId(ip)) >= 0               &&
                            FindSubString(sSpellsListed, (sSpellId = "#" + IntToString(nSpellId) + " ")) < 0) {

                            if ((sSpellName = SFGetSpellName(nSpellId)) != "") {
                                sMessage += COLOR_WHITE + "    " + sSpellId + COLOR_LT_GREEN + sSpellName;

                                nDur = FloatToInt(GetItemPropertyDurationRemaining(ip));

                                if (nDur > 60)
                                    sMessage += " [" + IntToString(nDur / 60) + "m" + IntToString(nDur % 60) + "s left]\\n";
                                else
                                    sMessage += " [" + IntToString(nDur) + "s left]\\n";
                            }

                            sSpellsListed += sSpellId;
                        }

                        ip = GetNextItemProperty(oCTarget);
                    }
                } else {
                    FloatingTextStringOnCreature(COLOR_RED +
                        "This command may only be targeted at creatures or items you possess!" + COLOR_END, oCPC, FALSE);
                    return;
                }

                SendChatLogMessage(oCPC, sMessage + COLOR_END, oCPC, 5);
            }


Then, the canceling command. Expected inputs are in the form of !cancel aoe, !cancel poly, and so on - the ! is pre-parsed out:

            if (GetStringLeft(sCText, 7) == "cancel ") {
                string sCancel = GetStringLowerCase(GetStringRight(sCText, GetStringLength(sCText) - 7));
                DeleteLocalString(oCPC, "FKY_CHAT_LOCAL_CTEXT");

                if (sCancel == "aoe") {
                    int nCount = 1;
                    object oPlace;

                    while (GetIsObjectValid(oCTarget = GetNearestObject(OBJECT_TYPE_AREA_OF_EFFECT, oCPC, nCount++))) {
                        if (GetAreaOfEffectCreator(oCTarget) == oCPC && !GetLocalInt(oCTarget, "NoAoEDispel")) {
                            oPlace = GetLocalObject(oCTarget, "AoEPlaceable");

                            ApplyVisualAtLocation(VFX_FNF_DISPEL, GetLocation(oCTarget));
                            DestroyObject(oCTarget);
                            DestroyObject(oPlace);
                        }
                    }

                    return;
                } else if (sCancel == "maze") {
                    int nCount = 1;

                    while (GetIsObjectValid(oCTarget = GetNearestObjectByTag("MazeReturn", oCPC, nCount++))) {
                        if (GetLocalObject(oCTarget, "MazeCaster") == oCPC) {
                            object oVictim = GetLocalObject(oCTarget, "MazeTarget");

                            RemoveEffectsFromSpell(SPELL_DOMINATE_MONSTER, oVictim);

                            ApplyVisualAtLocation(VFX_IMP_DISPEL, GetLocation(oCTarget));
                            SetPlotFlag(oCTarget, FALSE);
                            DestroyObject(oCTarget, 0.1);
                        }
                    }

                    return;
                } else if (sCancel == "poly") {
                    int nHP = 20 + (GetAbilityModifier(ABILITY_CONSTITUTION, oCPC) * GetHitDice(oCPC));
                    if (GetCurrentHitPoints(oCPC) < nHP)
                        FloatingTextStringOnCreature(COLOR_RED + "Unshifting now would kill you!" + COLOR_END, oCPC, FALSE);
                    else if (RemoveEffectsOfType(EFFECT_TYPE_POLYMORPH, oCPC, oCPC) > 0)
                        AssignCommand(oCPC, ClearAllActions());
                    return;
                }

                if (!GetIsObjectValid(oCTarget)) {
                    oCTarget = GetLocalObject(oCPC, "FKY_CHAT_TARGET");

                    if (!GetIsObjectValid(oCTarget)) {
                        FloatingTextStringOnCreature(COLOR_GOLD + REQUIRES_TARGET + COLOR_END, oCPC, FALSE);
                        SetLocalString(oCPC, "FKY_CHAT_COMMAND", OBJECT_TARGET + "!" + sCText);

                        if (!GetIsObjectValid(GetItemPossessedBy(oCPC, "fky_chat_target")))
                            CreateItemOnObject("fky_chat_target", oCPC);
                        return;
                    } else
                        DeleteLocalObject(oCPC, "FKY_CHAT_TARGET");
                }

                if (GetObjectType(oCTarget) != OBJECT_TYPE_CREATURE &&
                    !(GetObjectType(oCTarget) == OBJECT_TYPE_ITEM && GetItemPossessor(oCTarget) == oCPC)) {
                    FloatingTextStringOnCreature(COLOR_RED +
                        "This command may only be targeted at creatures or items you possess!" + COLOR_END, oCPC, FALSE);
                    return;
                }


                int nRemoved = 0;

                if (sCancel != "all") {
                    struct SubString ss;
                    ss.rest = sCancel;

                    while (ss.rest != "") {
                        ss = GetFirstSubString(ss.rest, " ");
                        nRemoved += RemoveMagicalEffects(oCTarget, oCPC, StringToInt(ss.first));
                    }
                } else
                    nRemoved = RemoveMagicalEffects(oCTarget, oCPC);

                if (nRemoved > 0)
                    ApplyVisualToObject(VFX_IMP_DISPEL, oCTarget);
            }


If you're interested in trying to adapt any of that, let me know what subfunctions you want to look at - I don't want to codebomb your thread.

Funky
               
               

               
            

Legacy_Frith5

  • Hero Member
  • *****
  • Posts: 595
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #38 on: November 28, 2010, 04:30:28 pm »


               Nice stuff going on here.

As for suggestions, well . . .

I've always wanted an 'introduction' system:

I'm playing Glokk, a half-orc barbarian.
You're playing Tilla, a halfling cleric.
He's playing Shaelitha, an elven ranger.

I look at Tilla, Her name, though, on mouseover shows only a physical descriptor: 'A female halfling'. Likewise, Shaelitha has the name 'a male elf'. My own shows as 'a male half-orc'.

Now, I overhear Tilla telling Shaelitha her name. So, I type !intro add Tilla, and a targeting cursor comes up. I click Tilla. Now, her name shows up as Tilla to me. I could get the wrong name, if she'd lied to Shaelitha. Or, I could give her a name of my choosing, like 'an annoying halfling', if I never got her name.
Entering a new name would overwrite whatever name I'd previously given.

Now, I'm SURE this can't be done that way, because the same name is seen once set, by everyone, right?

So. It'd still be cool to keep track of who you've met, or whatnot, somehow. Suppose you could chat !known, and get a list of those in your perception range that you've set up on your 'known' list, with names for them you've entered. You could then at least RP that you don't know the displayed name of a PC until you've 'met them' or at least given them a name of your own choosing to keep track.

Boy, it sounds more confusing than it is, I think.

Thoughts?

JFK
               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #39 on: November 28, 2010, 04:49:21 pm »


               This is mostly a poke at VB's question.  It's my onrespawn with a buch of extraneous stuff but also a take equipped item feature, where the higher level you are the more likely you are to lose one or more items.



#include "nw_i0_plot"

#include "x3_inc_horse"

// * Applies an XP and GP penalty chance of item loss

// * to the player respawning based on level ffbj. Help from Guyfensen of this one.

void DestroyMajorItem(object oPC)

{

object oItem;

switch(d12())

{

case 1: oItem = GetItemInSlot(INVENTORY_SLOT_ARMS,oPC); break;

case 2: oItem = GetItemInSlot(INVENTORY_SLOT_CHEST,oPC); break;

case 3: oItem = GetItemInSlot(INVENTORY_SLOT_HEAD,oPC); break;

case 4: oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTHAND,oPC); break;

case 5: oItem = GetItemInSlot(INVENTORY_SLOT_NECK,oPC); break;

case 6: oItem = GetItemInSlot(INVENTORY_SLOT_LEFTHAND,oPC); break;

case 7: oItem = GetItemInSlot(INVENTORY_SLOT_RIGHTRING,oPC); break;

case 8: oItem = GetItemInSlot(INVENTORY_SLOT_LEFTRING,oPC); break;

case 9: oItem = GetItemInSlot(INVENTORY_SLOT_BOOTS,oPC); break;

case 10: oItem = GetItemInSlot(INVENTORY_SLOT_CLOAK,oPC); break;

case 11: oItem = GetItemInSlot(INVENTORY_SLOT_BELT,oPC); break;

case 12: oItem = GetItemInSlot(INVENTORY_SLOT_ARROWS,oPC); break;

}



if ((GetIsObjectValid(oItem))&&(!GetPlotFlag(oItem)))

DestroyObject(oItem);

}

void ApplyPenalty(object oDead)

{

int nXP = GetXP(oDead);

int nPenalty = 100 * GetHitDice(oDead);

int nHD = GetHitDice(oDead);

// * You can not lose a level with this respawning



int nMin = ((nHD * (nHD - 1)) / 2) * 1000;

int nNewXP = nXP - nPenalty;

if (nNewXP < nMin)

nNewXP = nMin;

SetXP(oDead, nNewXP);

DelayCommand(5.0, FloatingTextStringOnCreature("XP Loss", oDead, FALSE));

}

void main()

{

object oPC = GetLastRespawnButtonPresser();

object oHorse = HorseGetHorse(oPC,1);

object oDatabase = GetItemPossessedBy(oPC, "database");

effect eRaise = EffectResurrection();

object oSpawnPoint = GetWaypointByTag ("WP_CCFB");

object oSpawnPoint1 = GetWaypointByTag ("WP_JailCFB");

int iHD = GetHitDice(oPC);



HorseIfNotDefaultAppearanceChange(oPC);

  if (GetCreatureTailType(oPC) == 0)

   {

   SetCreatureTailType(14, oPC);

   }

      if (GetLocalInt(oDatabase, "MountI") > 0)

         {

       HorseDismount(TRUE, TRUE);

       HorseRemoveOwner(oHorse);

       DeleteLocalInt(oDatabase,"MountI");

        //delete and dismount

       DestroyObject(oHorse, 1.0f);

        }



effect eEffect = EffectAbilityDecrease(ABILITY_CONSTITUTION, 4);

DelayCommand (2.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, eRaise, oPC));

DelayCommand(6.0, FloatingTextStringOnCreature("You must rest after your recent exploits", oPC, FALSE));

DelayCommand(8.0, ApplyEffectToObject(DURATION_TYPE_TEMPORARY, eEffect, oPC, 100.0 + (iHD * 4)));



//Apply the heal, raise dead and VFX impact effect

FloatingTextStringOnCreature("Miraculous Recovery",oPC,FALSE);

DeleteLocalInt(oDatabase, "Expired");



if   (GetLocalInt(oDatabase, "Jailed") == 1)

   {

   DelayCommand(2.2, AssignCommand(oPC, JumpToLocation(GetLocation(oSpawnPoint1))));

   DelayCommand(4.0, FloatingTextStringOnCreature("Incarcerated", oPC, FALSE));

   DelayCommand (300.0, (DeleteLocalInt (oDatabase, "Jailed")));

   return;

   }



 if ((oSpawnPoint!=OBJECT_INVALID) && (GetItemPossessedBy(oPC, "CoffinReceipt")!= OBJECT_INVALID))

   {

   DelayCommand(2.2, AssignCommand(oPC, JumpToLocation(GetLocation(oSpawnPoint))));

   DelayCommand (4.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(d6(iHD)),oPC));

   }



//Apply the heal, raise dead and VFX impact effect

else DelayCommand (3.0, ApplyEffectToObject(DURATION_TYPE_INSTANT, EffectHeal(d4(iHD)),oPC));

if (GetLocalInt(oDatabase,"NaggingWound") > 10)

       {

    DelayCommand(25.0 + (iHD * 2),  ExecuteScript("naggingwound",oPC));

       }

if (iHD < 5)

return;

ApplyPenalty(oPC);

//set local based on level of PC

if (iHD < 8)

SetLocalInt(oPC,"TakeItem",1);

else if (iHD < 12)

SetLocalInt(oPC,"TakeItem",2);

else if (iHD < 20)

SetLocalInt(oPC,"TakeItem",3);

else if (iHD < 25)

SetLocalInt(oPC,"TakeItem",4);

else

SetLocalInt(oPC,"TakeItem",5);



  while (GetLocalInt(oPC,"TakeItem")> 0)

   if (d6()> 5)//1 in 6 chance you lose something on each loop

    {

    DestroyMajorItem(oPC);

    SetLocalInt(oPC,"TakeItem", GetLocalInt(oPC,"TakeItem")-1);

    }

}





               
               

               
            

Legacy_ffbj

  • Hero Member
  • *****
  • Posts: 1097
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #40 on: November 28, 2010, 05:14:11 pm »


               Back to the original question.  It seems to me on a practical basis there can be too much scripting going on in some situations.  For instance the not being able to drink with a helm on.  Sure it would be a bit impractical to eat but what about a straw for drinking or an open faced helm?  Anyway there is expendiency and reality in these games.  So there is a spectrum where people go to one extreme or the other but like a bell curve most are in the middle.



One area I think some rudimentary work has been done in in is healing.  Like in AR you don't get your hp's back right away with bandages but after a brief delay, perhaps you could vary that somewhat, or, mercy me, actually have bandages fail, or heal slowly over time like a regeneration spell.  So, for instance, bear jerky gives you 1-2 hp/rd for 10 rds.

Some things I like about AR are the tracking, though I suppose you could have it recognise you rown tracks, though you know it was you that made them, it could say you passed by here or maybe if the PC was wounded when they made the track.  There was a battle here and a bit of blood.  Oh well stuff like that so that a ranger could say: 'Two hobbits lay here.  They were bound, they crawled off...their bounds were cut.'
               
               

               
            

Legacy_Avonos the Rogue

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #41 on: November 28, 2010, 07:34:43 pm »


               

Frith5 wrote...

Nice stuff going on here.

As for suggestions, well . . .

I've always wanted an 'introduction' system:

I'm playing Glokk, a half-orc barbarian.
You're playing Tilla, a halfling cleric.
He's playing Shaelitha, an elven ranger.

I look at Tilla, Her name, though, on mouseover shows only a physical descriptor: 'A female halfling'. Likewise, Shaelitha has the name 'a male elf'. My own shows as 'a male half-orc'.

Now, I overhear Tilla telling Shaelitha her name. So, I type !intro add Tilla, and a targeting cursor comes up. I click Tilla. Now, her name shows up as Tilla to me. I could get the wrong name, if she'd lied to Shaelitha. Or, I could give her a name of my choosing, like 'an annoying halfling', if I never got her name.
Entering a new name would overwrite whatever name I'd previously given.

Now, I'm SURE this can't be done that way, because the same name is seen once set, by everyone, right?

So. It'd still be cool to keep track of who you've met, or whatnot, somehow. Suppose you could chat !known, and get a list of those in your perception range that you've set up on your 'known' list, with names for them you've entered. You could then at least RP that you don't know the displayed name of a PC until you've 'met them' or at least given them a name of your own choosing to keep track.

Boy, it sounds more confusing than it is, I think.

Thoughts?

JFK


I think there was a nwnx plugin that did something like this.
               
               

               
            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #42 on: November 28, 2010, 08:03:44 pm »


               

HipMaestro wrote...

2) I have yet to encounter any underground emerging/burrowing/re-emerging foes like vine crawlers. It would be similar to a teleporting foe but much slower animation with shorter reappearance distances. There could be such a variety of special attacks assigned (like paralyze, poison, daze, called shot type damages, etc.) and strategy to master them, it seems a totally unexplored avenue.


We use a system that shows a burrowing out of the ground creature and reburrowing for things like anhkegs and bullettes and such like.

It has been done on the vault as well with some easy scripts.
               
               

               
            

Legacy_TSMDude

  • Hero Member
  • *****
  • Posts: 1515
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #43 on: November 28, 2010, 08:09:51 pm »


               

Avonos the Rogue wrote...

Frith5 wrote...


I think there was a nwnx plugin that did something like this.



Which one as I would love to use that....
               
               

               
            

Legacy_FunkySwerve

  • Hero Member
  • *****
  • Posts: 2325
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #44 on: November 28, 2010, 10:49:26 pm »


               It's called nwnx_names, by virusman, and yes, it displays different names to different clients:


Funky
               
               

               


                     Modifié par FunkySwerve, 28 novembre 2010 - 10:50 .