![]() |
Custom Gralat Class
I liked Classic iPhones gralat locking system so much that I made my own.
Anyway here is mine. It allows you to lock gralats if you're in a level that starts with house_account, you may want to restrict it to a level, if so leave that in. The only difference is that even if you're the owner they WON'T pick up if they're locked, that was the only thing I hate about Classic iPhone in that regards. PHP Code:
|
Quote:
PHP Code:
|
Fixed :)
|
You don't need any clientside code here, just use onActionDoubleMouse, which is sent by the client without you doing anything.
What if my account was "Stef"? I could lock gralats in Stefan's house. Once again, stop using 0 and 1 as booleans. Use true and false instead. It's much clearer for anyone reading the code. I'm almost certain that setshape should have '1' as its first parameter (at least according to the wikibut I've never seen it used any other way). Where is onUpdateGani being triggered from? Indent code properly and use whitespace consistently. It's unacceptable not to. |
Quote:
Default Gralats: PHP Code:
|
Quote:
and why use true or false? 0 and 1 are true and false in binary.. I was in the middle of editing it and it popped up that I can only edit it 1440 minutes after it was created, so here is the new code. PHP Code:
|
Quote:
|
Ok, I'll do that in GS2 from now on.
But I'm still going to do it my way in AS2 lol. |
Quote:
PHP Code:
Why are you trimming the position of ".nw"? It doesn't make any sense to trim output from a function which always returns integers. |
So that it checks the player account part of the levenll name vs the players account.
You can't exactly compare Graal123456 to Graal123456.nw unless you use .starts which you said not to. |
Quote:
PHP Code:
|
Quote:
|
Quote:
* Actually 32, but GS "protects" ints from overflow via << or ^. |
Quote:
|
Quote:
PHP Code:
|
All times are GMT +2. The time now is 07:21 PM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.