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 01-05-2011, 06:52 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
function onactiondoublemouse problem

hey guys im currently working on a script and i got a fail which i didnt know how to fix. this is pretty easy i guess but i dont have any idea how to fix

PHP Code:
function onactiondoublemouse () {
  
say2 say "/buy hat1" for this hat;

also tried this:
PHP Code:
function onCreated() {
  
this.buycmd "/buy hat1";
}
function 
onactiondoublemouse () {
  
say2 say "this.buycmd" for this hat;


i placed this in a npc which is playing a gani that only shows the hat (too lazy for icon). could that be the problem? because i also tried to put it into a noob npc which hat the same script (just other text):
PHP Code:
function onActionDoubleMouse() {
  
say2 test;

Reply With Quote
  #2  
Old 01-05-2011, 06:58 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
isn't there a problem with your double quotes in say2? I'd use something like

PHP Code:
say2("Say \"/buy hat1\" for this hat"); 
Reply With Quote
  #3  
Old 01-05-2011, 07:27 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
nope that also didnt work tried some stuff with that but no...

just realzied that you are also right with the quotes so i tried them again changed but no way (your way works on the normal noob npc so i´ll try with icon)
Reply With Quote
  #4  
Old 01-05-2011, 09:14 PM
Tigairius Tigairius is offline
The Cat
Tigairius's Avatar
Join Date: Jan 2007
Location: Missouri, USA
Posts: 4,240
Tigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant futureTigairius has a brilliant future
You are not being very clear about which problem you are encountering specifically. Are you receiving an error? Or is 'say2' simply not being executed?

Based on what little information was provided, I would suggest the following:

+ Include a setshape(1, 32, 32); inside of your onCreated() portion.
+ Do not mix Gscript1 with GScript2. The correct method to write your say2, would be:
PHP Code:
say2("say \"/buy hat1\" for this hat"); 
+ Try to change function onactiondoublemouse () { to function onActionDoubleMouse() {
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #5  
Old 01-07-2011, 06:50 PM
callimuc callimuc is offline
callimuc's Avatar
Join Date: Nov 2010
Location: Germany
Posts: 1,015
callimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to beholdcallimuc is a splendid one to behold
jea i already fixed it. like i said the npc was playing a gani which only showed the hat and maybe that was the problem idk. anyway i made icons of the hats and placed them, removed gani from script and it worked fine with the
PHP Code:
say2("say \"/buy hat1\" for this hat"); 
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:32 PM.


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