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 10-13-2001, 04:33 PM
bdh bdh is offline
Registered User
Join Date: Oct 2001
Location: Everywhere
Posts: 4
bdh is on a distinguished road
Ownership

how do i script something so that you can own it
Reply With Quote
  #2  
Old 10-13-2001, 07:15 PM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: Ownership

Quote:
Originally posted by bdh
how do i script something so that you can own it
like trees on 2001 or bomys?

well they go something like

setstring this.owner,#a;

but see it wouldn't work right on a free server
__________________
Thanks,
-KJL
Reply With Quote
  #3  
Old 10-13-2001, 07: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
if (created) message You own me!;
__________________

Reply With Quote
  #4  
Old 10-13-2001, 07:55 PM
toad1413 toad1413 is offline
toad@graal:~$ ./Oldbie
Join Date: May 2001
Location: Aust.
Posts: 3,819
toad1413 is on a distinguished road
Send a message via ICQ to toad1413
Quote:
Originally posted by grim_squeaker_x
if (created) message You own me!;
if (ownsGrim) {
message I know!;
}
__________________
Creator of the original 'spam' icon. Worst mistake I ever made on these forums.
Reply With Quote
  #5  
Old 10-13-2001, 09:36 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
Re: Re: Ownership

Quote:
Originally posted by KJS


like trees on 2001 or bomys?

well they go something like

setstring this.owner,#a;

but see it wouldn't work right on a free server
so you couldnt have ownership on a free serv?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #6  
Old 10-13-2001, 11:36 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
Re: Re: Re: Ownership

Quote:
Originally posted by ownerofbabylon


so you couldnt have ownership on a free serv?
yes you could it would just work weird ...
Reply With Quote
  #7  
Old 10-14-2001, 12:40 AM
KJS KJS is offline
The one, The only -
KJS's Avatar
Join Date: Apr 2001
Location: USA, Minnesota
Posts: 1,012
KJS is on a distinguished road
Send a message via AIM to KJS
Re: Re: Re: Ownership

Quote:
Originally posted by ownerofbabylon


so you couldnt have ownership on a free serv?
u can but it would be more complex of a code...
__________________
Thanks,
-KJL
Reply With Quote
  #8  
Old 10-14-2001, 02:09 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
I kn0ow, I is making a free server, and the stupid code is like a mile long to get it to work right, it goes like this,:

