![]() |
Sheep's little Guide on using GS2 in non-standard ways
well atleast i have never seen anynone using it like this
adding functions to a TStaticVar without using a class so that was the basis of all the other stuff ;D PHP Code:
|
adding a function to another NPC:
(note, -HolyAddHere is an existing weapon that i have got on my char) PHP Code:
<some npcs script> PHP Code:
PHP Code:
|
replacing functions
(now we replace a already existing function) a) replacing an npcs functions (note that -HolyAddHere is an existant weapon that i have got on my char ) <script of any npc> PHP Code:
PHP Code:
b) replacing a standard graal function k, lets say if you do setani( "meh", "" ); the player will say "meh"... impossible? nooo <script of some npc> PHP Code:
<script of some npcs> PHP Code:
|
2 separated timeouts(note that -System/Attack1 is a non-existant(it isnt a weapon, npc or anything else in rc/serv))
running both timeouts: ( in this case player saying "running timeout1" + sitting all the time ) PHP Code:
( in this case player sitting all the time without saying "running timeout1" ) PHP Code:
(in this case player saying "running timeout1" without sitting all the time) PHP Code:
|
Quote:
There could be practical uses for this, but I think for making them say "running timeout1" and sitting, you would be better off with something else :) |
Quote:
i'm kinda lazy and didnt wanna think of useful examples heh |
Well nether less its nice, and well put.Simple enough for anyone to figure it out.
Yay Sheepy <3 |
I really wish people wouldn't use object names that require quotes to be able to process :(
EX: ("-System/Attack1").attr vs. SystemAttack1.attr If you're not using standard Graal Q menu then the minus signs and slashes are unnecessary for weapons. |
Quote:
|
Quote:
As Inverness said, things like slashes, plus and minus shouldn't be in the wnpc name or in any other object names. ^_^ |
Quote:
|
I do it for organization, I start all my system scripts with -, all mud with +, I use !, $ and * on few weps too.
|
Quote:
- is used in the Classic System weapons for weapons you don't want to shop up in the players inventory. |
Quote:
|
Quote:
Quote:
PHP Code:
|
Quote:
|
Quote:
|
Organization is all point of view, same with styling and etc. This is a good example, I'll respect your guy's point of views and all, but I find it easier with my symbols. =P
|
Do remember: scripts are compiled into bytecode and as such, I'm sure they do not give a **** however you name them. To care about such little stupid things....
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Maybe you don't mind your scripts looking bad but if I were to choose from: "SysMsg".addmsg(); or SysMsg.addmsg(); I would choose the second option considering it looks better, its the more proper way, and its not highlighted in neon pink. The second option is only possible in the case that your weapon/object name doesn't have funky symbols in it. If you want to name your objects with funky symbols, fine, it will just make your script look a bit worse when its really unnecessary. If you take advantage of public functions that is. Quote:
|
Quote:
|
I saw the thread as showing the lesser known ways of using gscript which was quite good. After that, I saw you *****ing about 'personal preferences'.
Inverness is the reincarnation of Gambet :whatever: |
Quote:
|
Quote:
Quote:
|
Quote:
And is intelligent. And doesn't have as big an ego. (Although he does have one) |
Quote:
|
Quote:
|
Quote:
But nothing compared to Gambet. |
| All times are GMT +2. The time now is 02:32 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.