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 04-05-2007, 08:19 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
Someone give me something to script

Someone give me something to script i don't know what to make right now and i want to sharpen my skills
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #2  
Old 04-05-2007, 08:21 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
A radio.
Reply With Quote
  #3  
Old 04-05-2007, 09:06 PM
godofwarares godofwarares is offline
Webmaster
godofwarares's Avatar
Join Date: Dec 2006
Location: Florida
Posts: 552
godofwarares is on a distinguished road
Send a message via ICQ to godofwarares Send a message via AIM to godofwarares Send a message via MSN to godofwarares Send a message via Yahoo to godofwarares
Quote:
Originally Posted by Chandler View Post
A radio.
Check that. And make it with volume alteration options :]
__________________
What signature? I see no signature?
Reply With Quote
  #4  
Old 04-05-2007, 09:33 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
is it possible to adjust the sound?? i used the setmusicvolume command and it just muted it
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #5  
Old 04-05-2007, 10:03 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
NPC Code:

//Made by Xaxen
// Breakdown of Script
//Commands volume 0, volume 1, volume 2, volume 3, Radio Off
//
if (created) {

toweapons Radio;
}
if (weaponfired){
set radio_enabled;

if (radio_enabled)
say2 You can adjust which speaker you
#bwant music to come out of.
#b---------------------------
#bIf you say "volume 0" it will mute
#bthe radio.
#bIf you say "volume 1" the music
#bwill come out of the right speaker
#bIf you say "volume 2" the music
#bwill come out of the left speaker
#bIf you say "volume 3" it will
#bplay normally and Radio off to
#bturn off the radio;
}
if (playersays(Volume 0)){
play yohokiworld.mid;
setmusicvolume 0,0;
}
if (playersays(Volume 1)){
play yohokiworld.mid;
setmusicvolume 1,0;
}
if (playersays(Volume 2)){
play yohokiworld.mid;
setmusicvolume 0,1;
}
if (playersays(Volume 3)){
play yohokiworld.mid;
setmusicvolume 1,2;
}
if (playersays(Radio Off)){
stopsound yohokiworld.mid;
}



-------------------------------------

thats what i got its nothing amazing
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #6  
Old 04-05-2007, 10:25 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Dude...
#1. you need to learn GScript2
#2. playersays() was deprecated even when I started scripting with GS1
#3. toweapons() is also deprecated with the introduction of the NPC Server.

Offline scripting is a simple waste of time.
PHP Code:
function onCreated() {
  
// do not use toweapons.
  // even if you did use it, it would be under onPlayerTouchsMe()
}
function 
onWeaponFired() {
  
say2("text");
}
function 
onPlayerChats() {
  if (
player.chat == "volume 0") {
    
// stuff
  
}
  else if (
player.chat == "volume 1") {
    
// stuff
  
}

Learning to use tokens would also be a good thing.
__________________
Reply With Quote
  #7  
Old 04-05-2007, 10:45 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
well i want to learn gscript2 but there isn't a server i can go to. I don't have a gold or vip account
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #8  
Old 04-05-2007, 10:49 PM
Inverness Inverness is offline
Incubator
Inverness's Avatar
Join Date: Aug 2004
Location: Houston, Texas
Posts: 3,613
Inverness is a jewel in the roughInverness is a jewel in the rough
Quote:
Originally Posted by PrinceOfKenshin View Post
well i want to learn gscript2 but there isn't a server i can go to. I don't have a gold or vip account
Well I don't know what to say then, you'll need to get a vip at least if you want to be able to work with GS2.
Learning GS1 will just be a waste of effort. It would probably be more beneficial for you to go learn Java or some C++ to get the object-oriented mentality needed for good GS2 scripting.
__________________
Reply With Quote
  #9  
Old 04-05-2007, 10:54 PM
PrinceOfKenshin PrinceOfKenshin is offline
That guy with a beard
PrinceOfKenshin's Avatar
Join Date: May 2004
Location: Ontario, Canada
Posts: 819
PrinceOfKenshin has a spectacular aura aboutPrinceOfKenshin has a spectacular aura about
yea i just got to look at it for a while because i Know visual basics and im taking Java in the summer. Thanks for the advice
__________________


Quote:
Game Master (Server): Greetings PrinceOfKenshin, there are new posts on the forums that demand your urgent attention! God speed, the fate of the world is in your hands. If you fail, middle earth will forever be in the darkness and your children will be enslaved by McKain.
Reply With Quote
  #10  
Old 04-06-2007, 06:14 AM
Angel_Light Angel_Light is offline
Varia Developer
Angel_Light's Avatar
Join Date: Nov 2005
Location: Knoxville, TN
Posts: 1,684
Angel_Light is on a distinguished road
Send a message via AIM to Angel_Light Send a message via MSN to Angel_Light
Make script to find the answer to pi. :P How about make an awesome particle engine effect.
__________________
Deep into the Darkness peering...
Reply With Quote
  #11  
Old 04-06-2007, 06:16 AM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
Quote:
Originally Posted by Angel_Light View Post
Make script to find the answer to pi. :P
PHP Code:
function onCreated()
  echo(
pi); 
Reply With Quote
  #12  
Old 04-06-2007, 06:21 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
22/7+hugeassnon-obtainablepc
Reply With Quote
  #13  
Old 04-06-2007, 07:08 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
A script that tells you what to script. o_O
Reply With Quote
  #14  
Old 04-06-2007, 07:57 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
Script some tigers.
__________________
Reply With Quote
  #15  
Old 04-09-2007, 11:03 PM
Rapidwolve Rapidwolve is offline
Registered User
Join Date: Jul 2006
Posts: 1,241
Rapidwolve is an unknown quantity at this point
A complex mudlib yay
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:00 AM.


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