Beispiel #1
0
void TimerTick() 
{
    ChickenCheck();
    Delay++;
	if(TakeNextTP)
	{
		if(IsTownLevel(GetPlayerArea()))
		TakeNextTP=false;
	}
	if(CampOn)
	{
		D2CLIENT_clickMap(3,Camp.x,Camp.y,8);
	}
	if(CampUnitOn)
	{
		D2CLIENT_clickMap(3,Camp.x,Camp.y,8);
	}
	if(Flash)
	{
		if(FindUnit(Auto.GetPlayerID(),0)!=NULL)
		{
			FlashPlayer(Auto.GetPlayerID());						
			FlashDelay=0;
		}
		if(FindUnit(Auto.GetPlayerID(),0)==NULL)
		{
			FlashDelay=-1;
		}
	}
}
Beispiel #2
0
INT unit_cancel(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval)
{	
	CDebug cDbg("unit cancel");

	if(!GameReady())
		return JS_TRUE;

	if(argc == 1 && JSVAL_IS_INT(argv[0]))
	{
		jsint nType = JSVAL_TO_INT(argv[0]);

		if(nType == 0)
			D2CLIENT_CloseInteract();
		else if(nType == 1)
			D2CLIENT_CloseNPCInteract();
	}
	else if(D2CLIENT_GetCursorItem())
	{
		// Diablo drops an Item by using the Walk function.
		// Just perform a clickMap "click" and we drop it
		D2CLIENT_clickMap(0, 10, 10, 0x08);
	}

	return JS_TRUE;
}