Aller au contenu

Photo

I could use the help of a scripter


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Syii_Gardan

Syii_Gardan
  • Members
  • 8 messages
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.

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
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 .


#3
Syii_Gardan

Syii_Gardan
  • Members
  • 8 messages
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 :)

Thanks again for the help.

#4
ruadhri10

ruadhri10
  • Members
  • 28 messages
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!