Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #27  
Old 08-29-2009, 07:31 AM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Ok, so it got it to at least start one match, having a problem setting the area when the player dies. This was my last attempt. Ive already tried using the function onPlayerDies() as well, instead of the player.hp part, neither worked at all. Any obvious thing Im missing?

PHP Code:
function onCreated() {
  
this.setshape(13232);
}
function 
onActionWarpPlayer(pobj)
  {
  
temp.player1 pobj[0];
  
temp.player2 pobj[1];
  
this.playerbattle = {player1player2};
  
temp.pl1 findplayerbycommunityname(player1);
  
temp.pl2 findplayerbycommunityname(player2);
  
temp.dest = {"testtourny.nw"2020};
  
pl1.setlevel2(dest[0], dest[1], dest[2]);
  
pl2.setlevel2(dest[0], dest[1], dest[2]);
  
player.chat this.playerbattle;
}

function 
onActionWarpPlayert(){
  
temp.desta = {"testtourny.nw"3030};
  
player.setlevel2(desta[0], desta[1], desta[2]);

}

function 
onActionSetMatchServer(matchvplayersplayer) {
  for (
temp.0temp.<= 10temp.i++) {
    if (
match == imakevar("this.sdematch" i) = {vplayersplayer};
  }
}


function 
onPlayerTouchsMe(){
  
temp.matchlist "";
  for (
temp.1temp.<= 10temp.++)
    {
    
matchlist @= "Match " ": " this.(@"sdematch" i)[0] @ " vs. " this.(@"sdematch" i)[1] @ "#b";
  }
  
say2(matchlist);

}
function 
onPlayerChats(){
  if (
player.account in serverr.sdeaccess)
    {
    if (
player.chat.starts("setmatch")) {
      
temp.match player.chat.tokenize()[1];
      
temp.vplayer player.chat.tokenize()[2];
      
temp.splayer player.chat.tokenize()[3];
      
triggeraction(this.0.5this.0.5"SetMatchServer"temp.matchtemp.vplayer,temp.splayer);
    }
    if (
player.chat.starts("startmatches")){
      for (
temp.1temp.<= 10temp.i++) {
        
this.whatmatch = {this.(@"sdematch" i)};
        if (
this.whatmatch == 0){
          
this.whatmatch ++;
        }else{
          
triggeraction(this.0.5this.0.5"WarpPlayer"this.whatmatch);

        }
      }
    }
  }
}
//#CLIENTSIDE
function onCreated(){
  if (
player.hp <= 0){
    if (
player.account in this.playerbattle)
      {
      
triggeraction(this.0.5this.0.5"WarpPlayert""");
    }
  }

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...


Reply With Quote
 


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


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