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 07-23-2001, 10:38 PM
richard richard is offline
Registered User
Join Date: Jun 2001
Location: Canada, B.C
Posts: 269
richard is on a distinguished road
Send a message via ICQ to richard Send a message via AIM to richard
Talking A nifty little script I finally made (Shaun)

<Shaun>

Hehe, I don't usually try to script anything complex or with more than 5 commands, but, I've made a nifty little script, well, it's actually two, acting together. One is a sign, the other is a door. When you touch the sign, it says
House for sale, 1000 Rupees
Say
Buy House 1
If you have the money, you can buy the house and then it sets a whole ton of things so only the account name of the person who buys the house can lock or unlock the door, and it says what their name was at the time they bought the house on the sign whenever a player touches it. There is a lot of say2 in there. It's also easy to put on other houses nearby, just changing the Buy House 1 to Buy House 2 and server.house1-1 to server.house2-1. I am not going to put up the script, but I would like to thank Tyhm for helping me with how to set server.house, I thought it was like flags, but he showed me how it's done, thank you Tyhm. I know to some of you it's not impressive at all, but those who know as much as me would appreciate it.

</Shaun>
__________________
no sig you have a prob wit that?
Reply With Quote
  #2  
Old 07-23-2001, 11:04 PM
ownerofbabylon ownerofbabylon is offline
Lord Helmut
ownerofbabylon's Avatar
Join Date: Jun 2001
Location: Gainesville FL
Posts: 1,763
ownerofbabylon is on a distinguished road
Send a message via ICQ to ownerofbabylon Send a message via AIM to ownerofbabylon
hmm not bad =D
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #3  
Old 07-23-2001, 11:08 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Hmm?
NPC Code:
//Door
if (playerenters) timereverywhere;
if (created) this.id=0;
if (playertouchsme) {
if (strlen(#s(server.house#v(this.id)owner))>0) {
if (strequals(#a,#s(server.house#v(this.id)owner))||s erver.house#v(this.id)open) {
hidelocal;
dontblocklocal;
timeout=2;
}
else say2 This house is owned by#b#s(server.house#v(this.id)owner);
}
else {
hidelocal;
dontblocklocal;
timeout=2;
}
}
if (playerchats) {
if (strlen(#s(server.house#v(this.id)owner))<=0)
if (strequals(#c,Buy house #v(this.id))) {
if (playerrupees>=1000) {
playerrupees-=1000;
setstring server.house#v(this.id)owner,#a;
}
else say2 You don't have enough money!;
}
}
else if (strequals(#a,#s(server.house#v(this.id)owner))) {
if (strequals(#c,Sell house #v(this.id))) {
playerrupees+=500;
setstring server.house#v(this.id)owner,;
}
if (strequals(#c,Open house #v(this.id))) set server.house#v(this.id)open;
if (strequals(#c,Close house #v(this.id))) unset server.house#v(this.id)open;
}
}


NPC Code:
//Sign
if (created) this.id=0;
if (playertouchsme) {
if (strlen(#s(server.house#v(this.id)owner))<=0) say2 House for sale!#b-1000 Gralats#bSay "buy house #v(this.id)";
else say2 House owned by#b#s(server.house#v(this.id)owner));
}

__________________

Reply With Quote
  #4  
Old 07-24-2001, 06:54 AM
LiquidIce00 LiquidIce00 is offline
RadioActive Monkeeh
LiquidIce00's Avatar
Join Date: Apr 2001
Location: dirty south
Posts: 2,112
LiquidIce00 is on a distinguished road
Send a message via ICQ to LiquidIce00 Send a message via AIM to LiquidIce00 Send a message via Yahoo to LiquidIce00
dam* girl you have too much free time.
__________________
LiquidIce *Owner* (UnholyNation)
-UN Website
http://www.unholynation.com
-UN Forum
http://forums.unholynation.com
-
-the thinker
-

-
onwall2 for nonp2p (i suck at onwall)
Reply With Quote
  #5  
Old 07-24-2001, 08:33 AM
richard richard is offline
Registered User
Join Date: Jun 2001
Location: Canada, B.C
Posts: 269
richard is on a distinguished road
Send a message via ICQ to richard Send a message via AIM to richard
(Shaun)

<Shaun>

Pft, you try to hard, it's at least half the size.

</Shaun>
__________________
no sig you have a prob wit that?
Reply With Quote
  #6  
Old 07-24-2001, 08:38 AM
Knightoffrost Knightoffrost is offline
and Delph Inc.
Knightoffrost's Avatar
Join Date: Jul 2001
Location: Canada
Posts: 1,162
Knightoffrost is on a distinguished road
Send a message via ICQ to Knightoffrost Send a message via AIM to Knightoffrost Send a message via Yahoo to Knightoffrost
Re: A nifty little script I finally made (Shaun)

Quote:
Originally posted by richard
<Shaun>

Hehe, I don't usually try to script anything complex or with more than 5 commands, but, I've made a nifty little script, well, it's actually two, acting together. One is a sign, the other is a door. When you touch the sign, it says
House for sale, 1000 Rupees
Say
Buy House 1
If you have the money, you can buy the house and then it sets a whole ton of things so only the account name of the person who buys the house can lock or unlock the door, and it says what their name was at the time they bought the house on the sign whenever a player touches it. There is a lot of say2 in there. It's also easy to put on other houses nearby, just changing the Buy House 1 to Buy House 2 and server.house1-1 to server.house2-1. I am not going to put up the script, but I would like to thank Tyhm for helping me with how to set server.house, I thought it was like flags, but he showed me how it's done, thank you Tyhm. I know to some of you it's not impressive at all, but those who know as much as me would appreciate it.

</Shaun>
People dont usually care about scripts unless someone wants an opinion,help or they actually post the damn script
__________________
Xerphier Dintch
Featuring
Reply With Quote
  #7  
Old 07-24-2001, 12:14 PM
Hulk Hogan Hulk Hogan is offline
Legendary Red Fish
Hulk Hogan's Avatar
Join Date: Mar 2001
Location: Western PA
Posts: 2,384
Hulk Hogan is on a distinguished road
Send a message via ICQ to Hulk Hogan Send a message via AIM to Hulk Hogan
Re: (Shaun)

Quote:
Originally posted by richard
<Shaun>

Pft, you try to hard, it's at least half the size.

</Shaun>
But is yours bugged?
Maybe hers has no bugs whats so ever adn yours does....
you never know
__________________

The infamous red fish is back.


-aim- |
Andrew5656
-email- | [email protected]
-quote- | "You dont need a weatherman to know which way the wind blows."
"Its funny. The end of time has just begun."-Bob Dylan
Reply With Quote
  #8  
Old 07-25-2001, 09:05 AM
Guest
Posts: n/a
Quote:
Originally posted by grim_squeaker_x
Hmm?
NPC Code:
//Door
if (playerenters) timereverywhere;
if (created) this.id=0;
if (playertouchsme) {
if (strlen(#s(server.house#v(this.id)owner))>0) {
if (strequals(#a,#s(server.house#v(this.id)owner))||s erver.house#v(this.id)open) {
hidelocal;
dontblocklocal;
timeout=2;
}
else say2 This house is owned by#b#s(server.house#v(this.id)owner);
}
else {
hidelocal;
dontblocklocal;
timeout=2;
}
}
if (playerchats) {
if (strlen(#s(server.house#v(this.id)owner))<=0)
if (strequals(#c,Buy house #v(this.id))) {
if (playerrupees>=1000) {
playerrupees-=1000;
setstring server.house#v(this.id)owner,#a;
}
else say2 You don't have enough money!;
}
}
else if (strequals(#a,#s(server.house#v(this.id)owner))) {
if (strequals(#c,Sell house #v(this.id))) {
playerrupees+=500;
setstring server.house#v(this.id)owner,;
}
if (strequals(#c,Open house #v(this.id))) set server.house#v(this.id)open;
if (strequals(#c,Close house #v(this.id))) unset server.house#v(this.id)open;
}
}


NPC Code:
//Sign
if (created) this.id=0;
if (playertouchsme) {
if (strlen(#s(server.house#v(this.id)owner))<=0) say2 House for sale!#b-1000 Gralats#bSay "buy house #v(this.id)";
else say2 House owned by#b#s(server.house#v(this.id)owner));
}


Thats a nice script their but their will be a problem with it online. It will be laggy as hell!
Reply With Quote
  #9  
Old 07-25-2001, 10:19 AM
richard richard is offline
Registered User
Join Date: Jun 2001
Location: Canada, B.C
Posts: 269
richard is on a distinguished road
Send a message via ICQ to richard Send a message via AIM to richard
(Shaun)

<Shaun>

no, mine has no bugs, and I tested it online. My script is smaller, and so it has less lag. You added a ton of stuff not needed. It's like I am saying 1 x 5 = 5, while you're saying 1 + 1 + 1 + 1 + 1 = 5, but, well, it makes sense to me..

</Shaun>
__________________
no sig you have a prob wit that?
Reply With Quote
  #10  
Old 07-25-2001, 10:22 AM
richard richard is offline
Registered User
Join Date: Jun 2001
Location: Canada, B.C
Posts: 269
richard is on a distinguished road
Send a message via ICQ to richard Send a message via AIM to richard
(Shaun)

<Shaun>

and I found an error in your script, set server.whatever doesn't work. You used that in there instead of setstring server.whatever,1;

</Shaun>
__________________
no sig you have a prob wit that?
Reply With Quote
  #11  
Old 07-25-2001, 04:27 PM
grim_squeaker_x grim_squeaker_x is offline
Retired Oldbie
grim_squeaker_x's Avatar
Join Date: Mar 2001
Posts: 3,084
grim_squeaker_x will become famous soon enough
Quote:
Originally posted by IcePick_2001



Thats a nice script their but their will be a problem with it online. It will be laggy as hell!
Nope, it only runs if the player touches the door and/or if the player says something, which in turn results to no lag at all.
__________________

Reply With Quote
  #12  
Old 07-25-2001, 10:45 PM
Shard_IceFire Shard_IceFire is offline
Registered User
Shard_IceFire's Avatar
Join Date: Jun 2001
Location: Eastern Harkoonia
Posts: 861
Shard_IceFire is on a distinguished road
Quote:
Nope, it only runs if the player touches the door and/or if the player says something, which in turn results to no lag at all.
ROFL! She's got ya there!
__________________

-=Shard IceFire=-
Reply With Quote
  #13  
Old 08-01-2001, 11:15 AM
warped warped is offline
Registered User
Join Date: Jul 2001
Location: Virginia
Posts: 1
warped is on a distinguished road
Send a message via AIM to warped
Question >.<

o_O

I got lost from the 3 post down lol.
I am a .. Ok .. scripter.
How is the best way to learn how to
script really well and stuff like some
of you?
Oh yes i graal nick is Gazamune so some
of you may know me =)
__________________
Fancy Pictures and Neato
Comments here
Reply With Quote
  #14  
Old 08-01-2001, 03:47 PM
Slaktmaster Slaktmaster is offline
man with the mastahplan
Slaktmaster's Avatar
Join Date: Apr 2001
Location: Half-way over the river styx
Posts: 4,422
Slaktmaster is an unknown quantity at this point
Send a message via ICQ to Slaktmaster Send a message via AIM to Slaktmaster
Re: >.<

Quote:
Originally posted by warped
o_O

I got lost from the 3 post down lol.
I am a .. Ok .. scripter.
How is the best way to learn how to
script really well and stuff like some
of you?
Oh yes i graal nick is Gazamune so some
of you may know me =)
Uhh...hi?
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:09 PM.


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