Graal Forums  

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

 
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 03-04-2002, 02:00 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
CLIENTSIDE Question

I was wondering if //#CLIENTSIDE had to be in every NPC you script with the client, or jsut in the NPCs that have NPC Server Functions in it?
__________________
Trunks
  #2  
Old 03-04-2002, 02:33 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Its for every npc that you don't want to NPC Server to control
  #3  
Old 03-04-2002, 07:53 AM
happyme happyme is offline
Registered User
Join Date: Mar 2002
Location: Toronto, Ontario, Canada
Posts: 142
happyme is on a distinguished road
Send a message via AIM to happyme
Talking oh

oh ive been thinking the opposite x.X
__________________
  #4  
Old 03-05-2002, 04:24 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
kkk

K Thanks alot, does toweapons work in a P2P Server also or do you have to use addweapon?
__________________
Trunks
  #5  
Old 03-05-2002, 04:35 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Re: kkk

Quote:
Originally posted by cell424
K Thanks alot, does toweapons work in a P2P Server also or do you have to use addweapon?
toweapons works clientsided, addweapon works serversided, also dont do any serversided scripts inside of weapons since they are clientsided
  #6  
Old 03-05-2002, 10:52 AM
Cybnext_Design Cybnext_Design is offline
Registered User
Join Date: Jun 2001
Posts: 244
Cybnext_Design is on a distinguished road
Send a message via AIM to Cybnext_Design
Re: Re: kkk

Quote:
Originally posted by Python523

toweapons works clientsided, addweapon works serversided, also dont do any serversided scripts inside of weapons since they are clientsided
This is pretty much completely incorrect. toweapons causes the weapon to be added to the weapon database. You can put serverside scripts in weapons, but you have to do it a weird way:

serverside part of the weapon:
NPC Code:

if (actionserverside) {
setlevel2 leveltest.graal,30,30;
}



Clientside part of the weapon:
NPC Code:

triggeraction 0,0,serverside,God Ring,warpplayer,#v(this.cursor),;

__________________
Graal2001 NPC Maker
Frolic Owner
Aim: C Y B N E X T
  #7  
Old 03-05-2002, 06:03 PM
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
k Thanks alot, so if I got this all right I guess when you first put a NPC up you use toweapons, go to the item and touch it so it adds itself to the database, then change it to addweapon for everyone else. k I think I got it. Here is one of my scripts, would this work?

NPC Code:

// NPC made by Trunks (Owner)
//#CLIENTSIDE
if (playerenters) {
toweapons *System;
}

if (isweapon) {
//Map Systems
if (!startswith(sidi_miningcaves,#L)) {
setmap sidimap.png,sidimap.txt,x,y;
}
}
//Shoe System
if (isweapon) {
if (!madeshoes && !strequals(#C3,orange)) {
setplayerprop #C3, orange;
}
else
timeout=0;
setplayerprop #C3, #C3;

if (!madeshoes && isonmap) {
timeout=10;
}

if (timeout && isonmap) {
hurt 1;
timeout=10;
say2 You really should make yourself#ba pair of shoes before you really#bhurt yourself..
}
}



NPC Code:

//#CLIENTSIDE
if (playerenters) {
toweapons Bow;
hide;
}
if (weaponfired && playerdarts>0) {
freezeplayer 0.3;
setani shoot,wbow1.gif;
timeout=0.25;
}

if (timeout && !fireonhorse) {
shootarrow playerdir;
playerdarts = playerdarts-1;
}



NPC Code:

//#CLIENTSIDE
if (playerenters) {
toweapons Bomb;
hide;
}
if (weaponfired && playerbombs>0) {
if (playerdir=0) {
putbomb 1,playerx+0.5,playery-1;
}
if (playerdir=1) {
putbomb 1,playerx-1.5,playery+1;
}
if (playerdir=2) {
putbomb 1,playerx+0.5,playery+2.5;
}
if (playerdir=3) {
putbomb 1,playerx+2.5,playery+1;
}
playerbombs=playerbombs-1;
}




Would they work online in a P2P Server?
__________________
Trunks

Last edited by cell424; 03-05-2002 at 06:27 PM..
  #8  
Old 03-05-2002, 07:19 PM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
-=Josey=-
I do believe all of that would've worked with the //#CLIENTSIDE in them.
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
  #9  
Old 03-05-2002, 08:27 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
toweapons/addweapon must be called on the server-side,
otherwise you are disconnected (hacker activity)
  #10  
Old 03-05-2002, 08:42 PM
screen_name screen_name is offline
is watching you
Join Date: Mar 2002
Location: The 3rd Dimension
Posts: 2,160
screen_name is on a distinguished road
Send a message via AIM to screen_name Send a message via MSN to screen_name
Quote:
Originally posted by Stefan
toweapons/addweapon must be called on the server-side,
otherwise you are disconnected (hacker activity)
:P, cool beans
__________________
[signature]insert here[/signature]
  #11  
Old 03-06-2002, 12:14 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
I got cha, thats smart. . Well it makes sence at least.
__________________

!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
  #12  
Old 03-06-2002, 03:42 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
k

So then, it doesnt really matter which one I use. Ok thanks alot Stefan for making it clear for me.
__________________
Trunks
  #13  
Old 03-06-2002, 10:10 AM
SaijinGohan SaijinGohan is offline
Registered User
SaijinGohan's Avatar
Join Date: Jul 2001
Location: U.S.A - Ohio
Posts: 536
SaijinGohan is on a distinguished road
Send a message via AIM to SaijinGohan Send a message via MSN to SaijinGohan
Both should be used server-side as stefan said, toweapons you use when you want the script to come from the NPC itself, addweapon you only use if the weapon in the weapons database already.
__________________

Job: A Legend

And you think that you have played Graal forever? Ha!
  #14  
Old 03-06-2002, 06:01 PM
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
Talking

Thanks alot guys, ever since I quit working on Manatra2001 and became a free lance level designer and scripter I've been learning alot!
__________________
Trunks
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 10:09 AM.


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