Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > Code Gallery
FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-22-2011, 04:15 AM
oralgnome oralgnome is offline
doesnt afraid of anything
oralgnome's Avatar
Join Date: Sep 2011
Posts: 34
oralgnome is an unknown quantity at this point
Quote:
Originally Posted by cbk1994 View Post
Why not just do this?

PHP Code:
//#CLIENTSIDE
function ChatBar.onTextChanged(temp.text) {
  if (
this.on) {
    
player.chat temp.text;
  }
}

function 
onWeaponFired(){ 
  
this.on = ! this.on;
  
player.chat "Typewriter " @ (this.on "on" "off") @ "!";

EDIT: In other words, there's more than one way to bake a cake.
__________________
Quote:
Originally Posted by CaySedaiSim View Post
Is there a GS2 for retards book..?

Last edited by oralgnome; 09-22-2011 at 04:36 AM..
Reply With Quote
  #2  
Old 09-22-2011, 04:48 AM
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
Quote:
Originally Posted by oralgnome View Post
EDIT: In other words, there's more than one way to bake a cake.
It's the better way to bake this specific cake.
__________________
Quote:
Reply With Quote
  #3  
Old 09-22-2011, 05:41 AM
oralgnome oralgnome is offline
doesnt afraid of anything
oralgnome's Avatar
Join Date: Sep 2011
Posts: 34
oralgnome is an unknown quantity at this point
Quote:
Originally Posted by fowlplay4 View Post
It's the better way to bake this specific cake.
How so, it does the same thing - right?
__________________
Quote:
Originally Posted by CaySedaiSim View Post
Is there a GS2 for retards book..?
Reply With Quote
  #4  
Old 09-22-2011, 05:47 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
Quote:
Originally Posted by oralgnome View Post
How so, it does the same thing - right?
Just because the end product is the same doesn't mean it's just as good. If you can't compare the OP script to Chris' and tell why one is better than the other than you need to rethink your position as a scripter.
Reply With Quote
  #5  
Old 09-22-2011, 05:59 AM
gaben gaben is offline
uhh no
gaben's Avatar
Join Date: Aug 2011
Posts: 47
gaben is an unknown quantity at this point
Quote:
Originally Posted by DustyPorViva View Post
Just because the end product is the same doesn't mean it's just as good. If you can't compare the OP script to Chris' and tell why one is better than the other than you need to rethink your position as a scripter.
He never said it was 'just as good', he just doesn't see why it would be perceived as better at face value. I'm sure that's a safe assumption - and you have no right to determine what their position as a 'scripter' is. (Sorry, but it's true!)

Regardless of all this /e/drama, this.bool = !this.bool is a unique way of performing toggling and I can see how one would perceive it as somewhat 'better'. Though, in the end, the one that ends up playing second fiddle is the one that attempts to distinguish oneself' in the face of others.
__________________
Quote:
Originally Posted by iBeatz View Post
Who came up with this Cheat Engine? The more I read about, the more ingenious the whole thing sounds.
Quote:
Originally Posted by Unixmad
This forums is going worst each day.
Quote:
Originally Posted by ff7chocoboknight View Post
You sure are taking your time leaving, furry.
Quote:
Originally Posted by [email protected] View Post
are u old enough 2 even play Graal little girl???
Reply With Quote
  #6  
Old 09-22-2011, 06:07 AM
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
Quote:
Originally Posted by oralgnome View Post
How so, it does the same thing - right?
It uses a single event to detect change in text rather than a hack to detect it which simplifies the code significantly and is much easier to read and understand.

Quote:
Originally Posted by gaben View Post
Regardless, this.bool = !this.bool is a unique way of performing toggling and I can see how one would perceive it as somewhat 'better'. Though, in the end, the one that ends up playing second fiddle is the one that attempts to distinguish oneself' in the face of others.
That is irrelevant in my reasoning as to why I think it's 'better'. I would have considered writing the "toggle" like this since it's easier for new scripters to understand:

PHP Code:
//#CLIENTSIDE
function onWeaponFired() {
  if (
this.on) {
    
this.on false;
    
player.chat "Typewriter off!";
  } else {
    
this.on true;
    
player.chat "Typewriter on!";
  }

__________________
Quote:
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:25 PM.


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