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
  #1  
Old 08-05-2005, 03:49 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
setlevel?

if setlevel does not work online, what should i use instead?
Reply With Quote
  #2  
Old 08-05-2005, 03:50 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by excaliber7388
if setlevel does not work online, what should i use instead?
setlevel has been deprecated for years - use setlevel2, a serverside command.
Reply With Quote
  #3  
Old 08-05-2005, 05:27 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
sorry...I am using setlevel2 doesn't work online
Reply With Quote
  #4  
Old 08-05-2005, 05:39 AM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
Quote:
Originally Posted by excaliber7388
sorry...I am using setlevel2 doesn't work online
Yes, it does. It's a serverside command.
Reply With Quote
  #5  
Old 08-05-2005, 04:27 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
it hasn't worked yet, and my server has been online for some time now
Reply With Quote
  #6  
Old 08-05-2005, 04:33 PM
Fry Fry is offline
Registered User
Fry's Avatar
Join Date: Sep 2001
Location: Germany
Posts: 384
Fry has a spectacular aura about
You are doing something wrong then. Maybe paste your code.
__________________
Graal Statistics

Top 3 servers at the moment (players):


Reply With Quote
  #7  
Old 08-05-2005, 06:19 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
here's the script i am currently using drwarp is my own gani for warping:
// NPC made by Excaliber (Manager)
//#CLIENTSIDE
if(playerenters){
toweapons Warp Rings/Warper1;
hidelocal}
if(weaponfired){
freezeplayer 2;
play thunder.wav;
setplayerdir 2;
setani drwarp,;
sleep .1;
for (i=0;i<21;i++) {
seteffect i/20,i/20,i/20,i/20;sleep .05}
{sleep 1;
seteffect 0,0,0,0;
setlevel2 warper.nw,31,31;}
}
Reply With Quote
  #8  
Old 08-05-2005, 06:41 PM
-Ramirez- -Ramirez- is offline
Registered User
Join Date: Jun 2002
Location: USA, Ohio
Posts: 729
-Ramirez- has a spectacular aura about-Ramirez- has a spectacular aura about
Quote:
Originally Posted by Lance
It's a serverside command.
Quote:
Originally Posted by excaliber7388
//#CLIENTSIDE
setlevel2 warper.nw,31,31;

..................

LMAO @ post below
That's freaky... the same exact post time, haha.
__________________
Kat
Reply With Quote
  #9  
Old 08-05-2005, 06:41 PM
Tolnaftate2004 Tolnaftate2004 is offline
penguin.
Join Date: Jul 2004
Location: Berkeley, CA
Posts: 534
Tolnaftate2004 is a jewel in the roughTolnaftate2004 is a jewel in the rough
Send a message via AIM to Tolnaftate2004
Quote:
Originally Posted by Lance
It's a serverside command.
Quote:
Originally Posted by excaliber7388
//#CLIENTSIDE
...
toweapons Warp Rings/Warper1;
...
setlevel2 warper.nw,31,31;
...
@ above

You don't want toweapons with an NPC-Server.

PHP Code:
if (actionserverside) {
  if (
strequals(#p(0),warp)){
    
setlevel2 ...;
  }
}
//#CLIENTSIDE
...
triggeraction 0,0,serverside,WEAPON,warp;
... 
Reply With Quote
  #10  
Old 08-06-2005, 01:51 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
i can't get it to work, try putting it directly into the script so i can see if im putting it in wrong
Reply With Quote
  #11  
Old 08-06-2005, 03:23 AM
Maniaman Maniaman is offline
Registered User
Join Date: Aug 2005
Posts: 326
Maniaman is on a distinguished road
Quote:
Originally Posted by Tolnaftate2004
PHP Code:
if (actionserverside) {
  if (
strequals(#p(0),warp)){
    
setlevel2 ...;
  }
}
//#CLIENTSIDE
...
triggeraction 0,0,serverside,WEAPON,warp;
... 
Do not do this, it is very insecure.

setlevel2 works fine SERVERSIDE. You know, above the //#CLIENTSIDE line.
Reply With Quote
  #12  
Old 08-06-2005, 04:23 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
ABOVE? AH HA! i'll try that thx =D i think i did already, but it can't hurt to try again
Reply With Quote
  #13  
Old 08-06-2005, 04:35 AM
Zurkiba Zurkiba is offline
Assimilated Zurkiba
Zurkiba's Avatar
Join Date: Jul 2001
Location: Georgia
Posts: 4,094
Zurkiba is on a distinguished road
Send a message via AIM to Zurkiba
I'd script my weapons/npcs in the NPC server o.o
__________________
___[Play Valikorlia]
Reply With Quote
  #14  
Old 08-06-2005, 04:50 PM
ChibiChibiLuc ChibiChibiLuc is offline
Cookie Monster. :3
Join Date: Jan 2005
Location: Nova Scotia, Canada
Posts: 111
ChibiChibiLuc is on a distinguished road
Send a message via AIM to ChibiChibiLuc Send a message via MSN to ChibiChibiLuc
If it's below the //#CLIENTSIDE line, it's clientside.
If it's above the //#CLIENTSIDE line, it's serverside.
To do things in the serverside, you have to send a triggeraction.
The syntax is triggeraction 0,0,serverside,WEAPON NAME,params;
This calls (actionserverside).

And if you care about security..
It's only insecure if you're sending the level and x/y it's going to warp you to from the serverside.

NPC Code:
//INSECURE
if (actionserverside) {
if (strequals(#p(0),warp)) {
setlevel2 #p(1),strtofloat(#p(2)),strtofloat(#p(3));
}
}
//#CLIENTSIDE
if (weaponfired) {
triggeraction 0,0,serverside,Warper,warp,onlinestartlocal.nw,30, 30;
}



NPC Code:
//SECURE
if (actionserverside) {
if (strequals(#p(0),warp)) {
setlevel2 onlinestartlocal.nw,30,30;
}
}
//#CLIENTSIDE
if (weaponfired) {
triggeraction 0,0,serverside,Warper,warp;
}



With the first example, a hacker can modify the level and x/y it warps you to easily.
With the second example, they can't modify the level and x/y it warps you to.
Reply With Quote
  #15  
Old 08-06-2005, 08:08 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
nope will someone just enter this into the code i already have here, so i can set it up? thx.

edit: he gets it (delete a post so he's not double posting)

Last edited by Python523; 08-06-2005 at 08:59 PM..
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 03:25 PM.


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