Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Ownership (https://forums.graalonline.com/forums/showthread.php?t=18255)

nyghtGT 12-04-2001 07:03 AM

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....

nyghtGT 12-04-2001 07:04 AM

sorry that post was so wide ...

Andor_NPC-Admin1 12-04-2001 07:29 AM

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

Brad_Elven 12-04-2001 11:18 AM

nice nyght :)

IM me on AIM i gots u a small job

JeffTL 12-04-2001 11:26 AM

Since Kaimetsu's acct wore out, I guess I'll have to play efficiency cop...Use a string array to store lists of names.

nyghtGT 12-04-2001 12:15 PM

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 ...

aesquivel 12-11-2001 09:33 PM

well how could i make an npc have owner ship where i have some thing like the bomys <----EXAMLPLE

Kumada 12-11-2001 09:52 PM

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 *****

aesquivel 12-11-2001 09:54 PM

Quote:

Originally posted by Kumada

u are a *****


wtf are u talking about!!!!

Kumada 12-11-2001 09:55 PM

Quote:

Originally posted by aesquivel



wtf are u talking about!!!!

Stop spamming or you will probably get banned once modCP is fixed

BocoC 12-11-2001 10:20 PM

I like String arrays......

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

van_01 12-11-2001 10:26 PM

nice nyght

nyghtGT 12-12-2001 04:14 AM

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 ...

cell424 12-12-2001 04:41 AM

...
 
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.

btedji 12-12-2001 05:30 AM

Why wont that work on a free server? Im pretty sure it will, and you cant put strings in a this. variables!!

cell424 12-12-2001 09:36 AM

..
 
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

Faheria_GP2 12-12-2001 09:45 AM

Quote:

Originally posted by BocoC

the NPC would work fine on free server.

setstring this.owners,#a;

HELLO!


All times are GMT +2. The time now is 02:54 PM.

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