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-10-2012, 01:48 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
PM Display

Just a simple script to display the PM icon and text of how many PM's you have. Note if the same person sends you a PM it will only display as one from each person, not sure why. Something to do with the way shared.pmswaiting() works.
Anyway here's the script if anyone wants it.
Also upload pm_icon.png to your server.
PHP Code:
//#CLIENTSIDE
function onPM(){ //Invoked when the player receives a PM.
  
onTimeout(); 
}
function 
onTimeout(){
  
temp.pms shared.pmswaiting().size(); //Array of PM's
  
if(pms 0){
    
this.mode = !this.mode//Toggles a boolean to flash PM icon etc.
    
temp.this.mode//this. doesn't work inside with(findimg)...
    
with(findimg(500)){ //Show the PM icon image.
      
image "pm_icon.png";
      
layer 4;
      
alpha = (0);
      
screenwidth 50;
      
10;
    }
    
with(findimg(501)){ //Show the text.
      
text pms;
      
screenwidth 30;
      
5;
      
layer 4;
      
alpha = (0);
    }
    
settimer(0.5);
  }else{
    
//The player has no PM's waiting.
    
hideimgs(500501); //Hide the image and text.
  
}

Attached Images
 
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #2  
Old 12-10-2012, 02:24 PM
scriptless scriptless is offline
Banned
Join Date: Dec 2008
Location: N-Pulse
Posts: 1,412
scriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to beholdscriptless is a splendid one to behold
Code Gallery?
Reply With Quote
  #3  
Old 12-10-2012, 03:01 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
It was sort of a half half, being this isn't really code gallery worthy.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #4  
Old 12-11-2012, 06:32 AM
Vlad1 Vlad1 is offline
Registered User
Join Date: Apr 2012
Posts: 30
Vlad1 can only hope to improve
although would it be appropriate for servers as it is currently in use in Iera and IClassic so you should probably get snk and xors consent
Reply With Quote
  #5  
Old 12-11-2012, 09:06 AM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
What? O_o
None of what you just said made any sense.
Why would I need anyone's approval?..
It's just a simple script to display PM's, snk or xor don't own the rights of shared.pmswaiting();.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
Reply With Quote
  #6  
Old 12-11-2012, 12:56 PM
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 Vlad1 View Post
although would it be appropriate for servers as it is currently in use in Iera and IClassic so you should probably get snk and xors consent
The iPhone servers do not use the classic PM system. Additionally, this idea is hardly unique on Graal.
__________________
Reply With Quote
  #7  
Old 12-11-2012, 01:53 PM
Gunderak Gunderak is offline
Coder
Gunderak's Avatar
Join Date: Jun 2011
Location: Australia
Posts: 795
Gunderak is on a distinguished road
Quote:
Originally Posted by cbk1994 View Post
The iPhone servers do not use the classic PM system. Additionally, this idea is hardly unique on Graal.
This.
__________________

Gund for president.

Remote PM {P*}x (Graal813044) from eraiphone -> Stefan: I hav 1 qustion
*Gunderak: he hav 1
*Gunderak: qustion
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 02:33 PM.


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