DysoForums Forum Index DysoForums
 
GalleryGallery   Donate to DysotopiaDonate   Dysotopia.com homepageDyso.com
SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStats   RegisterRegister 
 Login to check your private messagesLogin to check your private messages   LoginLogin 

HELPP!!!!!!

 
Post new topic   Reply to topic    DysoForums Forum Index -> Worldbuilders
View previous topic :: View next topic :: Hide signatures  
Author Message
Stayrm Hellfire
Noob


Joined: 28 Feb 2003
Posts: 5

Level: 1
XP
EXP: 4 / 9 EXP: 4 / 9 EXP: 4 / 9
 44%
PostPosted: Sun Jul 06, 2003 5:59 am    Post subject: HELPP!!!!!! Reply with quote

ok this is the problem i have im trying to make a script that finds out PC lvl and either lets the PC in via teleport to a way point or denies access with SpeakString along the lines of you are too high a lvl for this area but i cant seem to get it right.
also would like to know how to do a main entrance script that gives the PC a certain amount of gold and XP.
any help would be greatly appreciated.

Thanks in advance.
Back to top
View users profile Send private message Visit posters website
Griff Inn
Ice Lolly


Joined: 10 Sep 2002
Posts: 679

Level: 23
XP
EXP: 46 / 65 EXP: 46 / 65 EXP: 46 / 65
 70%
PostPosted: Sun Jul 06, 2003 4:40 pm    Post subject: Reply with quote

ok if the main entrance is some sort of door or gate, lock it and make it plot. Then in the OnFailToOpen script of the door, put:

Code:
object oPC = GetClickingObject();
ActionStartConversation(oPC);


This will bring up the conversation between the door and the PC. Now all you need to do is edit the conversation file of the door. It should look something like:

Root-

1. Ahh, you seem strong enough. Welcome in.
2. Sorry, but you look a little weak. It would be too dangerous to let you in here.

In the "Text Appears When" of 1. you will need to make it so that the text only appears if the PC is at a certain level or above. I'll use level 15 as the example.

Code:
object oPC = GetPCSpeaker();
int nLevel = GetHitDice(oPC);

if (nLevel > 14)
  {
    return TRUE;
  }
   return FALSE;


Now, in the "Actions Taken" of 1. put this:

Code:
object oPC = GetPCSpeaker();
object oWaypoint = GetObjectByTag("TagofWaypointGoesHere");

AssignCommand(oPC, JumpToObject(oWaypoint));


You want a funky visual with that? Instead you could put this:

Code:
object oPC = GetPCSpeaker();
object oWaypoint = GetObjectByTag("TagofWaypointGoesHere");
effect eVis = EffectVisualEffect(VFX_FNF_SUMMON_MONSTER_2);

ApplyEffectToObject(DURATION_TYPE_INSTANT, eVis, oPC);
DelayCommand(2.5, AssignCommand(oPC, JumpToObject(oWaypoint)));

The DelayCommand on the teleport bit is to let the player see the visual effect. I've set it to the summon spider visual, but you can edit it to how you like. Hope That helps.

Griff
_________________
Never underestimate the power of hot tea.
Back to top
View users profile Send private message
Stayrm Hellfire
Noob


Joined: 28 Feb 2003
Posts: 5

Level: 1
XP
EXP: 4 / 9 EXP: 4 / 9 EXP: 4 / 9
 44%
PostPosted: Sun Jul 06, 2003 8:26 pm    Post subject: Reply with quote

DelayCommand(2.5, AssignCommand(oPC, JumpToObject(oWaypoint)));

ok this is the only problem i am having with what you gave me in the last line i keep getting a message that says variable deffined without type not to sure what that means icon_sad.gif otherwise everything is awesome and thanks for your help

*edited for spelling*
Back to top
View users profile Send private message Visit posters website
Griff Inn
Ice Lolly


Joined: 10 Sep 2002
Posts: 679

Level: 23
XP
EXP: 46 / 65 EXP: 46 / 65 EXP: 46 / 65
 70%
PostPosted: Sun Jul 06, 2003 8:38 pm    Post subject: Reply with quote

"Variable defined without type" means that one of the variables (in this case, oPC and oWaypoint) cannot be determined by the script. It's the engine saying "What the hell is oPC/oWaypoint? You haven't told me what they are!!! Define them!" (at least i think that's what it is)

Check that you've got

Code:
object oPC = GetPCSpeaker();
object oWaypoint = GetObjectByTag("WaypointTagGoesHere");


Exactly correct. It's very case sensitive so make sure you haven't put OWaypoint instead of oWaypoint or something like that.

Griff
_________________
Never underestimate the power of hot tea.
Back to top
View users profile Send private message
Stayrm Hellfire
Noob


Joined: 28 Feb 2003
Posts: 5

Level: 1
XP
EXP: 4 / 9 EXP: 4 / 9 EXP: 4 / 9
 44%
PostPosted: Sun Jul 06, 2003 11:08 pm    Post subject: Reply with quote

Cool stuff thank you for the info, i think it has something to do with the effect part that you had added because it works fine without it

thanks again icon_lol.gif
Back to top
View users profile Send private message Visit posters website
Display posts from previous:   
Post new topic   Reply to topic    DysoForums Forum Index -> Worldbuilders All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2.0.2 © 2001, 2002 phpBB Group