Graal Forums  

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

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 08-24-2009, 06:36 PM
sssssssssss sssssssssss is offline
Cyril Rain
sssssssssss's Avatar
Join Date: May 2003
Location: Texas, USA
Posts: 1,134
sssssssssss will become famous soon enough
Very VERY simple donation box.

Uses a serverr.flag. Noticed there wasen't one here at all. I know this is simple and easy, but soom scriptin newbie will be happy it's here.
Has access for only one person to get rupees out. Keep my name in it or else.

PHP Code:
//created by Cyril (SDE)
function onCreated(){
  
this.setshape(13232);
  
server.myrupees;
}
function 
onPlayerChats()
  {
  if (
player.chat.starts("donate"))
    {
    
temp.takerupees player.chat.tokenize()[1];
    
serverr.myrupees += temp.takerupees;
    
player.rupees -= temp.takerupees;
    
clientr.myrupees += temp.takerupees;
  }
  if (
player.chat.starts("take"))
    {
    if (
player.account == "Account Name")
      {
      if (!(
serverr.myrupees 0))
        {
        
temp.prupees player.chat.tokenize()[1];
        if (!(
serverr.myrupees temp.prupees))
          {
          
player.rupees += temp.prupees;
          
serverr.myrupees -= temp.prupees;
        }
      }
    }
  }
}

//#CLIENTSIDE
function onPlayerEnters(){
  
this.chat "Rupees: " serverr.myrupees "";
}
function 
onPlayerTouchsMe(){
  
say2("You have contributed
  " 
clientr.myrupees "
  Rupees"
);

__________________
Cyril Rain
Creator and leader of SLX
Admin of Elysium
Elysium's Facebook Page: http://facebook.com/GraalOnlineElysium
Graal Forum Thread: http://forums.graalonline.com...
Graalians Thread: http://www.graalians.com...



Last edited by sssssssssss; 08-24-2009 at 07:53 PM..
Reply With Quote
 


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 11:18 PM.


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