Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > NPC Server
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 01-04-2002, 01:14 PM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
question

[screen_name says:]

im new to NPC server scripting, so im trying to figure out what will work or not

lets see, will this make me have 90 gralats, make me say "I am screen_name!!", and set my body to body5 (my favoritest btw)??

NPC Code:

with (getplayer(screen_name)) {
playerrupees=90;
setplayerprop #c, I am screen_name!!;
setplayerprop #8, body5.png;
}




To be continued...

(suspensfully isn't it)
__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
  #2  
Old 01-04-2002, 09:53 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Yes, but only if you put it into an event, for example
if (created) {
// the stuff you posted.
}
  #3  
Old 01-05-2002, 12:24 AM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
[screen_name says:]

well of course
__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
  #4  
Old 01-05-2002, 03:37 AM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 has a spectacular aura about
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
I'm gunna try get the .TXT file for NPC server Screen Name... that way w can learn a little
__________________
  #5  
Old 01-05-2002, 04:59 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
I found it on my computer, I thought I deleted it by mistake but here it is
Attached Files
File Type: txt npcserver.txt (12.2 KB, 64 views)

Last edited by Python523; 01-05-2002 at 08:51 AM..
  #6  
Old 01-05-2002, 10:44 AM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
[screen_name says:]

lets see, i found that file on my pc that i had dloaded from some site, anyway i have another question

NPC Code:

if (playerenters&&!hasweapon(System)) {
addweapon System;
}
if (isweapon) { timeout=.1; }
//#CLIENTSIDE
if (timeout) {
showimg 9,pandabear.png,50,50;
changeimgvis 9,4;
timeout=.1; }



is the //#CLIENTSIDE in the right spot??

i haven't learned much about how to use it
__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
  #7  
Old 01-05-2002, 10:50 AM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
[screen_name says:]

lets see, another question

with the "with(getplayer(account))" command, will it still do something even if they are offline

NPC Code:

if (playersays(test)) {
with(getplayer(account)) {
if (playeronline) {
playerrupees+=100;
} else { playerrupees-=100; }
}



why else would Stefan add the flag, playeronline??
__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
  #8  
Old 01-05-2002, 10:58 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
If you want an example for with(getplayer) here's one I typed up in a min (I'm trying to see if I can get someone with NPC Server acess to let me test it)
It's my Noobalizer
//NPC created by Jagen
if (created) {
// Initialize the attributes
showcharacter;
setcharprop #3,head0.png;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
}
if (playerchats&&startswith(noob,#c))
{tokenize #c;with(getplayer(#t(1)){
setplayerprop #C0,orange;
setplayerprop #C1,orange;
setplayerprop #C2,orange;
setplayerprop #C3,orange;
setplayerprop #C4,orange;
setplayerprop #1,sword1.png;
setplayerprop #2,shield1.png;
setplayerprop #3,head0.png;}
}
  #9  
Old 01-05-2002, 11:02 AM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
[screen_name says:]

i just want to know how to use //#CLIENTSIDE
__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
  #10  
Old 01-05-2002, 12:29 PM
zell12 zell12 is offline
Gone
zell12's Avatar
Join Date: Jun 2001
Location: Alberta, Canada
Posts: 8,541
zell12 has a spectacular aura about
Send a message via ICQ to zell12 Send a message via AIM to zell12 Send a message via MSN to zell12
hmm, I wist there was a npc program that is for NC and it shows ya how to convert simple scripts, then I could start converting my better ones
__________________
  #11  
Old 01-05-2002, 10:04 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
Quote:
Originally posted by WHIPENIE4
[screen_name says:]
lets see, i found that file on my pc that i had dloaded from some site, anyway i have another question
NPC Code:

if (playerenters&&!hasweapon(System)) {
addweapon System;
}
if (isweapon) { timeout=.1; }
//#CLIENTSIDE
if (timeout) {
showimg 9,pandabear.png,50,50;
changeimgvis 9,4;
timeout=.1; }


is the //#CLIENTSIDE in the right spot??
i haven't learned much about how to use it
No, you don't put the weapons script into the NPC.
You just put if (playerenters) addweapon System; and use NC to add the weapon to the Database.

Quote:
Originally posted by WHIPENIE4
[screen_name says:]
with the "with(getplayer(account))" command, will it still do something even if they are offline
NPC Code:

if (playersays(test)) {
with(getplayer(account)) {
if (playeronline) {
playerrupees+=100;
} else { playerrupees-=100; }
}


why else would Stefan add the flag, playeronline??
Nope, with (blah) only works for online players...
  #12  
Old 01-06-2002, 04:23 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
Talking

Quote:
Originally posted by Python523
If you want an example for with(getplayer) here's one I typed up in a min (I'm trying to see if I can get someone with NPC Server acess to let me test it)
It's my Noobalizer
//NPC created by Jagen
if (created) {
// Initialize the attributes
showcharacter;
setcharprop #3,head0.png;
setcharprop #C0,orange;
setcharprop #C1,white;
setcharprop #C2,blue;
setcharprop #C3,red;
setcharprop #C4,black;
setcharprop #2,shield1.gif;
shieldpower = 1;
dir = 2;
}
if (playerchats&&startswith(noob,#c))
{tokenize #c;with(getplayer(#t(1)){
setplayerprop #C0,orange;
setplayerprop #C1,orange;
setplayerprop #C2,orange;
setplayerprop #C3,orange;
setplayerprop #C4,orange;
setplayerprop #1,sword1.png;
setplayerprop #2,shield1.png;
setplayerprop #3,head0.png;}
}
that is a great npc.
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
  #13  
Old 01-06-2002, 11:18 AM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
[screen_name says:]

will someone with NPC Server experience let me know if my last 2 scripts will work or not??

NPC Code:

if (playersays(test)) {
with(getplayer(account)) {
if (playeronline) {
playerrupees+=100;
} else { playerrupees-=100; }
}




NPC Code:

if (playerenters&&!hasweapon(System)) {
addweapon System;
}
if (isweapon) { timeout=.1; }
//#CLIENTSIDE
if (timeout) {
showimg 9,pandabear.png,50,50;
changeimgvis 9,4;
timeout=.1; }

__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
  #14  
Old 01-08-2002, 09:16 PM
Loriel Loriel is offline
Somewhat rusty
Loriel's Avatar
Join Date: Mar 2001
Posts: 5,059
Loriel is a name known to allLoriel is a name known to allLoriel is a name known to allLoriel is a name known to all
It won't.
  #15  
Old 01-09-2002, 02:39 AM
Warcaptain Warcaptain is offline
Banned
Warcaptain's Avatar
Join Date: Jun 2001
Location: Virginia, USA
Posts: 2,086
Warcaptain is on a distinguished road
Send a message via ICQ to Warcaptain Send a message via AIM to Warcaptain Send a message via Yahoo to Warcaptain
Quote:
Originally posted by Python523
I found it on my computer, I thought I deleted it by mistake but here it is
you shouldnt have posted that, those who have it arent supposed to give it out, though i doubt ne one will care, just reminding of rules
  #16  
Old 01-15-2002, 08:16 AM
WHIPENIE4 WHIPENIE4 is offline
I am X-Mann
Join Date: Aug 2001
Location: PA
Posts: 2,715
WHIPENIE4 is on a distinguished road
Send a message via ICQ to WHIPENIE4 Send a message via AIM to WHIPENIE4
[screen_name says:]

okay, im working on divided kingdoms and i have npc server priveleges, so now im testing it out, but it doesnt work

here is the script

NPC Code:

if (playerchats) {
with (getplayer(#a)) {
setstring client.chatted,#c; }
}
//#CLIENTSIDE
if (weaponfired) {
say2 testing; }



and this doesn't work, will someone explain
__________________
Mind over Matter. If your body dont mind, why does it matter?

- X-Mann (Blessing Graal since 1998) Haha

- Graal 2000 Project (Contact Me to get Apart of this expierience

Windows Vista. Graal. Not a Good Combination.
  #17  
Old 01-15-2002, 10:15 AM
kyle0654 kyle0654 is offline
-. .`
kyle0654's Avatar
Join Date: Mar 2001
Posts: 1,000
kyle0654 will become famous soon enough
NPC Code:

if (playerchats) {
with (getplayer(#a)) {
setstring client.chatted,#c;
}
}
//#CLIENTSIDE
if (weaponfired) {
say2 testing;
}


If that's a weapon and it doesn't exist in any level it won't ever recieve playerchats, and even if it is in a level, it'll only recieve it when the player is in the same level. Plus, I've heard that with (getplayer(#a)) { doesn't work.
  #18  
Old 01-15-2002, 10:21 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by Warcaptain


you shouldnt have posted that, those who have it arent supposed to give it out, though i doubt ne one will care, just reminding of rules
x.x I didn't know that, I don't even know how I got it
  #19  
Old 01-16-2002, 11:52 AM
Saga2001 Saga2001 is offline
Wishing he had 3 feet
Join Date: Aug 2001
Location: Basement
Posts: 1,565
Saga2001 is on a distinguished road
Send a message via ICQ to Saga2001 Send a message via AIM to Saga2001 Send a message via Yahoo to Saga2001
hey, e-mail me, [email protected], and i can help...
__________________

!Wan ( 11:27:55 AM):
can i c ur scripts please?
Zorg (RC): If I hear NPC Server call Ne0, Past Austin or Brent sexy one more time im disconnecting it
 


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:07 AM.


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