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 12-04-2001, 07:03 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
Ownership

Just for some of you begining people wanting to make a playerhouse system for your server you can use the info. below to help you out a bit ...
NPC Code:

NPC Code:

// NPC made by Nyght GT
// El-Cheapo House System
// 12/3/01
// Makes you the owner
if (created) {
setstring this.owners,#a;
}
// If your an owner you can add keys by saying 'addkey
// accountname'
if (playerchats && startswith(addkey,#c)) {
if (strcontains(#a,#s(this.owners))) {
tokenize #c;
setstring this.owners,#s(this.owners) #t(1);
}
}
// If your an owner you can delete keys by saying 'delkey
// accountname'
if (playerchats && startswith(delkey,#c)) {
if (strcontains(#a,#s(this.owners))) {
tokenize #c;
if (indexof(#t(1),#s(ths.owners))>-1) {
setstring this.owners,#e(0,(indexof(#t(1),#s(this.owners))), #s(this.owners))#e(indexof(#t(1),#s(this.owners))+ strlen(#t(1))+1,-1,#s(this.owners));
}
}
}
// If your an owner it lets you in
if (playertouchsme && stcontains(#a,#s(this.owners))) {
hidelocal;
timeout=1.35;
}
if (timeout) {
show;
}




This should work but, I am not sure but it is just something I got bored and wrote on here about....
Reply With Quote
  #2  
Old 12-04-2001, 07:04 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
sorry that post was so wide ...
Reply With Quote
  #3  
Old 12-04-2001, 07:29 AM
Andor_NPC-Admin1 Andor_NPC-Admin1 is offline
Registered User
Join Date: Nov 2001
Posts: 69
Andor_NPC-Admin1 is on a distinguished road
its for the NPC server b/c it uses database NPCs
to make it 4 a free pw, u need 2 use server.strings =P
Reply With Quote
  #4  
Old 12-04-2001, 11:18 AM
Brad_Elven Brad_Elven is offline
Registered User
Join Date: Jul 2001
Posts: 0
Brad_Elven is on a distinguished road
Send a message via AIM to Brad_Elven
nice nyght

IM me on AIM i gots u a small job
Reply With Quote
  #5  
Old 12-04-2001, 11:26 AM
JeffTL JeffTL is offline
Registered User
Join Date: Sep 2001
Posts: 374
JeffTL is on a distinguished road
Since Kaimetsu's acct wore out, I guess I'll have to play efficiency cop...Use a string array to store lists of names.
__________________
Reply With Quote
  #6  
Old 12-04-2001, 12:15 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
Quote:
Originally posted by Andor_NPC-Admin1
its for the NPC server b/c it uses database NPCs
to make it 4 a free pw, u need 2 use server.strings =P
NPC Server Ownz ...
Reply With Quote
  #7  
Old 12-11-2001, 09:33 PM
aesquivel aesquivel is offline
Registered User
Join Date: Sep 2001
Location: Whitewright
Posts: 346
aesquivel is on a distinguished road
Send a message via AIM to aesquivel
well how could i make an npc have owner ship where i have some thing like the bomys <----EXAMLPLE
__________________
Reply With Quote
  #8  
Old 12-11-2001, 09:52 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Quote:
Originally posted by aesquivel
well how could i make an npc have owner ship where i have some thing like the bomys <----EXAMLPLE
u are a *****
__________________
Aim: Mmm Kumada

Reply With Quote
  #9  
Old 12-11-2001, 09:54 PM
aesquivel aesquivel is offline
Registered User
Join Date: Sep 2001
Location: Whitewright
Posts: 346
aesquivel is on a distinguished road
Send a message via AIM to aesquivel
Quote:
Originally posted by Kumada

u are a *****

wtf are u talking about!!!!
__________________
Reply With Quote
  #10  
Old 12-11-2001, 09:55 PM
Kumada Kumada is offline
Ded
Kumada's Avatar
Join Date: Nov 2001
Location: Usa
Posts: 1,088
Kumada is on a distinguished road
Quote:
Originally posted by aesquivel



wtf are u talking about!!!!
Stop spamming or you will probably get banned once modCP is fixed
__________________
Aim: Mmm Kumada

Reply With Quote
  #11  
Old 12-11-2001, 10:20 PM
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
I like String arrays......

The script uses database npc's? No it doesn't. In fact, the NPC would work fine on free server.
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #12  
Old 12-11-2001, 10:26 PM
van_01 van_01 is offline
Registered User
Join Date: Sep 2001
Location: USA
Posts: 164
van_01 is on a distinguished road
Send a message via AIM to van_01
nice nyght
__________________
Renegade -Staff Admin-
Reply With Quote
  #13  
Old 12-12-2001, 04:14 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 aesquivel
well how could i make an npc have owner ship where i have some thing like the bomys <----EXAMLPLE
the bomy strings for ownership are this.owner(s) and the bomys are added through NPC Control ...
Reply With Quote
  #14  
Old 12-12-2001, 04:41 AM
cell424 cell424 is offline
Registered User
Join Date: Mar 2001
Location: USA/PA
Posts: 184
cell424 is on a distinguished road
Send a message via AIM to cell424
...

I made my own Script for player house's I used server. strings, 3 if you have the door, 1 room, and your self. It works very well that way.
__________________
Trunks
Reply With Quote
  #15  
Old 12-12-2001, 05:30 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
Why wont that work on a free server? Im pretty sure it will, and you cant put strings in a this. variables!!
Reply With Quote
  #16  
Old 12-12-2001, 09:36 AM
cell424 cell424 is offline
Registered User
Join Date: Mar 2001
Location: USA/PA
Posts: 184
cell424 is on a distinguished road
Send a message via AIM to cell424
..

It will work, but most people would like to have a grasp of power through out it, if you wanted to edit it, you would have to go in the house. With the server. strings all you got to do is install a script to the Admin House or a House Management Site, like I did and then you will be bale to edit it any where in your world. Most people don't think when they are scripting and just do it the easy way, but the easy way isnt always the best. You will run into to loop holes and would have to start all over again.

-Trunks
__________________
Trunks
Reply With Quote
  #17  
Old 12-12-2001, 09:45 AM
Faheria_GP2 Faheria_GP2 is offline
Banned
Faheria_GP2's Avatar
Join Date: Oct 2001
Posts: 1,177
Faheria_GP2 is on a distinguished road
Quote:
Originally posted by BocoC

the NPC would work fine on free server.
setstring this.owners,#a;

HELLO!
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:29 AM.


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