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 03-22-2007, 03:08 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Problem.

This little script should mix up 2 of my dropped items (if they are the same), increasing the ammount on the serverside works perfect, actually it just works perfect at all.. but on the clientside, when I mouse over the item, it shows the "White Fung Yi San Sword x <ammount>", well.. when I have changed the ammount, the this.attr[ 2] only updates (on the clientside) when I click on the item or so, maybe because a trigger is sent, who knows!

Anyone that knows how to fix this? (So that it DOES update the this.attr[ 2] on the clientside immediatly?)

On serverside
PHP Code:
this.check getareanpcsthis.1this.144);
if ( 
this.check != null) {
  for ( 
temp.0temp.this.check.size(); temp.++) {
    
temp.npc npcsthis.checktemp.n]];
    if ( 
temp.npc.attr3] == "...") {
      if ( 
temp.npc.item.arc == this.item.arc) {
        
temp.newamm temp.npc.attr2] + this.item.amm;
        
temp.npc.item.amm temp.npc.attr2] = temp.newamm;
        
this.destroy();
      }
    }
  }

On clientside (in a timeout)
PHP Code:
findImg200).text this.attr1] @ " x" this.attr2]; 
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #2  
Old 03-22-2007, 03:12 PM
Chandler Chandler is offline
Banned
Join Date: Jan 2007
Posts: 656
Chandler will become famous soon enough
PHP Code:
temp.npc.attr[2] = temp.newamm
Maybe?
Reply With Quote
  #3  
Old 03-22-2007, 03:33 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by Chandler View Post
PHP Code:
temp.npc.attr[2] = temp.newamm
Maybe?
This is what I did.. should work the same, I tried it "alone" also...
It sets the ATTR2 correctly.. it's just not loading it immediatly to the clientside too, I first have to click the object or something like that
PHP Code:
temp.npc.item.amm temp.npc.attr2] = temp.newamm
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #4  
Old 03-23-2007, 09:01 AM
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
Quote:
Originally Posted by contiga View Post
I first have to click the object or something like that
Can i see your click code clientside (or the something like that code)

I timeout attrs all the time, and it works fine. maybe its something with using findimg(whatever).text = ;

maybe you have to reshow the image ::shrug::

Id like to see the click code
__________________
Reply With Quote
  #5  
Old 03-23-2007, 02:15 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by Kristi View Post
Can i see your click code clientside (or the something like that code)

I timeout attrs all the time, and it works fine. maybe its something with using findimg(whatever).text = ;

maybe you have to reshow the image ::shrug::

Id like to see the click code
Well the thing is, there's no real click code, it just somehow updates when I am clicking the object.. when I do message( this.attr[ 2]); it also shows the wrong ammount, untill I click the item. So it's really some engine problem I think :S
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
Reply With Quote
  #6  
Old 03-24-2007, 07:11 AM
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
Quote:
Originally Posted by contiga View Post
Well the thing is, there's no real click code, it just somehow updates when I am clicking the object.. when I do message( this.attr[ 2]); it also shows the wrong ammount, untill I click the item. So it's really some engine problem I think :S
try completely recreating the image (showtext oldstyle)
__________________
Reply With Quote
  #7  
Old 03-24-2007, 04:05 PM
Admins Admins is offline
Graal Administration
Join Date: Jan 2000
Location: Admins
Posts: 11,693
Admins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud ofAdmins has much to be proud of
Quote:
Originally Posted by contiga View Post
the this.attr[ 2] only updates (on the clientside) when I click on the item or so, maybe because a trigger is sent, who knows!
You know Trigger the npc to activate it (temp.npc.trigger("whatever","")), then it will send the updated attributes to everyone who is seeing it.
Reply With Quote
  #8  
Old 03-24-2007, 08:11 PM
contiga contiga is offline
Graal2001 Administration
contiga's Avatar
Join Date: Jul 2004
Location: Netherlands
Posts: 419
contiga is an unknown quantity at this point
Send a message via ICQ to contiga Send a message via AIM to contiga Send a message via MSN to contiga Send a message via Yahoo to contiga
Quote:
Originally Posted by Stefan View Post
You know Trigger the npc to activate it (temp.npc.trigger("whatever","")), then it will send the updated attributes to everyone who is seeing it.
Thanks
__________________
AIM: Contiga122
MSN: [email protected]
Status:
Quote:
Originally Posted by unixmad View Post
I am also awake 3AM to help correct problems.
Quote:
Originally Posted by Bomy Island RC people
Daniel: HoudiniMan is a bad guy =p
*Bell: rofl. I first read that as houdini is a bad man. like the little kid that wants his mommy to keep her away from that boogie man
Daniel: xD
*Rufus: I wouldn't want my kids around him.
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 10:04 PM.


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