Graal Forums

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

Lugie 07-11-2001 09:40 PM

Playerhouse Rooms
 
Okay, I am very dumb at NPC's. I need this NPC:

9 Different NPC'swhere if you touch the door and you're account name is Lugie, it says what room number it is, and who owns it. and if you touch it and you are not the owner, it says "You are not the owner!" all of this in chat form. and if you touch it from the bottom and you are the owner, you get warped up 2. but if you touch it from the top, you are warped down 2. And that the account "Lugie" can add and remove owners of the room with "give key 1 "account"" "give key 2 "account"" "take key 1" "take key 2" ect all the way 1-9.

thanks!

ownerofbabylon 07-11-2001 09:47 PM

umm, heh, I would do it for you but it sounds lame and I see no point

Lugie 07-11-2001 09:48 PM

it is for my personal house. (yes i know i am picky)

i would attempt to script it, but i have no knowledge of NPC server scripting.

Knightoffrost 07-11-2001 09:51 PM

Explain it differently and i'll do it for you.to much unclear **** there

ownerofbabylon 07-11-2001 09:58 PM

LOL, you didnt understand that frost? here it is:

if your name is luigie and you say left you go right but if you say right you go right anyways. Then if you say give key you actually appear in the top but if you say give key 1 then you exit. If someone says give key and there not luigie then it takes them left but if they say give key 1 it takes them right. Its really quite simple. ;)

Lugie 07-11-2001 10:05 PM

Okay.
  • *There will be nine (9) different doors.
    *The doors will be set so that the account Lugie can add owners with ' add owner 1 "accountname" ', ' add owner 2 "accountname" ', ect. (1-9).
    *The doors will be set so that the aco**** Lugie can remove owners with ' remove owner 1 ', ' remove owner 2', ect, (1-9 also).
    *If the account Lugie touchs the door, it will say in message form: "accountname" is the owner of "room (1-9)".
    *If the owner touchs the door from the bottom, it warps their playery + 2.
    *If the owner touchs the door from the top, it warps their playery - 2.
    *If anybody else touchs the door and there is an owner, it says in message form: "This room is taken!"
    *If anybody else touchs the door and there is no owner, it says in message form: "This room is free!"

ownerofbabylon 07-11-2001 10:07 PM

hmm i think u need an NPC server

Knightoffrost 07-11-2001 10:08 PM

Quote:

Originally posted by ownerofbabylon
hmm i think u need an NPC server
true,true

Lugie 07-11-2001 10:10 PM

yes, i know. that is why i dont know how to script it and i am asking it here.

entravial 07-15-2001 01:49 PM

you won't need npcserver, just a whole lot of server strings

grim_squeaker_x 07-15-2001 06:40 PM

Well, the NPC Server version would be something like this:
NPC Code:
if (created) {
this.id=0; //Change to another number for different doors
setshape 1,width,height; //You'll need to change width height to the image width and height in pixels
}
if (playerchats&&strequals(#a,Lugie)) {
if (startswith(set owner #v(this.id),#c)) {
tokenize #c;
if (tokenscount>3) {
for (i=3;i<tokenscount;i++) setstring this.owner,#t(i); //This is so that it works with accounts with a space in them
setplayerprop #c,Owner of room #v(this.id) set to #s(this.owner);
}
else setplayerprop #c,Please define a accountname after saying set owner;
}
}
if (playertouchsme) {
if (strequals(#a,Lugie)) setplayerprop #c,The room #v(this.id) is owned by #s(this.owner);
if (strequals(#a,#s(this.owner))) {
if (playery>y) playery=y-3;
else playery=y+3;
}
}



All times are GMT +2. The time now is 06:05 AM.

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