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
  #16  
Old 08-18-2008, 05:19 PM
Kristi Kristi is offline
Bowie's Deciple
Kristi's Avatar
Join Date: Dec 2003
Location: Boston, MA
Posts: 748
Kristi has a spectacular aura aboutKristi has a spectacular aura about
Send a message via AIM to Kristi Send a message via MSN to Kristi
Quote:
Originally Posted by Tigairius View Post
I don't see why Skyld can't upload it for you if they're already made.. ?
That would make my job rather silly
__________________
Reply With Quote
  #17  
Old 08-18-2008, 06:01 PM
Cloven Cloven is offline
Delteria
Cloven's Avatar
Join Date: Dec 2006
Location: Florida, United States
Posts: 542
Cloven has a spectacular aura about
Send a message via AIM to Cloven
Quote:
Originally Posted by Kristi View Post
That would make my job rather silly
Or not..
Reply With Quote
  #18  
Old 08-20-2008, 12:34 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Okay, these functions are now available on the main login server, for all players and servers.
Reply With Quote
  #19  
Old 09-14-2008, 07:26 PM
devilsknite1 devilsknite1 is offline
C:
devilsknite1's Avatar
Join Date: Jul 2006
Location: Florida, USA
Posts: 269
devilsknite1 has a spectacular aura about
Send a message via AIM to devilsknite1 Send a message via MSN to devilsknite1 Send a message via Yahoo to devilsknite1
I just fell in love / fainted / any other word here. YAY! <3
Reply With Quote
  #20  
Old 05-30-2009, 01:27 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Added shared.getAlignmentColor(int ap); and shared.getAlignmentShadowColor(int red, int green, int blue); by request, both returning an array of {red, green, blue}.
Reply With Quote
  #21  
Old 05-30-2009, 02:02 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
Could you perhaps add my replacetext function(or a better one, as long as one is available)?

http://forums.graalonline.com/forums...ad.php?t=82820
Reply With Quote
  #22  
Old 05-30-2009, 02:10 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by DustyPorViva View Post
Could you perhaps add my replacetext function(or a better one, as long as one is available)?

http://forums.graalonline.com/forums...ad.php?t=82820
Added it to shared.replacetext(string, search, replace).

Also added a function called shared.getSharedFunctions() which returns an array of public functions provided by the shared function pack.
Reply With Quote
  #23  
Old 05-30-2009, 11:17 AM
Crow Crow is offline
ǝɔɐɹq ʎןɹnɔ
Crow's Avatar
Join Date: Dec 2006
Location: Germany
Posts: 5,153
Crow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond reputeCrow has a reputation beyond repute
Awesome Skyld, thank you!
__________________
Reply With Quote
  #24  
Old 05-30-2009, 02:14 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Quote:
Originally Posted by Skyld View Post
Added shared.getAlignmentColor(int ap); and shared.getAlignmentShadowColor(int red, int green, int blue); by request, both returning an array of {red, green, blue}.
Quote:
Originally Posted by Skyld View Post
Added it to shared.replacetext(string, search, replace).

Also added a function called shared.getSharedFunctions() which returns an array of public functions provided by the shared function pack.
These things are pretty nice
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #25  
Old 06-20-2009, 09:34 PM
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
Could you also add this?
PHP Code:
function tiles(cx,cy,cw,ch) {
  
temp.ctiles = new[0];
  for (
temp.i=0;i<cw*ch;i++) {
    
ctiles.add(tiles[int(cx+(i%cw)),int(cy+int(i/cw))]);
  }
  return 
ctiles;

player.chat = tiles(x,y,width,height);
Would return an array of all tiles within the 'blocl' given. I get tired of having to run loops all the time to check a block of tiles.
Reply With Quote
  #26  
Old 06-29-2009, 07:41 PM
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
The AP shadow function returns 0,0,0 for gold ap, which isn't right.

It should have a check:
if (params[0] == 224 && params[1] == 196 && params[2] == 0) return {255,255,0};

Or something like that.
Reply With Quote
  #27  
Old 07-18-2009, 08:20 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
Couldn't hurt..

PHP Code:
function capitalize(str) {
  return 
str.charat(0).upper() @ str.substring(1);

__________________
Quote:
Reply With Quote
  #28  
Old 01-06-2010, 02:38 AM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
Added a new clientside function, you can access it like so:
PHP Code:
shared.adminMessage("You have been disconnected because you did not move for more than 30 minutes."); 
It supports html tags as well.

Attached a screenshot of it so you know what it's doing.

Basically, it'll open a window (like so) that will remain open even when changing servers, so, for example, if you wanted to open a window before you serverwarp() someone, it's possible now, and they will see the message even when they're on the login server.
Attached Thumbnails
Click image for larger version

Name:	loginadminmsg.jpg
Views:	1681
Size:	346.8 KB
ID:	50144  
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #29  
Old 01-06-2010, 05:02 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
Yes please?

PHP Code:
function repeat(char,num) {
  
temp.output "";
  for (
temp.i=0;i<num;i++) output @= char;
  return 
output;

I ran into a script earlier that made me wish there was a repeat character function. I think something like this would be useful for anyone who needs to format text.

Also, with these functions are variable names an issue? For example, if I use shared.repeat(" ",5) in a loop that also uses temp.i, is it going to break?
Reply With Quote
  #30  
Old 01-06-2010, 05:11 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 DustyPorViva View Post
Also, with these functions are variable names an issue? For example, if I use shared.repeat(" ",5) in a loop that also uses temp.i, is it going to break?
temp variables are specific to the function, so no.
__________________
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:02 PM.


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