Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-04-2001, 05:16 AM
Xythar Xythar is offline
Banned
Xythar's Avatar
Join Date: Aug 2001
Location: NOT (quite) HERE
Posts: 1,241
Xythar is on a distinguished road
Send a message via AIM to Xythar Send a message via Yahoo to Xythar
Personalized rooms

I started toying around with the idea of giving the player the ability to reaarange their room this morning, and I've been planning and messing around with the code for the past ten minutes or so. I've found that there's a few ways I could make it, and I'd like some advice as to which to do. Keep in mind that this is my first scripting project --- I've never made a real NPC by myself in my life.

The most sophisticated and ideal way would be how I was planning on doing it in the first place --- chat commands. For instance, if the player says "move itemname left," said item moves left, or the specified direction (up, down, left, right). Unfortunately, this would require the creation of onwall detection, which I don't think I'm quite ready for yet. Also, if it was used in a playerhouse setting it would take a bit more scripting to keep all the pieces of furniture from moving at once. I've thought of ways to solve this, all of them rather sloppy.

Another, simpler way would be to hide and show the images. For instance, should the player say "itemname left corner" the item would move to that corner. There's very little chance I'll use this
system, as it would severely limit the players options, and would allow the player to stack the furniture on top of each other. Yech.

The easiest way, obviously, is to use canbepulled and canbepushed, so that the player has to drag the items around the room. This would solve all of the problems previously mentioned, but it seems a little cheap to me; like I'm taking the easy way out. I'd add the ability to remove and add items using hide and show, but I still don't like that it would take all of five minutes to script. I may not be at a very advanced level (or even an intermediate level for that matter) but I'd like to at least give myself a bit of a challenge.

Any suggestions? Comments? Methods I didn't think of? Anything would be appreciated. Also, can someone tell me why it's better to use playerchats with strequals instead of just playersays? Kaimetsu only flamed me when I said I used playersays, without explaining why I shouldn't.
Reply With Quote
  #2  
Old 09-04-2001, 06:23 AM
SSj_Link SSj_Link is offline
Registered User
Join Date: Jul 2001
Location: i r live in texas
Posts: 244
SSj_Link is on a distinguished road
Send a message via ICQ to SSj_Link Send a message via AIM to SSj_Link
Talking Hmmm Maybe....

how about,

if the image is the blue couch

