Graal Forums  

Go Back   Graal Forums > PlayerWorlds > PlayerWorlds Main Forum
FAQ Members List Calendar Today's Posts

View Poll Results: Should we put custom bodies?
Yes. 19 42.22%
No. 26 57.78%
Voters: 45. You may not vote on this poll

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #10  
Old 09-26-2006, 03:14 AM
Bl0nkt Bl0nkt is offline
Era Developer
Bl0nkt's Avatar
Join Date: Mar 2005
Location: Pennsylvania
Posts: 1,589
Bl0nkt will become famous soon enough
Send a message via AIM to Bl0nkt
Quote:
Originally Posted by KuJi View Post
Hey.. who is ready to see the script of outbreak by hachi?

You are in NO position to EVER EVER talk about scripting.. and you must not know me because I just work 24/7 to not profit myself on guns to kill others k? And I already said I didn't make majority of it... Rapid did.

PHP Code:
function onActionServerside(mode) {
  if (
mode == "TurnZombie") {
    if (
params[1] != "default") {
    }
  }

What was the point of putting mode there? You should have just used params[0] or:

PHP Code:
function onActionServerSide(mode)
{
  switch (
mode)
  {
    case 
"TurnZombie";
    {
      
// BLAH
      
break;
    }
  }

And theres tons more in there too =p.

Hey.. also whats timevar?

AND EVEN BETTER:

PHP Code:
//#CLIENTSIDE
function onCreated() { 
  if (
player.ismale)
    
this.zombieheads = {{"head222.png""cynober"}, {"head11.gif""white"}, {"head257.png""gray"}, {"head302.png""gray"}};
  else
    
this.zombieheads = {{"head306.gif""cynober"}};
  
  
this.levelslist = {
  
"era_event-rooftopsred-1.nw"
  
"era_event-rooftops2.nw"
    
"era_event-rooftopsred-2.nw"
    
"era_event-rooftopsred-3.nw"
    
"era_event-rooftopsred-4.nw"
    
"era_event-rooftopsred-5.nw"
    
"era_event-rooftopsred-6.nw"
    
"era_event-rooftopsred-7.nw"
    
"era_event-rooftopsred-8.nw"
    
"era_event-rooftopsred-9.nw"
    
"era_event-rooftopsred-library.nw"
    
"era_event-rooftopsred-elevator.nw"
    
"era_event-rooftops3.nw"
    
"era_event-rooftops2a.nw"
    
"era_event-rooftops2b.nw"
    
"era_event-rooftopsblack-1.nw"
    
"era_event-rooftopsblack-2.nw"
    
"era_event-rooftopsblack-3.nw"
    
"era_event-rooftopsblack-4.nw"
    
"era_event-rooftopsblack-5.nw"
    
"era_event-rooftopsblack-6.nw"
    
"era_event-rooftopsblack-7.nw"
    
"era_event-rooftopsblack-8.nw",
    
"era_event-rooftopsblack-moffice.nw"
    
};
    
    
  
triggeraction(00"serverside""*Outbreak""startgame");
  
triggeraction(00"serverside""*Outbreak""transfer"this.levelslist);
  
  
onTimeout();

So you double-trigger to the server on the creation of the weapon (and you should use:
PHP Code:
triggerserver("gui"this.name"startgame"); 
And on top of that why didn't you just do:
PHP Code:
if (player.level.starts("era_event-rooftops"))
{

Heres another good one:
PHP Code:
  if (mode == "eliminate") {
    
player.addMessage("Eliminated by" SPC params[1] @ ".""b"0);
    
updateEliminates(params[1], player.account);
    
player.guild "";
    
setlevel2("era_present_00-00.nw"7.546);
    
client.freeze 0;
    
onActionServerside("remove");
  } 
Calling it's own function.. genious!
1.
I used "mode" to classify the "mode" the action is going through. Starting the game, ending the game, removing the weapon, etc...

Simple as that.


2.
I used a level list in an array since I was considering making that mansion that was in SR into part of the event. The level names in it had no specific order or similarity.



3.
Yeah, I called the "remove" function in its own triggeraction, considering I wanted to perform everything that happened in that particular block. Sure beats the hell out of random code stacking.

Btw, you spelled genius wrong.
 


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 07:27 PM.


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