Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-26-2016, 08:55 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
RC Russian Roulette

Cool RC game I made.

PHP Code:
// Add to your Control-NPC

function onRCChat() {
  if (
params[0in {"rr""russianroulette"}) {
    
rr_game();
    return;
  }
}

function 
rr_game() {
  if (
this.bullets == 0) {
    
this.bullets 6;
    
this.bullet int(random(0,6));
    
sendtorc("A new revolver has been loaded by " player.account ". /npc russianroulette to play.");
  } else {
    if (
player.account == this.lastshot) {
      
sendtorc("Wait for someone else to pull the trigger " player.account ".");
      return;
    } else {
      
this.lastshot player.account;
    }
    
this.bullets--;
    if (
this.bullets == this.bullet) {
      
sendtorc(format("/disconnect %s \"bang\""player.account));
      
this.bullets 0;
    } else {
      
sendtorc("Click! You are safe " player.account);
    }
    if (
this.bullets == 1) {
      
this.bullets 6;
      
this.bullet int(random(0,6));
      
sendtorc("The revolver cylinder has been spun.");
    }
  }

__________________
Quote:
Reply With Quote
  #2  
Old 07-27-2016, 04:52 AM
Cubes Cubes is offline
Registered User
Cubes's Avatar
Join Date: Dec 2005
Location: Chesapeake, Virginia
Posts: 498
Cubes is a jewel in the roughCubes is a jewel in the rough
could be more fun if it reset and banned someone randomly
Reply With Quote
  #3  
Old 07-27-2016, 07:23 AM
PlanetOscar PlanetOscar is offline
Registered User
Join Date: Aug 2015
Location: Sweden
Posts: 177
PlanetOscar is just really nicePlanetOscar is just really nice
Hehe, Cool
Reply With Quote
  #4  
Old 07-27-2016, 09:00 AM
Elk Elk is offline
Sr Marketing Strategist
Elk's Avatar
Join Date: Nov 2005
Location: Deerland
Posts: 3,829
Elk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant futureElk has a brilliant future
Send a message via ICQ to Elk Send a message via AIM to Elk Send a message via MSN to Elk Send a message via Yahoo to Elk
could be used for tedious assignments handed out to specific staffs randomly
__________________
iEra IGN: *Elk (Darkshire)
iCla. IGN: *Elk (Darkshire)
iZone IGN: *Elk (Darkshire)




Reply With Quote
  #5  
Old 07-27-2016, 03:11 PM
xXziroXx xXziroXx is offline
Master of Puppets
xXziroXx's Avatar
Join Date: May 2004
Location: Sweden
Posts: 5,288
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Send a message via AIM to xXziroXx Send a message via MSN to xXziroXx
is this twitch chat
__________________

"A delayed game is eventually good, but a rushed game is forever bad." - Shigeru Miyamoto
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 12:41 AM.


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