V
Reaction score
123

Joined
Last seen

Profile posts Latest activity Postings Trophies About

  • You wouldn't know how to restrict the client from inputting a mouse wheel scroll if it is not hovering over the game scene would you?
    (for mouse scroll zooming) been trying to figure that one out for over a week lol
    This is the opcode impl:

    Code:
    if (op == ClientScriptOpCode.SCALE) {
    	isp -= 3;
    	long a = intStack[isp];
    	long b = intStack[isp + 1];
    	long c = intStack[isp + 2];
    	intStack[isp++] = (int) (a * c / b);
    	return;
    }

    Your dumped scripts have them as "(a * b / c)" instead of "(a * c / b)"

    Example below:



    Script 2720:

    Code:
    int script_2720(Item item0, int arg1) {
    	int int2;
    	int int3;
    	int int4;
    	int int5;
    	int int6;
    	int int7;
    	int int8;
    	item0 = getRealItem(item0);
    	int2 = datamap('o', 'i', (DataMap)731, item0);
    	if (VARP[532] == 6529 && int2 != -1 && int2 > 0) {
    		return int2;
    	}
    	int2 = datamap('o', 'i', (DataMap)733, item0);
    	if (int2 != -1 && int2 > 0) {
    		return int2;
    	}
    	if (itemAttribute(item0, 258) == 1 || itemAttribute(item0, 259) == 1) {
    		return 99000;
    	}
    	int3 = 130;
    	int4 = 100;
    	int5 = 0;
    	int6 = script_2721(arg1);
    	if (int6 == -1) {
    		return -1;
    	}
    	int7 = getItemAmtInContainer((Container)VARP[118], item0);
    	int8 = int7 - int6;
    	if (int6 == 0) {
    		int5 = int4;
    	} else if (int7 == 0) {
    		int5 = int3;
    	} else if (int7 >= int6) {
    		int5 = int4;
    	} else {
    		int5 = int3 - (int3 - int4) * int6 / int7;
    	}
    	if (int5 < 0) {
    		int5 = 0;
    	}
    	int5 = max(int4, min(int3, int5));
    	int2 = getItemValue(item0) * 100 / int5;
    	if (VARP[532] == 6529) {
    		int2 = 3 * 2 / int2;
    	}
    	return max(int2, 1);
    }

    Line 45:

    Code:
    int2 = 3 * 2 / int2;

    Should be

    Code:
    int2 = 3 * int2 / 2;
    ur decompiled clientscripts have the second and third arguments in opcode 4018 the wrong way around btw
    hi vgm heb ik een 766 cache nog ergens liggen


    als ik tijd heb zoek ik m en stuur ik t via skype

    xx
    well I always looked up to you and I agree with you on most of your posts you've made :)

    almost the same thing goes for mgi125
    Well in your post you stated that it's more efficient because of the updating where density doesn't matter. Unless you're doing the checks like PI does (and like Delta, etc.) just looping through all players, then there will be some sort of zone density (sector, region, whatever).
    I remember seeing that thread, and I was trying to find it again before responding to your post but I couldn't. I don't quite understand how it makes it more efficient or eliminates the process of doing the checks.
    Sorry but I robbed your dialogue usage, it's pretty good!
    And it really isn't verbose, considering it's java
  • Loading…
  • Loading…
  • Loading…
  • Loading…