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

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #15 on: November 23, 2010, 04:37:31 am »


               What would need to be done to script lightweight javelins?  Just sounds like some model work to me.


And I seem to have seen it done on a PW I frequent... :innocent:

'Posted
               
               

               


                     Modifié par The Amethyst Dragon, 23 novembre 2010 - 04:38 .
                     
                  


            

Legacy_Xenovant

  • Full Member
  • ***
  • Posts: 182
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #16 on: November 24, 2010, 12:24:49 am »


               Hey people! who is that "ElgarL" guy that you are talking about? What is he doing exactly? changing/adding clases, spells,...  changing something visual (cursors, models, textures, the gui,...), everything...?


EDIT: Nevermind, I have found his project and it's totally different of mine. He is changing the only thing that I don't want to change xD
               
               

               


                     Modifié par Xenovant, 24 novembre 2010 - 12:58 .
                     
                  


            

Legacy_Fester Pot

  • Hero Member
  • *****
  • Posts: 1698
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #17 on: November 24, 2010, 01:36:29 pm »


               How about a nice script that will take you from one location to another without having to sit around doing nothing in a wagon for 42 turns?



FP!
               
               

               
            

Legacy_Bubba McThudd

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #18 on: November 24, 2010, 06:33:03 pm »


               I like Worm's wagon, but he should add a magazine rack and a snack machine.
               
               

               
            

Legacy_Avonos the Rogue

  • Jr. Member
  • **
  • Posts: 70
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #19 on: November 24, 2010, 06:55:17 pm »


               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.
               
               

               


                     Modifié par Avonos the Rogue, 24 novembre 2010 - 06:55 .
                     
                  


            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #20 on: November 25, 2010, 01:27:45 am »


               Ok, you want the new ideas to code. I am very skeptic about this, but I give you one. Its one of those, I can't do myself, because its not possible to make through nwscript.



In pnp, you can choose when dispelling yourself, what spell(s) you want to dispell. My idea was to make this even without dispell just via clicking (right or left, doesnt matter) mouse button on the effect in the right top screen. That would allow for example to strip improved invisibility when you want to be saw by friend, or when you want to monsters have better chances to hit you (damage shields).
               
               

               
            

Baaleos

  • Administrator
  • Hero Member
  • *****
  • Posts: 1916
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #21 on: November 25, 2010, 10:46:06 am »


               @ ShaDoOoW - That is do-able via nwscript.



It wouldnt be doable via clicking on the icons for the effects, unless there was a nwnx client plugin released to do it, however, it is definitely do-able via conversation.





eg - Cast Spell - Start Conversation, Script gets all the effects on player, and assigns the name of the effect to a Chat Token  eg   <CUSTOM20041> for effect 1, etc. and onwards.



Then the conversation will appear to be populated with the effects currently in effect on the player,

Player clicks on the effect they want to dispel, from the conversation, and then the system loops through the players effects, stripping only the ones of the type that he had clicked on.



eg

Chat Choices of

True Seeing

Sanctuary

Flame Blade etc



Click on Sanctuary

Loop will loop through all effects, and remove any that equals the effect type of 'EFFECT_TYPE_SANCTUARY'





Its obviously not going to be much use in combat, when conversations are not possible, but its do-able for pnp style roleplaying.
               
               

               
            

Legacy_ehye_khandee

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


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

               
            

Legacy_Shadooow

  • Hero Member
  • *****
  • Posts: 7698
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #23 on: November 26, 2010, 12:03:33 am »


               

Baaleos wrote...

it is definitely do-able via conversation.

Conversation approach is almost useless for me, but could work for some situations like roleplaying. So lets see, if we can see this done ehye_khandee :innocent:
               
               

               


                     Modifié par ShaDoOoW, 26 novembre 2010 - 12:03 .
                     
                  


            

Legacy_Vansen Elamber

  • Jr. Member
  • **
  • Posts: 81
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #24 on: November 26, 2010, 02:56:18 am »


               It always amazes me how much life NWN has as a game. I mean this game was released years ago and you guys and gals are still doing new things with it that the developers probably never even thought was possible. You people amaze me every time I read a thread like this, but most of all I think ALL games should come with a toolset so the game can become so MUCH more then it ever was at release...simply amazing!
               
               

               
            

Legacy_ehye_khandee

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


               

ShaDoOoW wrote...

Baaleos wrote...

it is definitely do-able via conversation.

Conversation approach is almost useless for me, but could work for some situations like roleplaying. So lets see, if we can see this done ehye_khandee :innocent:


Under two hours later, I have 35 lines of nwscript that should do the trick. I'll test it myself tonight and see how it runs, if it works as intended, I'll release it here in this thread tomorrow.

It works off the talk and whisper channels and requires only a short prefix be spoken followed by the number of the spell effect or the SPELL_(constant). Easy enough to keep a short list of your favorite spell numbers next to your desk I figure - doing mouse related selection is out of the question though, text is a FAST interface anyway. '<img'>


Happy holiday.

GM_ODA
               
               

               
            