if (playerchats&&strequals(#c,Right)) {
setimg bluecoughright.gif;
}
if (playerchats&&strequals(#c,Left)) {
setimg bluecoughleft.gif;
}
if (playerchats&&strequals(#c,Down)) {
setimg bluecouch.gif;
}

and so on
__________________
-People with my Password: Me (Boozy), Ghostface Killa, bgraven, Freaky Carnie, Dark Warlock, and SoulReaver.
-So they can all post.-

-I hate my account name -

~Old Names: Link, Darklink, Neo, then Boozy when Bravo died. (So some people will recognize me)~

AIM: boozyneo
ICQ: 116030736
Msn: [email protected]
Email: [email protected]


-DANCE SPAM DANCE!- Dark Warlock
Reply With Quote
  #3  
Old 09-04-2001, 06:40 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Stefan does'nt want complex NPCs in houses and he's removing those personal rooms so i've heard
Reply With Quote
  #4  
Old 09-04-2001, 07:05 AM
SSj_Link SSj_Link is offline
Registered User
Join Date: Jul 2001
Location: i r live in texas
Posts: 244
SSj_Link is on a distinguished road
Send a message via ICQ to SSj_Link Send a message via AIM to SSj_Link
x.x

Hmmm

if there is any scripting its probly me FrEaKy CaRnIe ( Known as Da7footdude)
__________________
-People with my Password: Me (Boozy), Ghostface Killa, bgraven, Freaky Carnie, Dark Warlock, and SoulReaver.
-So they can all post.-

-I hate my account name -

~Old Names: Link, Darklink, Neo, then Boozy when Bravo died. (So some people will recognize me)~

AIM: boozyneo
ICQ: 116030736
Msn: [email protected]
Email: [email protected]


-DANCE SPAM DANCE!- Dark Warlock
Reply With Quote
  #5  
Old 09-04-2001, 08:34 AM
Xythar Xythar is offline
Banned
Xythar's Avatar
Join Date: Aug 2001
Location: NOT (quite) HERE
Posts: 1,241
Xythar is on a distinguished road
Send a message via AIM to Xythar Send a message via Yahoo to Xythar
Re: Hmmm Maybe....

Quote:
Originally posted by SSj_Link
how about,

if the image is the blue couch

if (playerchats&&strequals(#c,Right)) {
setimg bluecoughright.gif;
}
if (playerchats&&strequals(#c,Left)) {
setimg bluecoughleft.gif;
}
if (playerchats&&strequals(#c,Down)) {
setimg bluecouch.gif;
}

and so on
That would just change the direction it's facing. What I'm scripting, it moves the actual furniture around the room.

And Merlin, that silly. What's wrong with NPC's?
Reply With Quote
  #6  
Old 09-04-2001, 09:46 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Re: Re: Hmmm Maybe....

Quote:
Originally posted by Xythar


That would just change the direction it's facing. What I'm scripting, it moves the actual furniture around the room.

And Merlin, that silly. What's wrong with NPC's?
Something about when the owners are transfered of the house they need to be changed so he wants to be default again
Reply With Quote
  #7  
Old 09-04-2001, 11:45 AM
fuzie fuzie is offline
Registered User
Join Date: Jul 2001
Location: +900
Posts: 303
fuzie is on a distinguished road
Send a message via AIM to fuzie Send a message via Yahoo to fuzie
why not just make it so that it moves 2x,2y when u say up down left right????? and use a onwall script to keep the player from putting it on hte wall like make it go back to the middle of hte room if onwall?????i aint to abd at scripting but tell me if this would werk!!
__________________
This is my extra account. My other account name is "royce".


-Mr. Chik (Criminals)

Chik=French=Hip
Reply With Quote
  #8  
Old 09-04-2001, 12:48 PM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
No merlin, stefan meant he doesn't want personal npcs that work only according to a certain username.. If somehow you could change the username through the npc then it would be fine.. like "this.owner" or something.. I don't know the value or string for the owner of a house, but it would need to be similar to that. Not something like:

if (playerchats&&strequals(#c,blah)&&strequals(#a,acc ountname){

He doesn't want certain account names.. it would have to be a guild, or a changeable string.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #9  
Old 09-04-2001, 12:50 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
just

why dont you make it where you use the pics1.png ....

if (playerchats && strequals(#c,object bed)) {
setimgpart pics1.png ...... and so on ...

then have it where the player can edit the direction and stuff too ...
Reply With Quote
  #10  
Old 09-04-2001, 05:46 PM
CyanideSR71 CyanideSR71 is offline
Registered User
CyanideSR71's Avatar
Join Date: Jun 2001
Location: Canada
Posts: 460
CyanideSR71 is on a distinguished road
Just to tell ya, that idea was done already, it was a project Maxim and I made up where you could buy a house, and then have to buy the furnishings and stuff.
The railroad track builder format is a good way of doing it.
*reads Kai's post* Aww... crap, someone else did it too =(.
__________________
Cyanide SR71
Former Shadow Dragon
Co-Owner of what was Murasamune
Reply With Quote
  #11  
Old 09-04-2001, 06:40 PM
Yakuna2001 Yakuna2001 is offline
Registered User
Yakuna2001's Avatar
Join Date: Jun 2001
Location: England U.K
Posts: 940
Yakuna2001 is on a distinguished road
Send a message via AIM to Yakuna2001
Quote:
Originally posted by Kaimetsu
And I did it better than j00.
naturally. arent like you and kyle the best on the boards rightnow?
__________________

-Manager of the UnholyNation PlayerWorld-
UnholyNation Forums
Reply With Quote
  #12  
Old 09-04-2001, 06:43 PM
Yakuna2001 Yakuna2001 is offline
Registered User
Yakuna2001's Avatar
Join Date: Jun 2001
Location: England U.K
Posts: 940
Yakuna2001 is on a distinguished road
Send a message via AIM to Yakuna2001
Quote:
Originally posted by Kaimetsu


We're probably the top two, yeah.
heh i should hold a scripters competition see who is the best
__________________

-Manager of the UnholyNation PlayerWorld-
UnholyNation Forums
Reply With Quote
  #13  
Old 09-04-2001, 06:48 PM
Yakuna2001 Yakuna2001 is offline
Registered User
Yakuna2001's Avatar
Join Date: Jun 2001
Location: England U.K
Posts: 940
Yakuna2001 is on a distinguished road
Send a message via AIM to Yakuna2001
Quote:
Originally posted by Kaimetsu


Between me 'n' Kyle? I dunno, we both have skills that the other doesn't. He can beat me in some aspects and I can beat him in others. But I don't think either of us cares much - we have a kind of mutual respect.
its good to be like that, instead of always trying to say each one is better than each other.
but, i got to admit, you two are very good from what ivew seen, i presume you do other scripting to? and i thought lady m was good too, she always seems to have an answer for everyones script problems
__________________

-Manager of the UnholyNation PlayerWorld-
UnholyNation Forums
Reply With Quote
  #14  
Old 09-04-2001, 07:03 PM
Yakuna2001 Yakuna2001 is offline
Registered User
Yakuna2001's Avatar
Join Date: Jun 2001
Location: England U.K
Posts: 940
Yakuna2001 is on a distinguished road
Send a message via AIM to Yakuna2001
Quote:
Originally posted by Kaimetsu


Other scripting? Well, I program stuff outside of Graal. Working on my own game, in fact.

And yeah, Lady Midnight is pretty good. It strikes me that she's the only female scripter I've ever met. Scary.
your own game eh? nice.... well, if i can ever help with hosting it, let meknow, i have access to a server maching, and i can work with redhat, and other linux good i think
__________________

-Manager of the UnholyNation PlayerWorld-
UnholyNation Forums
Reply With Quote
  #15  
Old 09-04-2001, 08:41 PM
Xythar Xythar is offline
Banned
Xythar's Avatar
Join Date: Aug 2001
Location: NOT (quite) HERE
Posts: 1,241
Xythar is on a distinguished road
Send a message via AIM to Xythar Send a message via Yahoo to Xythar
Aargh, already been done? Twice? Ah well, great minds think alike.

Although, something like the edited railroad builder would be very nice, but require some pretty advanced scripting. Also, I wasn't aware that you could use pics1.png in setimg --- thanks for the tip.
Reply With Quote
  #16  
Old 09-05-2001, 12:49 AM
Merlin Merlin is offline
Banned
Merlin's Avatar
Join Date: Jul 2001
Location: Merlin - U S A Malak - United Kingdom
Posts: 2,543
Merlin is on a distinguished road
Send a message via ICQ to Merlin Send a message via AIM to Merlin
Oh, then you can just use level.strings for the master key
Reply With Quote
  #17  
Old 09-05-2001, 02:54 AM
fuzie fuzie is offline
Registered User
Join Date: Jul 2001
Location: +900
Posts: 303
fuzie is on a distinguished road
Send a message via AIM to fuzie Send a message via Yahoo to fuzie
i got a great idea how you can do it and i've got it almost done..........make a hotel and sell keys per room and if the player has that key then they cna move the furniture around.......i am finishing it up right now!!!!
__________________
This is my extra account. My other account name is "royce".


-Mr. Chik (Criminals)

Chik=French=Hip
Reply With Quote
  #18  
Old 09-05-2001, 04:38 AM
Enigma_GP6 Enigma_GP6 is offline
Banned
Join Date: Jul 2001
Location: Who?
Posts: 261
Enigma_GP6 is on a distinguished road
Send a message via ICQ to Enigma_GP6 Send a message via AIM to Enigma_GP6
If fizie were a cow, I swear I'd never eat another hamburger again....

-Rebel95
Reply With Quote
  #19  
Old 09-05-2001, 07:35 AM
fuzie fuzie is offline
Registered User
Join Date: Jul 2001
Location: +900
Posts: 303
fuzie is on a distinguished road
Send a message via AIM to fuzie Send a message via Yahoo to fuzie
**middle fingers slowly goes up facing Engima_GP6,Rebel95,

i'd like you to script it smart @$$$$!!!!

sry i couldnt finish the room today but tomorrow i will and put it up on the forums okie? kk L8 ALL

'~BrIaN~'
__________________
This is my extra account. My other account name is "royce".


-Mr. Chik (Criminals)

Chik=French=Hip
Reply With Quote
  #20  
Old 09-05-2001, 07:40 AM
konidias konidias is offline
Old Bee
konidias's Avatar
Join Date: Jul 2001
Location: Orlando, FL
Posts: 7,222
konidias will become famous soon enough
Send a message via AIM to konidias
Don't you just love newbies?

This script would be nice.. anyone mind sending it to me? It would be cool to have on the 2001 server for player rooms.. Of course if it doesn't cause major lag or anything.
__________________

Put this image in your sig if you support Bomy Island! (g2k1 revision)
play bomberman while you wait!


Reply With Quote
  #21  
Old 09-05-2001, 07:51 AM
fuzie fuzie is offline
Registered User
Join Date: Jul 2001
Location: +900
Posts: 303
fuzie is on a distinguished road
Send a message via AIM to fuzie Send a message via Yahoo to fuzie
hahaha aint laggy at all i just gotta finish a few scripts with the light turning on and off
__________________
This is my extra account. My other account name is "royce".


-Mr. Chik (Criminals)

Chik=French=Hip
Reply With Quote
  #22  
Old 09-05-2001, 11:12 AM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
wha?

wha?
Reply With Quote
  #23  
Old 09-05-2001, 10:32 PM
Xythar Xythar is offline
Banned
Xythar's Avatar
Join Date: Aug 2001
Location: NOT (quite) HERE
Posts: 1,241
Xythar is on a distinguished road
Send a message via AIM to Xythar Send a message via Yahoo to Xythar
Quote:
Originally posted by Kaimetsu
Mine wasn't laggy at all, and it worked better than people just pushing furniture around or shouting out commands. I should dig it out sometime.
I'm offended, Kaimetsu. I didn't bother finishing it anyway, I'm just messing around and trying to teach myself onwall. So dull.
Reply With Quote
  #24  
Old 09-06-2001, 03:05 AM
Yakuna2001 Yakuna2001 is offline
Registered User
Yakuna2001's Avatar
Join Date: Jun 2001
Location: England U.K
Posts: 940
Yakuna2001 is on a distinguished road
Send a message via AIM to Yakuna2001
Quote:
Originally posted by Kaimetsu
Mine wasn't laggy at all, and it worked better than people just pushing furniture around or shouting out commands. I should dig it out sometime.
yeah, dig it out, and give it to me....
__________________

-Manager of the UnholyNation PlayerWorld-
UnholyNation Forums
Reply With Quote
  #25  
Old 09-06-2001, 04:53 PM
nyghtGT nyghtGT is offline
Banned
nyghtGT's Avatar
Join Date: Jun 2001
Posts: 3,993
nyghtGT is on a distinguished road
Send a message via AIM to nyghtGT
Reply With Quote
  #26  
Old 09-06-2001, 06:11 PM
Yakuna2001 Yakuna2001 is offline
Registered User
Yakuna2001's Avatar
Join Date: Jun 2001
Location: England U.K
Posts: 940
Yakuna2001 is on a distinguished road
Send a message via AIM to Yakuna2001
Quote:
Originally posted by Kaimetsu


I might give it to Stefan.
fine.......
__________________

-Manager of the UnholyNation PlayerWorld-
UnholyNation Forums
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:04 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.