Author Topic: I could use the help of a scripter  (Read 316 times)

Legacy_Syii_Gardan

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
I could use the help of a scripter
« on: June 12, 2012, 10:41:44 pm »


               I am looking for an OnEnter script


The Script would be put OnEnter of an area. When a PC zoned into the area the script would check to see if there were any PC's in the area and if not then it would change the module time to 4 hours later. If there was a PC in the area already then the script would not change the module time. This way the script would only trigger for the first PC and not the other 3 or 4 who followed.

The idea behind this script would be for traveling from one town to another. I would only add this to my out door areas so every 3 areas or so the PC's would need to make camp.

I tried using a script tool but I could not do what I wanted with it.

I would be greatful for any and all help.

Thanks a lot for your time and help.
               
               

               
            

Legacy_Lightfoot8

  • Hero Member
  • *****
  • Posts: 4797
  • Karma: +0/-0
I could use the help of a scripter
« Reply #1 on: June 13, 2012, 12:22:17 am »


               I am going to refrain from listing all the possiable pit falls of doing this and assune that your request matches the situation for the game you are building.   So here is the script the way you requested it.


void main()
{
    object oPC= GetEnteringObject();
    if (GetIsDM(oPC)) return;

    object oOther = GetFirstPC();
    while ( GetIsObjectValid(oOther))
    {
       if ( oOther != oPC &&
            GetArea(oOther) == OBJECT_SELF &&
            !GetIsDM(oOther)
            ) return;
       oOther = GetNextPC();
    }
    SetTime(GetTimeHour()+4,GetTimeMinute(),GetTimeSecond(),0);
}
               
               

               


                     Modifié par Lightfoot8, 12 juin 2012 - 11:23 .
                     
                  


            

Legacy_Syii_Gardan

  • Newbie
  • *
  • Posts: 14
  • Karma: +0/-0
I could use the help of a scripter
« Reply #2 on: June 13, 2012, 01:28:48 am »


               Ya I'm not making a PW or Module. I'm making a bunch of small modules and linking them together to form a game world. I will be using this game world to DM a small group of friends. I want my game world to have more of a PnP feel to it. The goal is to try and give my friends/players the RP feel that we used to have back in the days when we played PnP AD&D 2nd Ed. This script combiend with HCR and a few others are just a few things I am using to try and it all happen.

Any way thanks a lot Lightfoot8 I just wish I could wright scripts like you and others can. But I guess we all can't be good at everything '<img'>

Thanks again for the help.
               
               

               
            

Legacy_ruadhri10

  • Jr. Member
  • **
  • Posts: 52
  • Karma: +0/-0
I could use the help of a scripter
« Reply #3 on: June 14, 2012, 03:49:30 am »


               Hey Syii_Gardan, I'm doing something similiar at the moment.

I needed a PnP overland travel system, and found/installed OTRES (http://nwvault.ign.c....Detail&id=1142) . It does what the script above does, but has many more features, which you may or may not need later. I thought you might want to look at it.

Cheers!