Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 05-18-2008, 01:24 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Class troubles...

This is in my weapon script, a Shovel.
PHP Code:
temp.putnpc2(temp.xx,temp.yy,"join shovel_misc1;");
with(findNPC(temp.i))this.owner player.account
shovel_misc1 Class:
PHP Code:
function onCreated() {
  
setshape(1,32,32);
}
//#CLIENTSIDE
function onCreated() {
  
setshape(1,32,32);
  
showimg(666,"block.png",x,y);
  
message(this.owner);

Anyone know it won't display the message.
I've also tried:

with(temp.i)this.owner = player.account;
temp.i.owner = player.account;
Reply With Quote
  #2  
Old 05-18-2008, 02:07 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
You're setting this.owner serverside to it. I suggest setting an attr, so that you can access it clientside as well.
__________________
Reply With Quote
  #3  
Old 05-18-2008, 02:10 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
hmm, why the use of findnpc()?

PHP Code:
temp.putnpc2(temp.xx,temp.yy,"join shovel_misc1;");
// putnpc2 returns an oject, so 'temp.i' will point to the npc/object that was placed at x,y

with(temp.ithis.owner playero.account
and you probably have to use an attr to make the info accessable as Chris said

PHP Code:
temp.putnpc2(xxyy"");
temp.i.join("shovel_misc1");
temp.i.attr[30] = player.account
and in shovel_misc1:
PHP Code:
function onCreated() {
  echo(
this.attr[30]);
}

//#CLIENTSIDE
function onCreated() {
  
message(this.attr[30]);

or something like that
__________________
Reply With Quote
  #4  
Old 05-18-2008, 02:21 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Shovel:
PHP Code:
temp.putnpc2(temp.xx,temp.yy,"");
temp.i.join("shovel_misc1");
temp.i.attr[30] = player.account
Class shovel_misc1:
PHP Code:
function onCreated() {
  
setshape(1,32,32);
}

//#CLIENTSIDE
function onCreated() {
  
setshape(1,32,32);
  
showimg(666,"block.png",x,y);
  echo(
this.attr[30]);

It still doesn't work.. meh...
Reply With Quote
  #5  
Old 05-18-2008, 03:17 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
hmm, checked if it sets attr[30]? (echo(temp.i.attr[30]);)

and, tried something like echo("hello"); in the onCreated event in the shovel_misc1 class?
__________________
Reply With Quote
  #6  
Old 05-18-2008, 03:22 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
Quote:
Originally Posted by Stryke View Post
Shovel:
PHP Code:
temp.putnpc2(temp.xx,temp.yy,"");
temp.i.join("shovel_misc1");
temp.i.attr[30] = player.account
Class shovel_misc1:
PHP Code:
function onCreated() {
  
setshape(1,32,32);
}

//#CLIENTSIDE
function onCreated() {
  
setshape(1,32,32);
  
showimg(666,"block.png",x,y);
  echo(
this.attr[30]);

It still doesn't work.. meh...
Why are you showing an image with an index of 666?
__________________
Reply With Quote
  #7  
Old 05-18-2008, 03:25 AM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Quote:
Originally Posted by cbk1994 View Post
Why are you showing an image with an index of 666?
lmao, weird use of number I must say xD
__________________
Reply With Quote
  #8  
Old 05-18-2008, 08:40 AM
Stryke Stryke is offline
Scripter
Join Date: Apr 2008
Posts: 157
Stryke is an unknown quantity at this point
Solved, changed the image number to 665.
Actually, just displayed the text on the serverside seeing as attr's don't work.
Reply With Quote
  #9  
Old 05-18-2008, 03:28 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
Quote:
Originally Posted by Stryke View Post
Solved, changed the image number to 665.
Actually, just displayed the text on the serverside seeing as attr's don't work.
Judging from the amounts of threads created by you the last week, I'd say you're the one that doesn't "work". Instead of not listening to our advice, how about you go read up on the wiki a little more?
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #10  
Old 05-18-2008, 03:45 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by xXziroXx View Post
Judging from the amounts of threads created by you the last week, I'd say you're the one that doesn't "work". Instead of not listening to our advice, how about you go read up on the wiki a little more?
he's learning, isn't this forum based upon asking for help anyway?
Ignore Ziro, the ScrIpt0r, he's just failed at life.
Reply With Quote
  #11  
Old 05-18-2008, 04:21 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 Stryke View Post
Solved, changed the image number to 665.
Actually, just displayed the text on the serverside seeing as attr's don't work.
Ah, I knew changing the index would fix it
Quote:
Originally Posted by xXziroXx View Post
Judging from the amounts of threads created by you the last week, I'd say you're the one that doesn't "work". Instead of not listening to our advice, how about you go read up on the wiki a little more?
He's a decent scripter, but I agree he does cry for help a bit much instead of trying to solve it himself.
Quote:
Originally Posted by [email protected] View Post
Ignore Ziro, the ScrIpt0r, he's just failed at life.
Yes, especially coming from the guy pretending to be a girl
__________________
Reply With Quote
  #12  
Old 05-18-2008, 04:32 PM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by cbk1994 View Post
Yes, especially coming from the guy pretending to be a girl
yes, because that's how you fail in life apparantly. o_O
Reply With Quote
  #13  
Old 05-18-2008, 05:13 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 [email protected] View Post
yes, because that's how you fail in life apparantly. o_O
Kinda sorta.
__________________
Reply With Quote
  #14  
Old 05-18-2008, 06:34 PM
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
I suggest getting buddy buddy with a scripter or two so you can comfortably ask them for help via another means. It feels a lot better than asking for a solution to every problem on the forum.
Reply With Quote
  #15  
Old 05-18-2008, 06:39 PM
Robin Robin is offline
The secret of NIMH
Robin's Avatar
Join Date: Apr 2005
Location: Wales, UK
Posts: 515
Robin will become famous soon enough
Send a message via AIM to Robin
Personally I don't mind him asking for help on every single problem.

What I do mind however, is the fact he deletes his threads afterwards. What about leaving them there for others?
__________________

Reply With Quote
  #16  
Old 05-18-2008, 07:36 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
I agree, Skyld should undelete them :/
__________________
Reply With Quote
  #17  
Old 05-18-2008, 11:53 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
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
I don't have a problem with him making a billion of threads, I do however have a problem when he's not listening to the advise given and then says it doesn't work.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #18  
Old 05-19-2008, 12:01 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
Quote:
Originally Posted by xXziroXx View Post
I don't have a problem with him making a billion of threads, I do however have a problem when he's not listening to the advise given and then says it doesn't work.
What are you talking about? He obviously knows better than us

He posts to give us a challenge, while he is the supreme scripter
__________________
Reply With Quote
  #19  
Old 05-19-2008, 08:30 AM
[email protected] sid.gottlieb@googlemail.com is offline
Banned
Join Date: Mar 2008
Posts: 861
sid.gottlieb@googlemail.com will become famous soon enough
Quote:
Originally Posted by cbk1994 View Post
What are you talking about? He obviously knows better than us

He posts to give us a challenge, while he is the supreme scripter
were you always this arrogant?
Reply With Quote
  #20  
Old 05-19-2008, 08:49 AM
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
Quote:
Originally Posted by Robin View Post
Personally I don't mind him asking for help on every single problem.

What I do mind however, is the fact he deletes his threads afterwards. What about leaving them there for others?
I already complained about him doing that after he closed the other two that say "SOLVED," and I don't think he does that anymore.
__________________


“Shoot for the moon. Even if you miss, you'll land among the stars.”
Reply With Quote
  #21  
Old 05-20-2008, 01:05 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
Quote:
Originally Posted by [email protected] View Post
were you always this arrogant?
Yes.
__________________
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 06:42 AM.


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