if (playerchats&&strcontains(#c,Buy House 1)&&playerrupees<150){}
if (playerchats&&strcontains(#c,Buy House 1)&&playerrupees>149){
setstring server.hse1n,#a;
playerrupees-=150;
}
//Door Script
if (playerenters||timeout){
message This house is owned by #v(#s,server.hse1n);
timeout=0.05;
}
//and then you have to add all the stuff about selling, but
// where it is still free. You can't do much with individual strings,
// and I use it as a server string, because I have a list on
// onlinestartlocal that says who owns what. So you don't
// have to go to each house to see who owns them. Regular
// strings tend to only work for one player.

-Rebel95
Reply With Quote
  #9  
Old 10-14-2001, 08:19 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
ahhhhhhh

you dont need #v for strings!!!

and you dont use this. for strings!!!
Reply With Quote
  #10  
Old 10-14-2001, 10:47 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
Lets all hope he is not a nat on his server..
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #11  
Old 10-14-2001, 10:49 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
and another thing its not a mile long man. people..

its just setstring server.houseowner1,#a;

that makes it = but its not the hole script you just need the server. to make it so other players can see who owns it to.

kammy is comming though soon and going to correct me brace yourselves.
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #12  
Old 10-14-2001, 11:42 AM
WeirdmanI9 WeirdmanI9 is offline
Banned
WeirdmanI9's Avatar
Join Date: Mar 2001
Location: Laying Low From The Police
Posts: 1,816
WeirdmanI9 is on a distinguished road
Send a message via AIM to WeirdmanI9 Send a message via Yahoo to WeirdmanI9
How about just having different flags to assign to a certain player for a certain thing to own, and then set the NPC's mode to something else so no one else can get the owner flag?

That'll work on a free server.
Reply With Quote
  #13  
Old 10-14-2001, 11:46 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
Quote:
Originally posted by WeirdmanI9
How about just having different flags to assign to a certain player for a certain thing to own, and then set the NPC's mode to something else so no one else can get the owner flag?

That'll work on a free server.
flags are not very good for scripting they have very little use most of the time .......
Reply With Quote
  #14  
Old 10-14-2001, 01:06 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
how would u make a npc lose ownership but retain percent value if no one hits it for so long an amount of time?
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #15  
Old 10-15-2001, 12:22 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by ownerofbabylon
how would u make a npc lose ownership but retain percent value if no one hits it for so long an amount of time?
what would this "value" you retain be for?
Reply With Quote
  #16  
Old 10-15-2001, 12:49 AM
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
so that the item stays there and is still 78% done or whatever but if no one hits it for say 20 seconds there is no owner and the next person to hit it becomes owner and continues on from 78%
__________________


Warrior of Light

WWW.BABYLONSERVER.COM
Reply With Quote
  #17  
Old 10-15-2001, 01:31 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
start a 20 second timeout everything the player has hit and if that timeout finishes then disable the owner
Reply With Quote
  #18  
Old 10-15-2001, 08:37 AM
Brandon_Bravo Brandon_Bravo is offline
Registered User
Join Date: Jun 2001
Location: Kalamazoo, Michigan USA
Posts: 206
Brandon_Bravo is on a distinguished road
Send a message via ICQ to Brandon_Bravo Send a message via AIM to Brandon_Bravo Send a message via MSN to Brandon_Bravo Send a message via Yahoo to Brandon_Bravo
House Script for Free Servers

PURCHASING SCRIPT:
NPC Code:
// NPC made by Brandon_Bravo
if (playerchats) {
if (strequals(#c,purchase hs1)) {
if (playerrupees>1999) {
playerrupees-=2000;
setstring server.hs1owner,#a;
}
}
}


DOOR SCRIPT:
NPC Code:
// NPC made by Brandon_Bravo
if (playertouchsme) {
if (strcontains(server.hs1keys,#a_)) || strequals(#s(server.hs1owner),#a)) {
hide;
sleep 3;
show;
}
else {
message Sorry you need a key, this is the house from #s(server.hs1owner)!;
}
}


KEY SCRIPT:
NPC Code:
// NPC made by Brandon_Bravo
if (playerchats) {
if (startswith(givekey,#c)) {
if (strequals(#s(server.hs1owner),#a)) {
tokenize #c;
setstring this.givekey,#t(1);
setstring server.hs1keys,#s(server.hs1keys) "#s(this.givekey);
}
}
}



UPDATE: SCRIPT TO TAKE KEYS AWAY:
NPC Code:
// NPC made by Brandon_Bravo
if (playerchats) {
if (startswith(removekey,#c)) {
tokenize #c;
setstring this.exclude,#t(1);
tokenize #s(server.hs1keys);
setstring server.hs1keys,;
for (i=0;i<tokenscount-1;i++) {
if (!strequals(#t(i),#s(this.exclude))) {
setstring server.hs1keys,#s(server.hs1keys) "#t(i)";
}
}
}
}

__________________
Brandon M.

Last edited by Brandon_Bravo; 10-15-2001 at 10:39 AM..
Reply With Quote
  #19  
Old 10-15-2001, 09:49 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
hey brandon is that not what i said i just dint add the hole thing.. and to get it to retain.. percent.. just do

setstring server.rock1percent,whatever;
and then just do a timeout thing for how ever long and just keep incrementing the server.rock1percent.. then change ownership..
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #20  
Old 10-15-2001, 10:13 AM
Brandon_Bravo Brandon_Bravo is offline
Registered User
Join Date: Jun 2001
Location: Kalamazoo, Michigan USA
Posts: 206
Brandon_Bravo is on a distinguished road
Send a message via ICQ to Brandon_Bravo Send a message via AIM to Brandon_Bravo Send a message via MSN to Brandon_Bravo Send a message via Yahoo to Brandon_Bravo
I know, it just made sense to post the whole thing :-P
__________________
Brandon M.
Reply With Quote
  #21  
Old 10-15-2001, 10:30 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
Make a timeout. After the timeout has been reached, set the owner to no owner. But, if you activate the npc with a triggeraction or something, reset the timeout.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #22  
Old 10-15-2001, 07:22 PM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by BocoC
Make a timeout. After the timeout has been reached, set the owner to no owner. But, if you activate the npc with a triggeraction or something, reset the timeout.
did you see my last post??
Reply With Quote
  #23  
Old 10-16-2001, 05:13 PM
bdh bdh is offline
Registered User
Join Date: Oct 2001
Location: Everywhere
Posts: 4
bdh is on a distinguished road
hey i have the G2K1 house script but i want it for non p2p
Attached Files
File Type: txt housecontrols3.txt (3.9 KB, 125 views)
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 06:35 PM.


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