| 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 = getareanpcs( this.x - 1, this.y - 1, 4, 4); if ( this.check != null) { for ( temp.n = 0; temp.n < this.check.size(); temp.n ++) { temp.npc = npcs[ this.check[ temp.n]]; if ( temp.npc.attr[ 3] == "...") { if ( temp.npc.item.arc == this.item.arc) { temp.newamm = temp.npc.attr[ 2] + this.item.amm; temp.npc.item.amm = temp.npc.attr[ 2] = temp.newamm; this.destroy(); } } } }
On clientside (in a timeout)
PHP Code:
findImg( 200).text = this.attr[ 1] @ " x" @ this.attr[ 2];
|