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
  #91  
Old 04-03-2010, 09:57 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Quote:
Originally Posted by DrakilorP2P View Post
It'd help if you told us how it isn't working.

Not sure if this will fix it, but try formatting the setlevel2 lines like this:
PHP Code:
setlevel2("vega_spar.nw",32.25,21.5); 
It would have been valid GS1, but you had a ) without a matching (.
Quote:
Originally Posted by fowlplay4 View Post
Did you update the script any? If you followed Drakilor's tip to fix it should be fine.
Yes, i fixed the set levels and went in game and said :in and it didn't work.

Graal Editor gave me this error when I clicked Test

PHP Code:
ErrorExpected format setlevel2 string,real,real
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #92  
Old 04-03-2010, 10:02 AM
Codein Codein is offline
jwd
Codein's Avatar
Join Date: Oct 2005
Location: Greater Manchester
Posts: 2,423
Codein has a spectacular aura aboutCodein has a spectacular aura about
Send a message via AIM to Codein Send a message via MSN to Codein
Quote:
Originally Posted by jkldogg View Post
Yes, i fixed the set levels and went in game and said :in and it didn't work.

Graal Editor gave me this error when I clicked Test

PHP Code:
ErrorExpected format setlevel2 string,real,real
Could you post your updated script?
Reply With Quote
  #93  
Old 04-03-2010, 10:13 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by jkldogg View Post
Graal Editor
You have to test this online. GS2 doesn't work offline.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #94  
Old 04-03-2010, 10:43 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Codein

PHP Code:
function onPlayerChats() {
  if (
player.chat==":in") {
    if (
clientr.inspar==false) {
      if (
serverr.sparp<2) {
        
clientr.inspar true;
        
serverr.sparp += 1;
        
player.chat "";
        
setlevel2("vega_spar.nw",32.25,21.5);
      }else
          
player.chat "Therearepeopletheinsparalready";
    }else
        
player.chat "";
  }elseif (
player.chat=="ut") {
    if (
clientr.inspar==true) {
      
serverr.sparp -= 1;
      
clientr.inspar false;
      
player.chat "";
      
setlevel2("vega_spar.nw",32.25,21.5);
    }else
        
player.chat "";
  }


Switch How, a weapon?
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #95  
Old 04-03-2010, 10:55 AM
FaLLChiLD FaLLChiLD is offline
fcmrcy
Join Date: Nov 2004
Posts: 258
FaLLChiLD has a spectacular aura aboutFaLLChiLD has a spectacular aura about
Send a message via AIM to FaLLChiLD
Sorry...but this thread is blowing my f*#&ing mind, lol!
Reply With Quote
  #96  
Old 04-03-2010, 12:26 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by jkldogg View Post
Switch How, a weapon?
You can just put it in an NPC in the level.
Reply With Quote
  #97  
Old 04-03-2010, 01:04 PM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by jkldogg View Post
Switch How, a weapon?
A level NPC would be best, like Drakilor said. Also, if this is going right in the same level that the spar area is in, you might as well use player.x and player.y instead of setlevel2(), since that may be easier to read.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #98  
Old 04-03-2010, 04:54 PM
fowlplay4 fowlplay4 is offline
team canada
fowlplay4's Avatar
Join Date: Jul 2004
Location: Canada
Posts: 5,200
fowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond reputefowlplay4 has a reputation beyond repute
I believe it might be related due to the lack of the player prefix, or conflict with local systems.

Try this level script:

PHP Code:
function onPlayerChats() {
  if (
player.chat == "testwarp") {
    
player.setlevel2("onlinestartlocal.nw"3030);
    
player.chat "Warped!";
  }

__________________
Quote:
Reply With Quote
  #99  
Old 04-04-2010, 03:35 AM
Switch Switch is offline
o.o
Switch's Avatar
Join Date: Jan 2007
Location: Philadelphia
Posts: 3,038
Switch has a spectacular aura about
Send a message via MSN to Switch
Quote:
Originally Posted by fowlplay4 View Post
I believe it might be related due to the lack of the player prefix, or conflict with local systems.
Since the player triggers the onPlayerChat() event, you don't need to use the player prefix, at least I haven't had to, though it is good practice to do so.
__________________
Oh squiggly line in my eye fluid. I see you lurking there on the peripheral of my vision.
But when I try to look at you, you scurry away.
Are you shy, squiggly line?
Why only when I ignore you, do you return to the center of my eye?
Oh, squiggly line, it's alright, you are forgiven.
Reply With Quote
  #100  
Old 04-04-2010, 07:38 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Quote:
Originally Posted by fowlplay4 View Post
I believe it might be related due to the lack of the player prefix, or conflict with local systems.

Try this level script:

PHP Code:
function onPlayerChats() {
  if (
player.chat == "testwarp") {
    
player.setlevel2("onlinestartlocal.nw"3030);
    
player.chat "Warped!";
  }

This Worked, but i'm scrapping that spar system that i made, it sucks.
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #101  
Old 04-04-2010, 12:15 PM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
Quote:
Originally Posted by cbk1994 View Post
And you really wouldn't need or want a timeout for that.
No? Then in what way can you constantly check if the player is still in the level?

edit:
Ah im assuming you mean onPlayerLeaves()?
__________________
Quote:
Originally Posted by Tigairius View Post
I promise when I get rich I'll send you an iPhone. I'll send everyone an iPhone.
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 08:47 PM.


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