Legacy_ehye_khandee

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


               UPDATE - my partner in code has agreed that my 35 lines of instruction will do the trick. We are testing this today on ArgentumRegio, subject to successful testing, a release will follow very soon. Stay tuned to this thread for details and PLEASE ADD MORE IDEAS TO OUR COLLECTION. We love these kind of challenges. '<img'>



Be well. Game on.

GM_ODA
               
               

               
            

Legacy_ehye_khandee

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


               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.



It is also on nwvault but not approved there yet so no link supplied at this time.



//alt_chatbit by GM_ODA (elapsed time 1:40) 20101125

//ADD TO CHAT_SCRIPT - PLEASE RETAIN FULL CREDITS,

// hire this scripter!

/* a Thanksgiving 2010 GIFT to the NWN community from

GM_ODA aka ehye_khandee of server ArgentumRegio

66.232.100.90 cep2.1+

aldohral.forumotion.com

My day may lack turkey - but I have a server more magical than gravy!

A simple 31 line routine to allow PCs to remove spell effects from

selves IF they themselves cast the spell.

HAVE A SAFE AND HAPPY HOLIDAY SEASON NWNers!!!

*/

void main()

{

   int TV = GetPCChatVolume();

   int nSpell=0;

   effect eEffectDuJour;

   object oPC = GetPCChatSpeaker(), oMod = GetModule();

   string sSaid = GetPCChatMessage(), sLeft = GetStringLeft(sSaid, 1);

   if(GetLocalInt(oMod, "SILENCEVOICES")) return;

   // START - Possessing Messages

   if(TV>1)return;// whisper and talk channel only

   if(sLeft=="-")// trigger internal functions

   {

     if(FindSubString(sSaid,"dispel",1))// trigger self-spell dispel

     {

       // process spell number

       nSpell = StringToInt(GetStringRight(sSaid,GetStringLength(sSaid)-7));

       if(GetHasSpellEffect(nSpell,oPC))// has spell effect

       {

         eEffectDuJour=GetFirstEffect(oPC);

         while(GetEffectCreator(eEffectDuJour)!=OBJECT_INVALID)

         {

            if(GetEffectSpellId(eEffectDuJour)==nSpell && GetEffectCreator(eEffectDuJour)==oPC)

            {

              RemoveEffect(oPC,eEffectDuJour);

            }

            eEffectDuJour=GetNextEffect(oPC);

         }

       }

     }

   }

}





Be well. Game on.

GM_ODA, genius by trade.

               
               

               
            

Legacy_The Amethyst Dragon

  • Hero Member
  • *****
  • Posts: 2981
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #28 on: November 26, 2010, 11:21:58 pm »


               This is a decent script.  It looks similar to the second half of a little something I've been using in Aenea since the end of May.

You might also want to consider adding a chat-command function to quickly give players a list of the spell IDs for the self-dispelable effects that they currently have active on them.  That way they won't need to keep an out-of-game reference list, especially as they become more experienced with more and more spells available.
               
               

               


                     Modifié par The Amethyst Dragon, 26 novembre 2010 - 11:22 .
                     
                  


            

Legacy_Vhaeraun Baenre

  • Jr. Member
  • **
  • Posts: 71
  • Karma: +0/-0
REQUEST FOR NEW IDEAS TO SCRIPT
« Reply #29 on: November 27, 2010, 02:12:17 am »


               nice thread. I was hoping to get a little help with a script that I thought worked already with my module when I had Sherincall create the base mod for me but it has never worked. I need a script/script system so that when Players die they drop all of their gold into a sack and ALSO have a 20% chance to drop 1 randomly selected equipped item EXCEPT for plot items.

I'm not sure if this 'chance' is even possibly or the randomly selected equipment slot either. Much love if you could figure it out for me '<img'>

this is what the script currently has in it, but again it never seemed to work:

 object oVault = GetLocalObject(GetModule(), "TM_Vault");
    int nDropLevel = GetLocalInt(oVault, "TM_PCDropLevel");
    int bPVP = GetIsPC(GetLastHostileActor(oPC));



    if (d100() < TM_PERCENT_ITEM_DROP_ON_PC_DEATH &&  nDropLevel != DEATH_DROP_NONE)
    {

      if (nDropLevel == DEATH_DROP_PVE && !bPVP)
      {
        int nSlot = Random(NUM_INVENTORY_SLOTS);
        object oItem = GetItemInSlot(nSlot, oPC);
        while (oItem == OBJECT_INVALID)
        {
           nSlot++;
           if (nSlot > NUM_INVENTORY_SLOTS-1) nSlot = 0;
           oItem = GetItemInSlot(nSlot, oPC);
        }
        location lLoc = GetLocation(oLootBag);
        CopyObject(oItem, lLoc, oLootBag);
        DestroyObject(oItem);
      }
    }
    AssignCommand(oLootBag, TakeGoldFromCreature(GetGold(oPC), oPC));
               
               

               


                     Modifié par Vhaeraun Baenre, 27 novembre 2010 - 02:30 .