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
  #16  
Old 01-04-2004, 08:05 PM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
1.) Dice -> You can't use addweapon clientside
2.) Use [code] tags if you're posting scripts
3.) THERE IS NO SUCH THING AS //#SERVERSIDE.
Reply With Quote
  #17  
Old 01-04-2004, 08:11 PM
Hevaricubed Hevaricubed is offline
Registered User
Join Date: Aug 2003
Posts: 262
Hevaricubed is on a distinguished road
Send a message via AIM to Hevaricubed Send a message via Yahoo to Hevaricubed
Quote:
Originally posted by Python523
THERE IS NO SUCH THING AS //#SERVERSIDE.
The npc server just sees it as a comment, but if it were ever real it would ONLY be used at the beginning of the script.

Although i think it would be alot easier than all this triggeraction serverside clientside bull****. Functions nested in a //#SERVERSIDE would probably be much less taxing than triggeractions left right and center, and since functions will support parameters in v3 it should be easy to replace triggeraction.
__________________
Reply With Quote
  #18  
Old 01-04-2004, 10:28 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by Fhqwhgads
setlevel2 serverstart.graal;
Correct syntax for setlevel2, buddy:

NPC Code:

setlevel2 levelname,x,y;



PS: server-side only.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #19  
Old 01-05-2004, 12:26 AM
Fhqwhgads Fhqwhgads is offline
Registered User
Join Date: Nov 2003
Location: Chicago
Posts: 57
Fhqwhgads is on a distinguished road
Send a message via AIM to Fhqwhgads
Quote:
Correct syntax for setlevel2, buddy: setlevel2 levelname,x,y;
yeah i know the setlevel2 index,x,y; i just forgot to change it. it still doesnt work.
Reply With Quote
  #20  
Old 01-05-2004, 12:28 AM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by Fhqwhgads
ok, heres the script, whats wrong with it?
----------------------------------------------------

removed for quoting something huge that sort of floods the post-Jagen
//#SERVERSIDE
setlevel2 serverstart.graal;

-------------------------------------------------------
It's totally wrong?
removed for posting full scirpts, you are not going to help him at all by doing so, he wont learn and will keep begging for more -Jagen
This ofcourse won't work properly, but i hope you've got the idea...
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?

Last edited by Python523; 01-05-2004 at 12:39 AM..
Reply With Quote
  #21  
Old 01-05-2004, 12:56 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
I'll explain something and i hope this will help you.
You want to make a weapon wich will warp you to a specified level, then, add a weapon to weapons list.
Put the script there; I won't post a full script but i'll give some explanations.
Like some people already said, if you use '//#CLIENTSIDE', what is written above that 'declaration' will work server-side and what is written below the 'declaration' will work client-side, since setlevel2 works server-side, where will you put the command at? Think about it.
Try to learn about triggeraction on weapons, because you'll need that to trigger the warp action from server-side to client-side to warp you.
That's all you have to know to make it work successful.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #22  
Old 01-05-2004, 01:41 AM
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
Perhaps this is easier to understand mention that from a security point of view, it would be _stupid_ to allow the client to use setlevel2. Think about it.

And, think about using more informative thread titles in the future.
Reply With Quote
  #23  
Old 01-05-2004, 05:25 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
First off I'd suggest shorting your code a lot by looking into how to use for () loops.

Also, look around on the forums for examples on how to do clientside to serverside through weapons (Its been explained enough that no one should have to post about it again). You will find the script is actually quite short and simple.
Reply With Quote
  #24  
Old 01-05-2004, 11:50 AM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Quote:
Originally posted by GoZelda

removed for posting full scirpts, you are not going to help him at all by doing so, he wont learn and will keep begging for more -Jagen
It was rather more a useless template but i guess you're right

Try to use a for loop instead of all the sleeps, or a timeout because Kai dun like a for with sleep.

To set the level, but at the end of the fancy-warpy-stuff a triggeraction 0,0,serverside,<parameters>.
Above the //#CLIENTSIDE, put a
NPC Code:
if (actionserverside){
// do stuff
}


To trigger serverside...
Do you actually know how triggeraction works?
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?

Last edited by Loriel; 01-05-2004 at 02:57 PM..
Reply With Quote
  #25  
Old 01-05-2004, 05:43 PM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by GoZelda
Kai dun like a for with sleep.
Who cares?
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #26  
Old 01-05-2004, 07:10 PM
GoZelda GoZelda is offline
Mister 1,000,000
GoZelda's Avatar
Join Date: Jan 2003
Location: Brussels, capital of Europe.
Posts: 5,396
GoZelda will become famous soon enough
Send a message via AIM to GoZelda Send a message via MSN to GoZelda
Stefan :o
__________________

Quote:
Originally Posted by Lance
stefan is satan
I am the best.
[URL removed]Music or aural pollution?
Reply With Quote
  #27  
Old 01-19-2004, 07:35 AM
TheStivi TheStivi is offline
Registered User
Join Date: Sep 2002
Location: Germany - NRW
Posts: 78
TheStivi is on a distinguished road
Send a message via ICQ to TheStivi Send a message via AIM to TheStivi
If you want to make a warp ...
In a weapon :

NPC Code:

if (actionserverside){
setlevel2 level,x,y;
}
//#CLIENTSIDE
if (weaponfired){
triggeraction 0,0,serverside,weaponname,;
}



In a NPC in a Level :
NPC Code:

if (actionwarp){
setlevel2 level,x,y;
}
if (created){
setshape 1,32,32;
}
//#CLIENTSIDE
if (playertouchsme){
triggeraction x,y,warp,;
}




Kay ?
__________________
Old Staff Jobs :
Graal 2002 : Gani Maker || Doomsday : Developer || Terra : Developer || Zenkou : NAT || Anystria : Manager || Galeon : Co Manager || Kabruriki : NAT Chief || Archaic : NAT || Age of Legends : Manager
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 04:45 AM.


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