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 02-27-2010, 10:35 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Cool JKL's Scripting Questions

First I was wondering how do I make this so you grab it and then the box pops up? Right now when i put this in an NPC thing on offline editor and upload it, right after i upload it the box pops up and I click cancel and it doesn't come back.

PHP Code:
//#CLIENTSIDE
function onCreated()
{
  
openURL("http://wiki.graal.net");

__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #2  
Old 02-27-2010, 10:57 AM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Change onCreated() to onActionGrab()
Reply With Quote
  #3  
Old 02-27-2010, 11:01 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Unhappy

Quote:
Originally Posted by Mark Sir Link View Post
Change onCreated() to onActionGrab()
I Put this and used an image of my staff block for a test and it didn't work.

PHP Code:
//#CLIENTSIDE
function onActionGrab()
{
openURL("http://wiki.graal.net");

__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #4  
Old 02-27-2010, 11:08 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
onActionGrab isn't a global function. You'll have to use a triggeraction to make that function. Use the search feature on the forums.
__________________
Reply With Quote
  #5  
Old 02-27-2010, 11:15 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Unhappy

Quote:
Originally Posted by xAndrewx View Post
onActionGrab isn't a global function. You'll have to use a triggeraction to make that function. Use the search feature on the forums.
Would you be so kind to search it for me and then come back here and paste it in? :o

I do more of simple scripting such as like in a jukebox/music player I can copy the same thing over and over and insert the url's. Or something like a staff block script which i can change the images or whatever. I more so edit scripts rather than create them entirely.
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #6  
Old 02-27-2010, 11:20 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
http://forums.graalonline.com/forums...ad.php?t=68333
__________________
Reply With Quote
  #7  
Old 02-27-2010, 11:31 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Question did not help :[

Quote:
Originally Posted by xAndrewx View Post
Thank you, but I could NOT figure that out. Too many different posts, and after they figured it out they didn't even post the new script.

So can someone please help
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #8  
Old 02-27-2010, 11:36 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
It's in that thread- look again and read what they're saying. We're not supposed to give you the full code...
__________________
Reply With Quote
  #9  
Old 02-27-2010, 11:44 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Exclamation

Quote:
Originally Posted by xAndrewx View Post
It's in that thread- look again and read what they're saying. We're not supposed to give you the full code...
>.< I just need one little piece to finish this script
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?

Last edited by jkldogg; 02-27-2010 at 11:45 AM.. Reason: pissed
Reply With Quote
  #10  
Old 02-27-2010, 11:49 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Unhappy no work :(

I tried this and it didn't work:

PHP Code:
//#CLIENTSIDE
function onKeyPressed(codekey)
{
switch(
key)
{
case 
"a":
temp.gx player.1.5 vecx(player.dir) * 2;
temp.gy player.vecy(player.dir )* 2;
triggeraction(temp.gxtemp.gy"Grab";
break;
}
}
openURL("http://wiki.graal.net");

__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #11  
Old 02-27-2010, 12:11 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
triggeraction(temp.gx, temp.gy, "Grab", "");

Add that to a weapon (what you've just posted above) & then add it to a player, you'll then be able to use the function
HTML Code:
function onActionGrab() {
}
Good job
__________________
Reply With Quote
  #12  
Old 02-27-2010, 06:30 PM
Liberated Liberated is offline
not doing alot
Liberated's Avatar
Join Date: Feb 2008
Posts: 1,366
Liberated has a spectacular aura about
you could always try to use onPlayerTouchsMe()
although i always find it annoying that whenever i hit a sign, i suddenly get this lousy say2 message.

but it would immensly simplify some things
PHP Code:
//CLIENTSIDE
function onPlayerTouchsMe()
{
  
openURL("http://wiki.graal.net"); 

Reply With Quote
  #13  
Old 03-05-2010, 09:42 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Exclamation Inventory

I've got a problem with a script, It's in the code gallery, I do not take ownership of it. I want to make it so that I can replace the image it comes with, with an image of my own. But there isn't anything here that says like "IMG=" or anything of that sort. So I was wondering if someone could help me figure this out.

PHP Code:
function onActionServerSide() 

  if (
params[0] == "playerweaps") { 
    for (
0player.weapons.size(); ++) temp.imgs.add(findWeaponNPC(player.weapons[i]).image); 
    
triggerClient("gui"name"openinv"player.weaponstemp.imgs); 
  } 


//#CLIENTSIDE 
function onCreated() 

  
enablefeatures(allfeatures 4); 
  
this.gName "Inventory_"
  (
this.gName "Window0").destroy(); 
  
setTimer(.05); 


function 
onTimeOut() 

  
this.plWeapon player.weapon.name
  
showText(2006100"System""b""Selected Weapon:" SPC this.plWeapon SPC "[" selectedweapon "]"); 
  
changeImgVis(2004); 
   
  
setTimer(.05); 


function 
onKeyPressed(keynrkeyname

  if (
keyname == "q") { 
    if ((
this.gName "Window0").visible == falsetriggerServer("gui"name"playerweaps"); 
    else (
this.gName "Window0").destroy(); 
  } 


function 
onActionClientSide("",weaps,imgs

  if (
params[0] == "openinv"OpenInventory(weapsimgs); 


function 
OpenInventory(invWeaponsinvImages

  if ((
this.gName "Window0").visible == false) { 
    new 
GuiWindowCtrl(this.gName "Window0") { 
      
width 196height 177
      
screenwidth/width/2screenheight/height/2
     
      
canMinimize false
      
canMaximize false
      
canResize false
      
canMove false
      
destroyOnHide true
       
      
xmod NULL
      
ymod NULL
      
rowcount NULL
       
      
invItems NULL
      
// Removes old buttons 
      
for (0invItems.size(); ++) (this.gName "Button" i).destroy(); 
     
      
// Checks for items to display in inventory 
      
for (0invWeapons.size(); ++) { 
        if (!
invWeapons[i].starts("-")) invItems.add({invWeapons[i], invImages[i]}); 
      } 
       
      
// Displays the items 
      
new GuiScrollCtrl(this.gName "Scroll0") { 
        
width 187height 150
        
523
         
        
hScrollBar "alwaysOff"
        
vScrollBar "dynamic"
       
        for (
0invItems.size(); ++) { 
          
temp.var = 5
          if (
temp.var.length() == && 0) { 
            
xmod NULL
            
ymod += 36
            
rowcount ++; 
          } 
         
          new 
GuiBitmapButtonCtrl(this.gName "Button" i) { 
            
width 32height 32
            
xmodymod
           
            
this.itemname invItems[i][0]; 
            
this.itemimage invItems[i][1]; 
           
            
normalbitmap this.itemimage
            
mouseoverbitmap this.itemimage
            
pressedbitmap this.itemimage
           
            
thiso.catchevent(this"onMouseDown""onSlotPressed"); 
            
thiso.catchevent(this"onMouseEnter""onMouseOverSlot"); 
            
thiso.catchevent(this"onMouseLeave""onMouseExitSlot"); 
          } 
          
xmod += 32 4
        } 
      } 
    } 
    (
this.gName "Window0").makefirstresponder("false"); 
  } else (
this.gName "Window0").destroy(); 


function 
onSlotPressed(objkeymodifiermousescreenxmousescreenyclickcount

  if (
clickcount == 2) { 
    
player.chat "Selected Weapon:" SPC obj.itemname
    
selectedweapon player.weapons.index(findWeapon(obj.itemname)); 
    (
this.gName "Window0").destroy(); 
  } else if (
clickcount == 1) (this.gName "Window0").text obj.itemname


function 
onMouseOverSlot(obj) (this.gName "Window0").text obj.itemname
function 
onMouseExitSlot(obj) (this.gName "Window0").text ""
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #14  
Old 03-05-2010, 10:15 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
HTML Code:
    new GuiWindowCtrl(this.gName @ "Window0") {  
      useownprofile = true; 
      profile.bitmap = "your image here";
__________________
Reply With Quote
  #15  
Old 03-05-2010, 10:35 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Where exactly does that go? Would you mind copying the script and placing it in there and posting it for me?
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #16  
Old 03-05-2010, 10:43 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Quote:
Originally Posted by jkldogg View Post
Where exactly does that go? Would you mind copying the script and placing it in there and posting it for me?
Look in your script for
HTML Code:
  new GuiWindowCtrl(this.gName @ "Window0") { 
and put it in there
__________________
Reply With Quote
  #17  
Old 03-12-2010, 10:50 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Wink !

I figured it out, with the help of a nice guy named PowerPronL

PHP Code:
//#CLIENTSIDE
function onCreated() {
  
message Grab Me!;
}
function 
onActionGrab() {
  
openUrl("http://www.google.com");

__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #18  
Old 03-12-2010, 10:57 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
You're mixing GS1 and GS2 there.

message Grab me!; in GS2 is basically

this.chat = "Grab me!"; OR

message("Grab me!");
__________________
Quote:
Reply With Quote
  #19  
Old 03-12-2010, 11:13 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Talking !?!

Quote:
Originally Posted by fowlplay4 View Post
You're mixing GS1 and GS2 there.

message Grab me!; in GS2 is basically

this.chat = "Grab me!"; OR

message("Grab me!");
Why does that matter? Yeah, it says error, but it seems to work fine. You grab it and the link opens and the message is always on top of the image.
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #20  
Old 03-12-2010, 11:20 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Cool Jukebox (Chris Vimes)

SORRY FOR DOUBLE POSTING (this is my one thread for all my questions)

Having a little problem with this jukebox Chris Vimes made a while back. I personally love this script. I like to be able to listen to music in game rather than having Graal and Internet open. So that there's slightly less lag.

Anyways, the probably is when you start to play a song, if someone shoots a gun the song goes off. Help is appreciated, thanks in advance.

Here's the code

PHP Code:
////NO ONE TOUCH THIS, ask jkldogg to add songs
//#CLIENTSIDE
function onCreated() 

  
showJukebox(); 

function 
onKeyPressedcodekey 

  if ( 
key == "r" 
  { 
    
setTimer0.05 ); 
    
Jukebox_Window.visible Jukebox_Window.visible 1
    
GraalControl.makeFirstRespondertrue ); 
  } 

function 
onWeaponFired() 

  
say2"Press 'r' to toggle jukebox!" ); 

function 
showJukebox() 

  
playing this.playing
  
Jukebox_Window.destroy(); 
  new 
GuiWindowCtrl"Jukebox_Window" 
  { 
    
profile "GuiBlueWindowProfile"
    
width 280
    
height 120
    
screenwidth width
    
screenheight height
    
canClose canMinimize true
    
canMaximize canResize false
    
visible false
    
text "Jukebox -"SPC servername
    
useownprofile true
    
profile.transparency .9
    new 
GuiMLTextCtrl"Jukebox_Text" 
    { 
      
profile "GuiBlueTextProfile"
      
10
      
30
      
width 270
      
height 20
      
useownprofile true
      
profile.align "center"
      
text "<center>Now playing:" SPC playing
    } 
    new 
GuiPopUpMenuCtrl"Jukebox_List" 
    { 
      
profile "GuiBluePopUpMenuProfile"
      
width 260
      
height 20
      
10
      
50
      
textprofile "GuiBlueTextListProfile"
      
scrollprofile "GuiBlueScrollProfile"
      
clearRows(); 
      
temp.music = { 
      { 
"Young Jeezy - My President Is Black""http://dump.ninjapirat.org/files/18%20My%20President.mp3" },
      { 
"Eminem - Stay Wide Awake""http://www.downloads.nl/cgi-bin/mp3get.cgi?u=http%3A%2F%2Fbetruger.wrzuta.pl%2Fsr%2Ff%2F4dEUI3jrj34%2Feminem_-_stay_wide_awake.mp3&n=3" }, 
      { 
"Lil Wayne & Gucci Mane - We Be Steady Mobbin ""http://yoraps.com/music/lil_wayne-mobbin.mp3" }, 
      { 
"Gucci Mane - Lemonade""http://www.downloads.nl/cgi-bin/mp3get.cgi?u=http%3A%2F%2Fwww.djbobbytrends.com%2Fblog%2Fwp-content%2Fuploads%2F2009%2F11%2F03-Lemonade.mp3&n=2" }, 
      { 
"Iyaz - Replay""http://www.downloads.nl/cgi-bin/mp3get.cgi?u=http%3A%2F%2Fdoris9403.wrzuta.pl%2Fsr%2Ff%2F1IdqekCNy32%2Fiyaz_-_replay.mp3&n=10" }, 
      { 
"Eminem - The Way I Am ""http://cd04.static.jango.com/music/03/40/87/0340874277.mp3" }, 
      { 
"Eminem - When I'm Gone ""http://www.downloads.nl/cgi-bin/mp3get.cgi?u=http%3A%2F%2Fwww.myotherdrive.com%2Ffile%2F850.472605.02022008.03344.0067fi%2FEminem%2520-%2520When%2520Im%2520Gone%2520(dirty).mp3&n=5" },
      { 
"Eminem - Must Be The Ganja""http://www.downloads.nl/cgi-bin/mp3get.cgi?u=http%3A%2F%2Fkrwawy80.wrzuta.pl%2Fsr%2Ff%2F3QdmGxuaqDV%2Feminem_-_must_be_the_ganja_produced_by_dr._dre_and_mark_batson.mp3&n=7" },
      { 
"Eminem - Medicine Ball ""http://www.downloads.nl/cgi-bin/mp3get.cgi?u=http%3A%2F%2Fkrwawy80.wrzuta.pl%2Fsr%2Ff%2F20r1DvaoDFV%2Feminem_-_medicine_ball_produced_by_dr._dre_and_mark_batson.mp3&n=1" },
      { 
"Gucci Mane - Stupid Wild""http://www.downloads.nl/cgi-bin/mp3get.cgi?u=http%3A%2F%2Fwww.hilkoo.com%2Fwp-content%2Fuploads%2F2009%2F11%2FGucci-Mane-Ft-Lil-Wayne-Camron-Stupid-Wild-www.hilkoo.com.mp3&n=4" },
      { 
"Gucci Mane & Usher - Spotlight""http://c.wrzuta.pl/wa3958/5522c5c9001f5ff94ae34d6e/0/gucci%20mane%20ft.%20usher%20-%20spotlight.mp3?523.187163341582" },
      { 
"insane""http://www.mp3-center.org/download_mp3/Eminem/Insane/8109489" },
      { 
"song""http://www.yoraps.com/audios1.php?subaction=showfull&id=1267696186&archive=&start_from=&ucat=13&" },
      { 
"song""http://www.jamglue.com/tracks/9611377/popout" },
      { 
"Rihanna - Hard (Featuring Young Jeezy)""http://c.wrzuta.pl/wa3247/227e7f5b00031adb4b0ea70a/0/rihanna%20-%20hard%20%28featuring%20jeezy%29.mp3?743.254980545283" },
      { 
"Plies (Featuring Neyo) - Bust It Baby Remix""http://c.wrzuta.pl/wa793/13199862002be4fc484b789c/0/plies%20ft%20neyo-bust%20it%20baby%20remix.mp3?996.453801590508" },
      { 
"song""url!" },
      { 
"song""url!" },
      { 
"song""url!" },
      { 
"song""url!" },
      { 
"song""url!" },
      { 
"song""url!" },
      { 
"song""url!" },
      { 
"song""url!" },
      { 
"song""url!" },
      { 
"Eminem - Stan""http://images.mmosite.com/bbs/upload/temp/Stan.mp3" }};       
      for ( 
temp.0temp.temp.music.size(); temp.++ ) 
      { 
        
withaddRow0temp.music[temp.i][0] ) ) 
        { 
          
this.var = temp.music[temp.i][1]; 
        } 
      } 
      
setSelectedRow); 
      
sort(); 
    } 
    new 
GuiButtonCtrl"Jukebox_Stop" 
    { 
      
profile "GuiBlueButtonProfile"
      
width 75
      
height 30
      
Jukebox_Window.width - ( width ); 
      
Jukebox_Window.height 40
      
text "Stop Music"
    } 
  } 
  
stopmidi(); 
  
this.playing "[None]"
  
Jukebox_Text "Now playing: [None]"

function 
onTimeOut() 

  
this.time += .05;; 
  
setTimer0.05 ); 

function 
Jukebox_Stop.onAction() 

  
stopmidi(); 
  
this.playing "[None]"
  
Jukebox_Text "Now playing: [None]"

function 
Jukebox_List.onSelect() 

  if ( 
this.time 
  { 
  
this.playing params[1]; 
  
Jukebox_Text.text "Now playing:" SPC params[1]; 
  
playJukebox_List.rows[params[2]].var ); 
  } 

function 
onPlaytitlesong 

  
this.playing title
  
Jukebox_Text.text "Now playing:" SPC title
  
playsong ); 

__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?

Last edited by jkldogg; 03-12-2010 at 11:21 PM.. Reason: double post
Reply With Quote
  #21  
Old 03-12-2010, 11:31 PM
Mark Sir Link Mark Sir Link is offline
Kevin Azite
Mark Sir Link's Avatar
Join Date: Sep 2005
Posts: 1,489
Mark Sir Link is just really niceMark Sir Link is just really nice
Send a message via AIM to Mark Sir Link
Quote:
Originally Posted by jkldogg View Post
SORRY FOR DOUBLE POSTING (this is my one thread for all my questions)

Having a little problem with this jukebox Chris Vimes made a while back. I personally love this script. I like to be able to listen to music in game rather than having Graal and Internet open. So that there's slightly less lag.

Anyways, the probably is when you start to play a song, if someone shoots a gun the song goes off. Help is appreciated, thanks in advance.

Here's the code
when guns are fired, do they call the play() function rather than making the sound through a GANI?
Reply With Quote
  #22  
Old 03-12-2010, 11:35 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Lightbulb

Quote:
Originally Posted by Mark Sir Link View Post
when guns are fired, do they call the play() function rather than making the sound through a GANI?
My gun sounds are in the actual fire gani, i put the little yellow sound icon thingy
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #23  
Old 03-12-2010, 11:41 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Go top Options (F1) > Audio > Turn them all down other than radio?
__________________
Reply With Quote
  #24  
Old 03-12-2010, 11:47 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Angry

Quote:
Originally Posted by xAndrewx View Post
Go top Options (F1) > Audio > Turn them all down other than radio?
Same effect, except I couldn't hear the bullet lol...

Any other ideas? This is making me mad
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #25  
Old 03-12-2010, 11:50 PM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
ois- Era has them built in to ganis (last time I worked there...), if you open the gani and look right near the bottom you'll see a

HTML Code:
ANI
[WEIRD STUFF HERE]
PLAYSOUND sound.wav
[WEIRD STUFF HERE]
Try deleting that line? =o (PLAYSOUND)

An alternative would be to find an empty sound file and to replace the Era effects... :[
__________________
Reply With Quote
  #26  
Old 03-13-2010, 12:11 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Question no work :(

Quote:
Originally Posted by xAndrewx View Post
ois- Era has them built in to ganis (last time I worked there...), if you open the gani and look right near the bottom you'll see a

HTML Code:
ANI
[WEIRD STUFF HERE]
PLAYSOUND sound.wav
[WEIRD STUFF HERE]
Try deleting that line? =o (PLAYSOUND)

An alternative would be to find an empty sound file and to replace the Era effects... :[
hmmm hold on

EDIT: I don't know what you're talking about.

See Attachment
Attached Thumbnails
Click image for larger version

Name:	colt fire.PNG
Views:	132
Size:	16.0 KB
ID:	50553  
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?

Last edited by jkldogg; 03-13-2010 at 12:46 AM.. Reason: Tested it
Reply With Quote
  #27  
Old 03-13-2010, 01:00 AM
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
Mixing GS1 and GS2 is just another sign you have no interest in learning how to actually script. The only acceptable case for me personally is the character npcs created by the level editor but everything else is just a no-no.

Also, you have to open the Gani in a text editor.
__________________
Quote:
Reply With Quote
  #28  
Old 03-13-2010, 01:05 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Exclamation

Quote:
Originally Posted by fowlplay4 View Post
Mixing GS1 and GS2 is just another sign you have no interest in learning how to actually script. The only acceptable case for me personally is the character npcs created by the level editor but everything else is just a no-no.

Also, you have to open the Gani in a text editor.
What do you mean? I didn't make this script, chris did,; and he realeased it to the Code Gallery. I do want to learn scripting but, I don't have the patience for it.

How do I make the gun not turn off the song?
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #29  
Old 03-13-2010, 01:37 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
The jukebox isn't the problem, the problem is with your GANIs (or other sounds on the server).

Quote:
Originally Posted by jkldogg View Post
Why does that matter? Yeah, it says error, but it seems to work fine. You grab it and the link opens and the message is always on top of the image.
If you really want to become a scripter, you can't settle for what works. You have to go the extra mile and make it correct.
__________________
Reply With Quote
  #30  
Old 03-13-2010, 02:06 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Unhappy helpt?

Quote:
Originally Posted by cbk1994 View Post
The jukebox isn't the problem, the problem is with your GANIs (or other sounds on the server).



If you really want to become a scripter, you can't settle for what works. You have to go the extra mile and make it correct.
Okay, will you explain to me how to fix it? Or just come on the server and do it? Please and thank you.
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #31  
Old 03-13-2010, 02:49 AM
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
Quote:
Originally Posted by jkldogg View Post
Okay, will you explain to me how to fix it? Or just come on the server and do it? Please and thank you.
Andrew already suggested a way to fix it, check the ganis for your bullets and make sure you aren't using play to play the gun sound in your gun scripts.
__________________
Quote:
Reply With Quote
  #32  
Old 03-13-2010, 03:06 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Question !?!

Quote:
Originally Posted by fowlplay4 View Post
Andrew already suggested a way to fix it, check the ganis for your bullets and make sure you aren't using play to play the gun sound in your gun scripts.
Did you see my other post?!!? I showed the attachment and I don't know what the play sound is?
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #33  
Old 03-13-2010, 03:11 AM
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
Quote:
Originally Posted by jkldogg View Post
Did you see my other post?!!? I showed the attachment and I don't know what the play sound is?
And I said to open the suspected gani that's causing the problem with a text editor like notepad.
__________________
Quote:
Reply With Quote
  #34  
Old 03-13-2010, 03:19 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Thumbs up

Quote:
Originally Posted by fowlplay4 View Post
And I said to open the suspected gani that's causing the problem with a text editor like notepad.
Ah, okay.

This is what It said

HTML Code:
PLAYSOUND sound.wav 0.9375 -17.0625
PLAYSOUND sound.wav 0.75 17.375
What now?

---------


Quote:
Originally Posted by fowlplay4 View Post
You're mixing GS1 and GS2 there.

message Grab me!; in GS2 is basically

this.chat = "Grab me!"; OR

message("Grab me!");
PHP Code:
//#CLIENTSIDE
function onCreated() {
  
message("Grab me!");
}
function 
onActionGrab() {
  
openUrl("http://forums.graalonline.com/forums/showthread.php?t=134258011");

I tried your idea of the replace message thing but, i get errors. Although the script still works fine.. Scripting is confusing, how can you have an error and it works? But at the same time it's still the wrong type of script?


PHP Code:
ErrorMissing brackets end: ) 
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?

Last edited by jkldogg; 03-13-2010 at 03:31 AM.. Reason: double post
Reply With Quote
  #35  
Old 03-13-2010, 12:34 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 jkldogg View Post
I tried your idea of the replace message thing but, i get errors. Although the script still works fine.. Scripting is confusing, how can you have an error and it works? But at the same time it's still the wrong type of script?


PHP Code:
ErrorMissing brackets end: ) 
GS2 doesn't work offline. If you put the script in an actual script editor it won't give any errors.
__________________
Reply With Quote
  #36  
Old 03-13-2010, 05:38 PM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Question

Quote:
Originally Posted by cbk1994 View Post
GS2 doesn't work offline. If you put the script in an actual script editor it won't give any errors.
How do I fix the jukebox so the guns don't turn off the song?
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #37  
Old 03-13-2010, 05:58 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 jkldogg View Post
How do I fix the jukebox so the guns don't turn off the song?
Everyone else has already given you the answer; fix your GANIs, there's nothing wrong with the script.
__________________
Reply With Quote
  #38  
Old 03-14-2010, 05:09 AM
jkldogg jkldogg is offline
J.Rollin (killaz)
jkldogg's Avatar
Join Date: Feb 2010
Location: USA
Posts: 675
jkldogg can only hope to improve
Send a message via AIM to jkldogg Send a message via MSN to jkldogg
Angry

Quote:
Originally Posted by cbk1994 View Post
Everyone else has already given you the answer; fix your GANIs, there's nothing wrong with the script.
Okay, would you please tell me EXACTLY what to do?
__________________

PSN: jkldogg



The best post ever made on the graal forums.
After playing Graal Online for many years, JKL decides to make a forum account. Isn't life funny?
Reply With Quote
  #39  
Old 03-14-2010, 10:10 AM
xAndrewx xAndrewx is offline
Registered User
xAndrewx's Avatar
Join Date: Sep 2004
Posts: 5,260
xAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud ofxAndrewx has much to be proud of
Please re-read the thread.
__________________
Reply With Quote
  #40  
Old 03-14-2010, 03:24 PM
DrakilorP2P DrakilorP2P is offline
Registered User
DrakilorP2P's Avatar
Join Date: Apr 2006
Posts: 755
DrakilorP2P is just really niceDrakilorP2P is just really nice
Quote:
Originally Posted by xAndrewx View Post
Please re-read the thread.
Playing a gani with sound in it doesn't stop the jukebox, and neither does it stop if you do play("foo.wav"). I suppose there could be a gun sound played from URL somewhere.

jkldogg, you should probably just find someone to scan your scripts for you.
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 04:55 AM.


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