Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Problem. (https://forums.graalonline.com/forums/showthread.php?t=72994)

contiga 03-22-2007 03:08 PM

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]; 


Chandler 03-22-2007 03:12 PM

PHP Code:

temp.npc.attr[2] = temp.newamm

Maybe?

contiga 03-22-2007 03:33 PM

Quote:

Originally Posted by Chandler (Post 1291699)
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


Kristi 03-23-2007 09:01 AM

Quote:

Originally Posted by contiga (Post 1291705)
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

contiga 03-23-2007 02:15 PM

Quote:

Originally Posted by Kristi (Post 1292082)
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

Kristi 03-24-2007 07:11 AM

Quote:

Originally Posted by contiga (Post 1292132)
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)

Admins 03-24-2007 04:05 PM

Quote:

Originally Posted by contiga (Post 1291695)
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 :D Trigger the npc to activate it (temp.npc.trigger("whatever","")), then it will send the updated attributes to everyone who is seeing it.

contiga 03-24-2007 08:11 PM

Quote:

Originally Posted by Stefan (Post 1292563)
You know :D Trigger the npc to activate it (temp.npc.trigger("whatever","")), then it will send the updated attributes to everyone who is seeing it.

Thanks ^^


All times are GMT +2. The time now is 04:29 PM.

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