Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 06-10-2007, 03:28 AM
ff7chocoboknight ff7chocoboknight is offline
Skyzer Zolderon
ff7chocoboknight's Avatar
Join Date: Dec 2006
Location: New Hampshire, United States
Posts: 725
ff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of light
Send a message via AIM to ff7chocoboknight Send a message via MSN to ff7chocoboknight
Red face sparring zone

What is the command for sparring? And could a see an example of setting an area in the middle of a level as a sparring zone?
__________________
Reply With Quote
  #2  
Old 06-10-2007, 03:34 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
I always thought the way they did sparringzones was really awkward. I don't know how they do it in GS2, but it used to be I think, issparringzone, in an NPC with nothing else at all, no if's, functions, checks or such.
Reply With Quote
  #3  
Old 06-10-2007, 03:46 AM
ff7chocoboknight ff7chocoboknight is offline
Skyzer Zolderon
ff7chocoboknight's Avatar
Join Date: Dec 2006
Location: New Hampshire, United States
Posts: 725
ff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of light
Send a message via AIM to ff7chocoboknight Send a message via MSN to ff7chocoboknight
oh.... well then...
__________________
Reply With Quote
  #4  
Old 06-10-2007, 03:49 AM
ff7chocoboknight ff7chocoboknight is offline
Skyzer Zolderon
ff7chocoboknight's Avatar
Join Date: Dec 2006
Location: New Hampshire, United States
Posts: 725
ff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of light
Send a message via AIM to ff7chocoboknight Send a message via MSN to ff7chocoboknight
ok someone sent me a pm on graal with this in it...
Graal Script Code:
if (createdsetshape 1,32,32
if (
actionwarp) { 
  
with(getplayer(#p(0))) "levelname,x,y;" 

//#CLIENTSIDE 
if (created || timeout) { 
  
setstring this.player_1-online,false
  
setstring this.player_2-online,false
  for(
this.i=0this.i<playerscountthis.i++) { 
    if (
players[this.i].x in |"x,y"| && players[this.i].y in |"x,y"|) { 
      if (
strequals(#a(this.i),#s(this.player_1))) { 
        
setstring this.player_1-online,true
      }elseif (
strequals(#a(this.i),#s(this.player_2))) { 
        
setstring this.player_2-online,true
      } 
    } 
  } 
  if (
strequals(#s(this.player_1-online),false)) setstring this.player_1,; 
  
if (strequals(#s(this.player_2-online),false)) setstring this.player_2,; 
  
setstring this.players,; 
  for(
this.i=0this.i<playerscountthis.i++) { 
    if (
players[this.i].x in |"x,y"| && players[this.i].y in |"x,y"|) { 
      if (
strequals(#s(this.player_1),) && !strequals(#a(this.i),#s(this.player_1))) { 
        
setstring this.player_1,#a(this.i); 
      
}elseif (strequals(#s(this.player_2),) && !strequals(#a(this.i),#s(this.player_1))) { 
        
setstring this.player_2,#a(this.i); 
      
}elseif (!strequals(#a(this.i),#s(this.player_1)) && !strequals(#a(this.i),#s(this.player_2))) addstring this.players,#a(this.i); 
    

  } 
  for(
this.i=0this.i<sarraylen(this.players); this.i++) { 
    
triggeraction x+1,y+1,warp,#I(this.players,this.i); 
  

  
timeout .05

This script is sscaring me...
__________________
Reply With Quote
  #5  
Old 06-10-2007, 03:58 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
levels are sparring zones by default I thought, to turn it off one would use noplayerkilling(); and if (noPKzone) {

gah, bloody GS1 in a GS2 area :O Anyways I think the script is either so sort of spar door, or spar area, Too tired to fully look at though z.z
__________________
Deep into the Darkness peering...
Reply With Quote
  #6  
Old 06-10-2007, 04:01 AM
DustyPorViva DustyPorViva is offline
Will work for food. Maybe
DustyPorViva's Avatar
Join Date: Sep 2003
Location: Maryland, USA
Posts: 9,589
DustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond reputeDustyPorViva has a reputation beyond repute
Send a message via AIM to DustyPorViva Send a message via MSN to DustyPorViva
Well, there's a difference between PKing and Sparring. Levels are PK by default, but they aren't sparringzones by default. Sparringzones don't effect alignment, don't drop your stuff, and other effects that I can't remember.
Reply With Quote
  #7  
Old 06-10-2007, 04:05 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Ah, thanks for the correction :]
__________________
Deep into the Darkness peering...
Reply With Quote
  #8  
Old 06-10-2007, 04:08 AM
Grey Grey is offline
Classic Developer
Grey's Avatar
Join Date: Mar 2007
Location: Wales, UK
Posts: 134
Grey will become famous soon enough
Send a message via AIM to Grey Send a message via Skype™ to Grey
issparringzone is only to check if the level is a sparring zone.

if (issparringzone) {
//dostuff
}

Sparring zones are set as Dusty says, but with just 'sparringzone' on its own in an NPC instead. As far as I know there is no way of setting a partial sparringzone in a level (such as inside the sparring area) though you can do something like checking the player's x and y and if it is in a certain area then enabling weapons, otherwise disabling them instead.
Reply With Quote
  #9  
Old 06-10-2007, 04:17 AM
ff7chocoboknight ff7chocoboknight is offline
Skyzer Zolderon
ff7chocoboknight's Avatar
Join Date: Dec 2006
Location: New Hampshire, United States
Posts: 725
ff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of lightff7chocoboknight is a glorious beacon of light
Send a message via AIM to ff7chocoboknight Send a message via MSN to ff7chocoboknight
How about a command for resetting pking
__________________
Reply With Quote
  #10  
Old 06-12-2007, 07:11 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by ff7chocoboknight View Post
How about a command for resetting pking
You can't :[
__________________
What signature? I see no signature?
Reply With Quote
  #11  
Old 06-22-2007, 08:21 PM
Evil_Trunks Evil_Trunks is offline
Evil
Evil_Trunks's Avatar
Join Date: Dec 2004
Posts: 391
Evil_Trunks is on a distinguished road
NPC Code:

//#CLIENTSIDE
sparringzone



Should look like that in an NPC by itself.
__________________

Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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


Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (C) 1998-2008 Linux cyberjoueurs All Rights Reserved.