Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-22-2009, 07:14 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Total height of a GuiScrollCtrl

Is there any way to find the "total height" of a GuiScrollCtrl, meaning how far "down" it will actually scroll (same for horizontal scrolling)? I know you could get it by looping through all the controls, but it seems like there should be a better way.

Thanks.
__________________
Reply With Quote
  #2  
Old 12-22-2009, 09:05 PM
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
Something like this would probably suffice, kind of a hack fix though.

PHP Code:
//#CLIENTSIDE

// Usage: getMaxScrollPos(someScrollGUI);
// Returns: {maxhorizontalpos, maxverticalpos}


function getMaxScrollPos(obj) {
  
// Record Original Scroll Position 
  
temp.original obj.scrollpos.tokenize(); 
  
// Scroll to the Limits 
  
obj.scrolldelta(0x7fffffff0x7fffffff);
  
// Record Actual Limits 
  
temp.max obj.scrollpos.tokenize(); 
  
// Scroll back to Original Position 
  
obj.scrollto(temp.original[0], temp.original[1]);
  
// Return Actual Limits 
  
return temp.max

__________________
Quote:

Last edited by fowlplay4; 12-22-2009 at 09:15 PM..
Reply With Quote
  #3  
Old 12-23-2009, 03:49 AM
Demisis_P2P Demisis_P2P is offline
Kanto League Champion
Demisis_P2P's Avatar
Join Date: Jan 2005
Posts: 2,357
Demisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud of
is this related to the other thread about freezing players by spamming them with PMs??
__________________
Reply With Quote
  #4  
Old 12-23-2009, 05:42 AM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
Quote:
Originally Posted by Demisis_P2P View Post
is this related to the other thread about freezing players by spamming them with PMs??
No, it's for creating custom scrollbars.
__________________
Reply With Quote
  #5  
Old 12-23-2009, 05:50 AM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
Quote:
Originally Posted by Demisis_P2P View Post
is this related to the other thread about freezing players by spamming them with PMs??
...no?
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
  #6  
Old 12-23-2009, 07:07 AM
Demisis_P2P Demisis_P2P is offline
Kanto League Champion
Demisis_P2P's Avatar
Join Date: Jan 2005
Posts: 2,357
Demisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud ofDemisis_P2P has much to be proud of
I'm retard. I thought that maybe you were trying to detect the total size of a PM bank based on the scroll bar and stop them from opening if it were too large. But now that I think about it you would need to open the PM first to be able to detect anything about the GUI window anyway.
__________________
Reply With Quote
  #7  
Old 12-23-2009, 07:34 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 Demisis_P2P View Post
I'm retard. I thought that maybe you were trying to detect the total size of a PM bank based on the scroll bar and stop them from opening if it were too large. But now that I think about it you would need to open the PM first to be able to detect anything about the GUI window anyway.
I wouldn't consider this a reliable way to catch it anyway, but there really needs to be an image spam prevention, and one that prevents linking non-images since you can freeze someone by image tagging things like Linux ISOs (which can be prevented using wordfilter rules until then).
__________________
Quote:
Reply With Quote
  #8  
Old 12-23-2009, 08:54 PM
coreys coreys is offline
N-Pulse Assistant Manager
coreys's Avatar
Join Date: Mar 2005
Posts: 2,180
coreys has a spectacular aura about
Send a message via AIM to coreys Send a message via MSN to coreys Send a message via Yahoo to coreys
The PM spam crashing trick doesn't work on someone using Linux, I've found, now it just needs to be fixed for other platforms.
__________________

Quote:
*SlikRick: so should I even ask about your aim status?
*Xor: well if you want to
*Xor: but i am LARPING
*SlikRick: While on a computer?
*Xor: yes
*Xor: in my living room
*SlikRick: ahh
*Xor: i have a fort setup to hide from beasts
Reply With Quote
Reply


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 01:45 AM.


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