FUNCTION int Q43R(obj user, int newType) { int Q5NC = 0x00; if(Q50G(user)) { if(newType >= 0x00) { if(isRiding(user)) { int Q52Q = unRide(user); } if(!(hasObjVar(Q62D, "oldBodyType"))) { setObjVar(Q62D, "oldBodyType", getObjType(Q62D)); } if(!(hasObjVar(Q62D, "oldHue"))) { setObjVar(Q62D, "oldHue", getHue(Q62D)); } setType(user, newType); setHue(user, 0x00); int Q4NC = (getSkillLevel(user, 0x19) / 0x05) * 0x05; if(isScroll()) { Q4NC = 0x3C; } Q4MU(user, Q4NC); Q5NC = 0x01; } } Q5UQ(this); return(Q5NC); }
/*---------------------------------------------------------------------*//** 複製されたブロックである ⇒ OBJ_IS_CLONED_BLOCK **//*---------------------------------------------------------------------*/ bool EsBlock::isCloned() const { ASSERT(getObjType() == OBJT_BLOCK); ASSERT(getClass()->getClassType() == EsSysClasses::CLASSTYPE_BLOCK); return getScope()->getOwnerObject() != this; }
int removeAVUMetadataFromKVPairs( rsComm_t *rsComm, char *objName, char *inObjType, keyValPair_t *kVP ) { char objType[10]; if ( strcmp( inObjType, "-1" ) ) { snprintf( objType, sizeof( objType ), "%s", inObjType ); } else { int status = getObjType( rsComm, objName, objType ); if ( status < 0 ) { return status; } } for ( int i = 0; i < kVP->len ; i++ ) { /* Call rsModAVUMetadata to call chlAddAVUMetadata. rsModAVUMetadata connects to the icat-enabled server if the local host isn't. */ modAVUMetadataInp_t modAVUMetadataInp; modAVUMetadataInp.arg0 = "rm"; modAVUMetadataInp.arg1 = objType; modAVUMetadataInp.arg2 = objName; modAVUMetadataInp.arg3 = kVP->keyWord[i]; modAVUMetadataInp.arg4 = kVP->value[i]; modAVUMetadataInp.arg5 = ""; int status = rsModAVUMetadata( rsComm, &modAVUMetadataInp ); if ( status < 0 ) { return status; } } return 0; }
int removeAVUMetadataFromKVPairs (rsComm_t *rsComm, char *objName, char *inObjType, keyValPair_t *kVP) { int i,j; char objType[10]; modAVUMetadataInp_t modAVUMetadataInp; if (strcmp(inObjType,"-1")) { strcpy(objType,inObjType); } else { i = getObjType(rsComm, objName,objType); if (i < 0) return(i); } modAVUMetadataInp.arg0 = "rm"; for (i = 0; i < kVP->len ; i++) { /* Call rsModAVUMetadata to call chlAddAVUMetadata. rsModAVUMetadata connects to the icat-enabled server if the local host isn't. */ modAVUMetadataInp.arg1 = objType; modAVUMetadataInp.arg2 = objName; modAVUMetadataInp.arg3 = kVP->keyWord[i]; modAVUMetadataInp.arg4 = kVP->value[i]; modAVUMetadataInp.arg5 = ""; j = rsModAVUMetadata (rsComm, &modAVUMetadataInp); if (j < 0) return(j); } return(0); }
ES_BEGIN_NS //////////////////////////////////////////////////////////////////////////// // クラス //========================================================================== // EsBlock メソッド // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - // 外部サービス /*---------------------------------------------------------------------*//** 複製 ⇒ js_CloneBlockObject **//*---------------------------------------------------------------------*/ EsBlock* EsBlock::clone(EsContext* ctx, EsObject* objParent, EsStackFrame* sfrm) { ASSERT(getObjType() == OBJT_BLOCK); ASSERT(getClass()->getClassType() == EsSysClasses::CLASSTYPE_BLOCK); ASSERT(!this->isCloned()); EsBlock* blockClone = (EsBlock*)ctx->newObject(EsBlockClass::getInstance(), this, objParent); if(blockClone == 0L) { return 0L; } blockClone->slots()->setPrivateData(sfrm); blockClone->slots()->setValue(getClass()->getBlockDepthSlotIndex(), this->getSlots()->getValue(getClass()->getBlockDepthSlotIndex())); ASSERT(blockClone->isCloned()); ASSERT(blockClone->getScope()->getOwnerObject() == this); return blockClone; }
FUNCTION int Q658(obj user) { int Q62A = getObjType(this); if(hasObjVar(this, "fuel")) { int fuel = getObjVar(this, "fuel"); } switch(Q62A) { case 0x0B1A: setObjVar(this, "burning", 0x00); setType(this, 0x0A26); break; case 0x0B1D: setObjVar(this, "burning", 0x00); setType(this, 0x0A27); break; case 0x0B26: setObjVar(this, "burning", 0x00); setType(this, 0x0A29); break; case 0x1854: setObjVar(this, "burning", 0x00); setType(this, 0x1853); break; case 0x1858: setObjVar(this, "burning", 0x00); setType(this, 0x1857); break; case 0x184A: setObjVar(this, "burning", 0x00); setType(this, 0x1849); break; case 0x184E: setObjVar(this, "burning", 0x00); setType(this, 0x184D); break; case 0x0A0F: systemMessage(user, "You blow out the candle, and discard it."); destroyOne(this); break; case 0x0A12: systemMessage(user, "You douse the torch, and discard it."); destroyOne(this); break; case 0x0A15: case 0x0A1A: case 0x0A22: setObjVar(this, "burning", 0x00); setType(this, Q62A + 0x03); break; default: return(0x00); break; } sfx(getLocation(this), 0x47, 0x00); return(0x01); }
FUNCTION void Q4E8(obj user, obj Q66M, int Q4QY, string name) { if(isAtHome(this)) { systemMessage(user, "You can't use that, it belongs to someone else."); return; } int Q66P = getObjType(Q66M); if(Q4Z2(Q66P)) { if(!testSkill(user, 0x0D)) { systemMessage(user, "You burn the food to a crisp! It's ruined."); destroyOne(this); return; } if(name != "default") { if(hasObjVar(this, "NAME")) { removeObjVar(this, "NAME"); setObjVar(this, "NAME", name); } } if(random(0x00, 0x01)) { barkTo(user, user, "Looks delicious."); } else { barkTo(user, user, "Mmmm, smells good."); } obj Q47F = getBackpack(user); int Q4TM; obj Q5CN = createGlobalObjectOn(this, Q4QY); if(!isInContainer(this)) { if(canHold(Q47F, Q5CN)) { Q4TM = putObjContainer(Q5CN, Q47F); systemMessage(user, "You put the cooked food into your backpack."); } else { Q4TM = teleport(Q5CN, getLocation(user)); systemMessage(user, "You put the cooked food on the ground."); } } destroyOne(this); } else { systemMessage(user, "You can't cook on that."); } return; }
/** * \fn msiApplyDCMetadataTemplate(msParam_t* inpParam, msParam_t* outParam, ruleExecInfo_t *rei) * * \brief This microservice adds 15 empty Dublin Core Metadata fields to an object or collection. * * \module framework * * \since pre-2.1 * * \author Antoine de Torcy * \date 2008-04-04 * * \usage See clients/icommands/test/rules3.0/ * * \param[in] inpParam - a STR_MS_T containing the target object's path * \param[out] outParam - an INT_MS_T containing the status * \param[in,out] rei - The RuleExecInfo structure that is automatically * handled by the rule engine. The user does not include rei as a * parameter in the rule invocation. * * \DolVarDependence none * \DolVarModified none * \iCatAttrDependence none * \iCatAttrModified none * \sideeffect none * * \return integer * \retval 0 on success * \pre none * \post none * \sa none **/ int msiApplyDCMetadataTemplate(msParam_t* inpParam, msParam_t* outParam, ruleExecInfo_t *rei) { char *objPath; char objType[NAME_LEN]; modAVUMetadataInp_t modAVUMetadataInp; int i, status; /* Dublin Core metadata elements */ char *elements[]={"DC.Title", "DC.Creator", "DC.Subject", "DC.Description", "DC.Publisher", "DC.Contributor", "DC.Date", "DC.Type", "DC.Format", "DC.Identifier", "DC.Source", "DC.Language", "DC.Relation", "DC.Coverage", "DC.Rights" }; /* For testing mode when used with irule --test */ RE_TEST_MACRO (" Calling msiApplyDCMetadataTemplate") /* microservice check */ if (rei == NULL || rei->rsComm == NULL) { rodsLog (LOG_ERROR, "msiApplyDCMetadataTemplate: input rei or rsComm is NULL"); return (SYS_INTERNAL_NULL_INPUT_ERR); } /* Check for proper input */ if ((objPath = parseMspForStr(inpParam)) == NULL) { rodsLog (LOG_ERROR, "msiApplyDCMetadataTemplate: input parameter is NULL"); return (USER__NULL_INPUT_ERR); } /* Get type of target object */ status = getObjType(rei->rsComm, objPath, objType); /* Add each DC element */ for (i=0; i<15; i++) { /* set up our modAVU input */ memset (&modAVUMetadataInp, 0, sizeof(modAVUMetadataInp_t)); modAVUMetadataInp.arg0 = "add"; modAVUMetadataInp.arg1 = objType; modAVUMetadataInp.arg2 = objPath; modAVUMetadataInp.arg3 = elements[i]; /* attribute */ modAVUMetadataInp.arg4 = " "; /* value, cannot be empty */ modAVUMetadataInp.arg5 = ""; /* units, can be empty */ /* add metadata AVU triplet */ status = rsModAVUMetadata (rei->rsComm, &modAVUMetadataInp); } /* return operation status through outParam */ fillIntInMsParam (outParam, status); return(status); }
/** * \fn msiCheckAccess(msParam_t *inObjName, msParam_t * inOperation, msParam_t * outResult, ruleExecInfo_t *rei) * * \brief This microservice checks the access permission to perform a given operation * * \module core * * \since 3.0 * * * \usage See clients/icommands/test/rules/ * * \param[in] inObjName - name of Object. A param of type STR_MS_T * \param[in] inOperation - type of Operation that will be performed. A param of type STR_MS_T. * \param[out] outResult - result of the operation. 0 for failure and 1 for success. a param of type INT_MS_T. * \param[in,out] rei - The RuleExecInfo structure that is automatically * handled by the rule engine. The user does not include rei as a * parameter in the rule invocation. * * \DolVarDependence none * \DolVarModified none * \iCatAttrDependence none * \iCatAttrModified none * \sideeffect none * * \return integer * \retval 0 on success * \pre none * \post none * \sa none **/ int msiCheckAccess( msParam_t *inObjName, msParam_t * inOperation, msParam_t * outResult, ruleExecInfo_t *rei ) { char *objName, *oper; char objType[MAX_NAME_LEN]; int i = 0; char *user; char *zone; RE_TEST_MACRO( " Calling msiCheckAccess" ); if ( inObjName == NULL || inObjName->inOutStruct == NULL || inObjName->type == NULL || strcmp( inObjName->type, STR_MS_T ) != 0 ) { return USER_PARAM_TYPE_ERR; } if ( inOperation == NULL || inOperation->inOutStruct == NULL || inOperation->type == NULL || strcmp( inOperation->type, STR_MS_T ) != 0 ) { return USER_PARAM_TYPE_ERR; } if ( rei == NULL || rei->rsComm == NULL ) { return SYS_INTERNAL_NULL_INPUT_ERR; } if ( strlen( rei->rsComm->clientUser.userName ) == 0 || strlen( rei->rsComm->clientUser.rodsZone ) == 0 ) { return SYS_INTERNAL_NULL_INPUT_ERR; } oper = ( char * ) inOperation->inOutStruct; objName = ( char * ) inObjName->inOutStruct; user = rei->rsComm->clientUser.userName; zone = rei->rsComm->clientUser.rodsZone; i = getObjType( rei->rsComm, objName, objType ); if ( i < 0 ) { return i; } i = checkPermissionByObjType( rei->rsComm, objName, objType, user, zone, oper ); if ( i == 0 ) { // hack i = checkPermissionByObjType( rei->rsComm, objName, objType, "public", zone, oper ); } if ( i < 0 ) { return i; } fillIntInMsParam( outResult, i ); return 0; }
FUNCTION void Q5XR(obj Q5G0, int newType) { int Q5G2 = getObjType(Q5G0); string Q5WW = Q5G2; string Q5WV = newType; if(Q5G2 != newType) { setType(Q5G0, newType); attachScript(Q5G0, Q5WV); detachScript(Q5G0, Q5WW); } return; }
TRIGGER( use )(obj user) { int Q5A2 = getObjType(this); loc Q4VS = loc( getLocation(user) ); loc there = loc( getLocation(this) ); int Q4IL = getDistanceInTiles(Q4VS, there); if(Q4IL > 0x02) { bark(user, "I am too far away to do that."); return(0x00); } int Q4Q1; switch(Q5A2) { case 0x0A53: setType(this, 0x0A52); callback(this, 0x0A, 0x26); break; case 0x0A4F: setType(this, 0x0A4E); callback(this, 0x0A, 0x26); break; case 0x0A51: setType(this, 0x0A50); callback(this, 0x0A, 0x26); break; case 0x0A4D: setType(this, 0x0A4C); callback(this, 0x0A, 0x26); break; case 0x0A52: setType(this, 0x0A53); Q4Q1 = teleport(this, getLocation(this)); break; case 0x0A4E: setType(this, 0x0A4F); Q4Q1 = teleport(this, getLocation(this)); break; case 0x0A50: setType(this, 0x0A51); Q4Q1 = teleport(this, getLocation(this)); break; case 0x0A4C: setType(this, 0x0A4D); Q4Q1 = teleport(this, getLocation(this)); break; default: break; } return(0x01); }
FUNCTION int Q4ZM(obj user) { int Q46D = 0x00; int Q4QG = 0x00; list Q5FD; clearList(Q5FD); getObjectsInRange(Q5FD, getLocation(user), 0x03); int Q5E6 = numInList(Q5FD); for(int i = 0x00; i < Q5E6; i ++) { int Q620 = getObjType(Q5FD[i]); switch(Q620) { case 0x0FAF: case 0x0FB0: Q46D = 0x01; break; case 0x0FB1: Q4QG = 0x01; break; } if(Q620 >= 0x197A) { if(Q620 <= 0x19A9) { Q4QG = 0x01; } } } if(!Q46D) { string Q47R = "You are not near an anvil"; if(!Q4QG) { Q47R = Q47R + " or a forge."; } else { Q47R = Q47R + "."; } systemMessage(user, Q47R); } else { if(!Q4QG) { systemMessage(user, "You are not near a forge."); } } return(Q46D && Q4QG); }
TRIGGER( use )(obj user) { list Q4PV = list( 0x07C9, 0x07CA, 0x07CB, 0x07CC ); list Q5Z5; loc Q4OM; int Q5VV = 0x1498; int Q5VW = 0x029B; int Q4NW = 0x149F; int Q5W1 = 0x05; obj Q5IN; int Q5F5; int Q5IJ; int Q5Z8; int Q5ZA; if(!hasObjVar(this, "working")) { setObjVar(this, "working", 0x01); setType(this, 0x108D); callback(this, 0x02, 0x01); for(int Q51K = 0x00; Q51K < 0x02; Q51K ++) { Q5ZA = Q5VW + Q51K; for(int i = Q5VV; i < (Q4NW + 0x01); i ++) { Q4OM = loc( i, Q5ZA, Q5W1 ); Q5IJ = 0x01; clearList(Q5Z5); getObjectsAt(Q5Z5, Q4OM); for(int Q518 = 0x00; Q518 < numInList(Q5Z5); Q518 ++) { Q5Z8 = getObjType(Q5Z5[Q518]); if((Q5Z8 == 0x07C9) || (Q5Z8 == 0x07CA) || (Q5Z8 == 0x07CB) || (Q5Z8 == 0x07CC)) { Q5IJ = 0x00; } } if(Q5IJ == 0x01) { Q5F5 = Q4PV[random(0x00, (numInList(Q4PV) - 0x01))]; Q5IN = createGlobalObjectAt(Q5F5, Q4OM); attachScript(Q5IN, "flame_bridge_tile"); } } } } return(0x00); }
FUNCTION int Q532() { int Q62A = getObjType(this); switch(Q62A) { case 0x0A28: case 0x0F64: case 0x0F6B: setObjVar(this, "burning", 0x00); break; case 0x0A18: case 0x0A1D: case 0x0A25: setObjVar(this, "fuel", 0x64); setObjVar(this, "burning", 0x00); break; case 0x0B1A: case 0x0A0F: case 0x0A15: case 0x0A1A: case 0x0A22: case 0x0A12: setObjVar(this, "fuel", 0x64); setObjVar(this, "burning", 0x01); callback(this, 0x1E, 0x39); break; case 0x0A26: case 0x0A27: case 0x0A29: case 0x1853: case 0x1857: case 0x1849: case 0x184D: setObjVar(this, "burning", 0x00); break; case 0x0B1A: case 0x0B1D: case 0x0B26: case 0x1854: case 0x1858: case 0x184A: case 0x184E: setObjVar(this, "burning", 0x01); break; } return(0x01); }
/* MapLine::copy * Copies another map object [c] *******************************************************************/ void MapLine::copy(MapObject* c) { if(getObjType() != c->getObjType()) return; MapObject::copy(c); MapLine* l = static_cast<MapLine*>(c); if(side1 && l->side1) side1->copy(l->side1); if(side2 && l->side2) side2->copy(l->side2); setIntProperty("special", l->intProperty("special")); }
void GameLayer::onEventCustom_TankDeath(EventCustom* event) { auto tank = static_cast<Tank*>(event->getUserData()); if (tank->getObjType() == PlayerTank) { _playerTank[0] = NULL; _enemyAI->mTank = NULL; _tileMapInfo->getTileMap()->removeChild(tank); _iplife--; if (_iplife <= 0) { GameOver(); } this->scheduleOnce(schedule_selector(GameLayer::createNewPlayer), 1.0f); ////在已有的地图上,创建玩家坦克 //_playerTank[0] = Tank::createTankWithTankType("player2U.png", _tileMapInfo); ////设置坦克类型为玩家坦克 //_playerTank[0]->setObjType(PlayerTank); //_playerTank[0]->getBullet(); ////放到地图中初始化位置 //CCSize tileSize = _tileMapInfo->getTileMap()->getTileSize(); //CCSize mapSize = _tileMapInfo->getTileMap()->getContentSize(); //_playerTank[0]->setPosition(ccp(mapSize.width / 2 - tileSize.width * 3, tileSize.height)); //_playerTank[0]->setMovedRect(_playerTank[0]->boundingBox()); //_enemyAI->mTank = _playerTank[0]; } else { _enemyAI->mEnemyTanks->removeObject(tank); _tileMapInfo->getTileMap()->removeChild(tank); _enemyCount--; if (_enemyCount<=0) { NextLevel(); } } }
TRIGGER( use )(obj user) { if(isAtHome(this)) { systemMessage(user, "You can't use that, it belongs to someone else."); return(0x00); } int Q62A = getObjType(this); loc Q61U = loc( getLocation(this) ); switch(Q62A) { case 0x1BD1: systemMessage(user, "Select the shafts you wish to use this on."); break; case 0x1BD4: systemMessage(user, "Select the feathers you wish to use this on."); break; } targetObj(user, this); return(0x00); }
int addAVUMetadataFromKVPairs( rsComm_t *rsComm, char *objName, char *inObjType, keyValPair_t *kVP ) { char objType[10]; if ( strcmp( inObjType, "-1" ) ) { if ( strlen( inObjType ) >= sizeof( objType ) ) { rodsLog( LOG_ERROR, "inObjType: [%s] must be fewer than %ju characters", inObjType, ( uintmax_t )sizeof( objType ) ); return SYS_INVALID_INPUT_PARAM; } strcpy( objType, inObjType ); } else { int status = getObjType( rsComm, objName, objType ); if ( status < 0 ) { return status; } } for ( int i = 0; i < kVP->len ; i++ ) { /* Call rsModAVUMetadata to call chlAddAVUMetadata. rsModAVUMetadata connects to the icat-enabled server if the local host isn't. */ modAVUMetadataInp_t modAVUMetadataInp; memset( &modAVUMetadataInp, 0, sizeof( modAVUMetadataInp ) ); modAVUMetadataInp.arg0 = "add"; modAVUMetadataInp.arg1 = objType; modAVUMetadataInp.arg2 = objName; modAVUMetadataInp.arg3 = kVP->keyWord[i]; modAVUMetadataInp.arg4 = kVP->value[i]; modAVUMetadataInp.arg5 = ""; int status = rsModAVUMetadata( rsComm, &modAVUMetadataInp ); if ( status < 0 ) { return status; } } return 0; }
TRIGGER( creation )() { setObjVar(this, "isTrapped", 0x01); Q4VS = loc( getLocation(this) ); Q4GO = getObjType(this); switch(Q4GO) { case 0x112F: Q68C = loc( Q4VS ); setX(Q68C, getX(Q4VS) + 0x01); break; case 0x112B: Q5DE = loc( Q4VS ); setY(Q5DE, getY(Q4VS) + 0x01); break; } int Q4B1 = random(0x01, 0x64); if(0x3C < Q4B1) { poisoned = 0x01; } return(0x00); }
/** * \fn msiGetObjType(msParam_t *objParam, msParam_t *typeParam, ruleExecInfo_t *rei) * * \brief This microservice gets an object's type from the iCAT. * * \module core * * \since pre-2.1 * * \author Arcot Rajasekar * \date 2007-02-01 * * \usage See clients/icommands/test/rules3.0/ * * \param[in] objParam - a msParam of type STR_MS_T, the path of the iRODS object * \param[out] typeParam - a msParam of type STR_MS_T, will be set by this microservice * \param[in,out] rei - The RuleExecInfo structure that is automatically * handled by the rule engine. The user does not include rei as a * parameter in the rule invocation. * * \DolVarDependence none * \DolVarModified none * \iCatAttrDependence none * \iCatAttrModified none * \sideeffect none * * \return integer * \retval 0 on success * \retval USER_PARAM_TYP_ERROR when input parameter doesn't match the type * \retval getObjType * \pre none * \post none * \sa none **/ int msiGetObjType( msParam_t *objParam, msParam_t *typeParam, ruleExecInfo_t *rei ) { char *objName; char objType[MAX_NAME_LEN]; int i; RE_TEST_MACRO( "Loopback on msiGetObjType" ); if ( strcmp( objParam->type, STR_MS_T ) != 0 ) { return( USER_PARAM_TYPE_ERR ); } objName = ( char * ) objParam->inOutStruct; i = getObjType( rei->rsComm, objName, objType ); if ( i < 0 ) { return( i ); } typeParam->inOutStruct = ( char * ) strdup( objType ); typeParam->type = ( char * ) strdup( STR_MS_T ); return( 0 ); }
FUNCTION void Q49C() { int Q62A = getObjType(this); switch(Q62A) { case 0x0A0F: case 0x0A28: case 0x0A12: deleteObject(this); case 0x0A15: setObjVar(this, "burning", 0x00); setType(this, 0x0A18); break; case 0x0A1A: setObjVar(this, "burning", 0x00); setType(this, 0x0A1D); break; case 0x0A22: setObjVar(this, "burning", 0x00); setType(this, 0x0A25); break; } return; }
FUNCTION int Q4JX(obj it) { if(containedBy(it) != NULL()) { return(0x01); } if(!thinksItsAtHome(it)) { return(0x01); } int i; int Q56F; int Q5E7; int Q55X = 0x02; int myObjType = getObjType(it); list Q4E5; list Q5JX; obj Q4Q1; loc Q4VS = loc( getLocation(it) ); int Q60E; loc there; getContents(Q4E5, it); if(isInArea("alchemist", Q4VS, 0x00)) { Q5JX = list( 0x0F06, 0x0F07, 0x0F08, 0x0F09, 0x0F0A, 0x0F0B, 0x0F0C, 0x0F0D, 0x0E9B ); } if(isInArea("armorer", Q4VS, 0x00)) { Q5JX = list( 0x13BB, 0x13C0, 0x1413, 0x1B72, 0x1B73, 0x1B74, 0x1B75, 0x1B76, 0x1B77, 0x1B7A, 0x1B7B ); } if(isInArea("artisanguild", Q4VS, 0x00)) { Q5JX = list( 0x0FC1, 0x0FB4, 0x13E3, 0x13E4, 0x0FBB, 0x0FBC, 0x14FB, 0x14FC, 0x14FD, 0x14FE, 0x1EB8, 0x1EB9, 0x1EBA, 0x1EBB, 0x12B3, 0x1224, 0x139A, 0x1225, 0x1226, 0x139B, 0x139C, 0x12CA, 0x12CB, 0x1545, 0x1547, 0x1F0B, 0x1F0C, 0x154B, 0x1549, 0x1F0B, 0x1F0C ); } if(isInArea("baker", Q4VS, 0x00)) { Q5JX = list( 0x1043, 0x1039, 0x1045, 0x103B, 0x103C, 0x098C ); } if(isInArea("bard", Q4VS, 0x00)) { Q5JX = list( 0x0EB2, 0x0EB3, 0x0EB4, 0x0E9C, 0x0E9D, 0x0E9E ); } if(isInArea("blacksmith", Q4VS, 0x00)) { Q5JX = list( 0x13E3, 0x13E4, 0x0FBB, 0x0FBC, 0x0FB4, 0x0FB5, 0x1876, 0x1877, 0x1878, 0x1879, 0x0FB6, 0x19B8, 0x19B9, 0x19BA, 0x19B7, 0x1BEF, 0x18C5, 0x0FB2, 0x106D, 0x0FB8 ); } if(isInArea("blacksmith", Q4VS, 0x00)) { Q5JX = list( 0x13B2, 0x13B1, 0x0F4F, 0x0F50, 0x0F3F ); } if(isInArea("butcher", Q4VS, 0x00)) { Q5JX = list( 0x0EC3, 0x0EC2, 0x0976, 0x0977, 0x0978, 0x0979, 0x097A, 0x097B, 0x09B7, 0x09B8, 0x09B9, 0x09BA, 0x09D3, 0x09C9, 0x1609, 0x160A, 0x09F2, 0x09F1, 0x09C0, 0x09C1, 0x1607, 0x1608 ); } if((isInArea("carpenter", Q4VS, 0x00)) || (isInArea("woodworker", Q4VS, 0x00))) { Q5JX = list( 0x1026, 0x1029, 0x1028, 0x102A, 0x102B, 0x102C, 0x102D, 0x102E, 0x102F, 0x1030, 0x1031, 0x1032, 0x1033, 0x1034, 0x1035, 0x1BD7, 0x10E4, 0x1BDD, 0x10E5, 0x10E6, 0x10E7 ); } if(isInArea("cemetery", Q4VS, 0x00)) { Q5JX = list( 0x1CDD, 0x1CE5, 0x1CE0, 0x1CE8, 0x1CE1, 0x1CE9, 0x1CEF, 0x1CF0, 0x1B09, 0x1B0A, 0x1B0B, 0x1B0C, 0x1B0D, 0x1B0E, 0x1B0F, 0x1B10, 0x1B11, 0x1B12, 0x1B13, 0x1B14, 0x1B15, 0x1B16, 0x1B17, 0x1B18, 0x1B19, 0x1B1A, 0x1B1B, 0x1B1C, 0x0ECA, 0x0ED2, 0x0ECB, 0x0ECC, 0x0ECD, 0x0ECE, 0x0ECF, 0x0ED0, 0x0ED1 ); } if((isInArea("clothier", Q4VS, 0x00)) || (isInArea("tailor", Q4VS, 0x00))) { Q5JX = list( 0x0DF9, 0x0DF8, 0x0E1D, 0x0E1E, 0x0E1F, 0x0FA0, 0x1761, 0x1762, 0x1763, 0x1764, 0x0FA9, 0x1068, 0x1067 ); } if(isInArea("cobbler", Q4VS, 0x00)) { Q5JX = list( 0x170B, 0x170F, 0x1710, 0x170D, 0x170E, 0x1711 ); } if(isInArea("customs", Q4VS, 0x00)) { Q5JX = list( 0x00018D45, 0x00018D46, 0x00018D47, 0x00018D48, 0x00018D49, 0x00018D4A, 0x00018D4B, 0x00018D4C, 0x00018D4D, 0x00018D4E, 0x00018D4F, 0x00018D50, 0x00018D51, 0x00018D52, 0x00018D53, 0x00018D54, 0x00018D55, 0x00018D56, 0x00018D57, 0x00018D58, 0x00018D59, 0x00018D5A, 0x00018D5B, 0x00018D5C, 0x00018D5D, 0x00018D5E, 0x00018D5F, 0x00018D60 ); } if(isInArea("docks", Q4VS, 0x00)) { Q5JX = list( 0x0DBF, 0x0DC0, 0x0DD6, 0x0DD7, 0x09CC, 0x09CD, 0x09CE, 0x09CF ); } if(isInArea("farm", Q4VS, 0x00)) { Q5JX = list( 0x1517, 0x152E, 0x1516, 0x1F01, 0x1715, 0x170D, 0x170E, 0x13F8, 0x13F9, 0x0E87, 0x0E88, 0x13F5, 0x13F4, 0x0E76, 0x0DE1, 0x0C70, 0x0C6E, 0x0C61, 0x09D3, 0x0978, 0x1609, 0x0F36, 0x09F0 ); } if(isInArea("fighterguild", Q4VS, 0x00)) { Q5JX = list( 0x0F45, 0x0F47, 0x0F43, 0x0F49, 0x0F4B, 0x13FB, 0x13B0, 0x0F4D, 0x1403, 0x0F62, 0x1405, 0x143D, 0x13B4, 0x1407, 0x0F5C, 0x143B, 0x1439, 0x1441, 0x143F, 0x13FF, 0x0F5E, 0x0F61, 0x13B8, 0x13B9, 0x13B6, 0x13F8, 0x0E89, 0x0F51, 0x0F50, 0x1401, 0x13B2, 0x0F4F, 0x13FD, 0x13DB, 0x13E2, 0x13DA, 0x13E1, 0x13D4, 0x13DC, 0x13D5, 0x13DD, 0x1415, 0x1416, 0x1417, 0x1410, 0x1411, 0x141B, 0x1414, 0x1418, 0x1412, 0x1419, 0x13BF, 0x13C4, 0x13BE, 0x13C5, 0x13CB, 0x13D2, 0x13CC, 0x13D3, 0x13C6, 0x13CE, 0x13EC, 0x13ED, 0x13F0, 0x13F1, 0x13EE, 0x13EF, 0x13EB, 0x13F2, 0x13D6, 0x1413, 0x1409, 0x13C7, 0x13D6, 0x13BB, 0x13C0, 0x13BF, 0x1451, 0x1412, 0x1B72, 0x1B73, 0x1B74, 0x1B75, 0x1B76, 0x1B77, 0x1B78, 0x1B79, 0x1B7A, 0x1B7B, 0x0F3F ); } if((isInArea("guard", Q4VS, 0x00)) || (isInArea("paladin", Q4VS, 0x00))) { Q5JX = list( 0x0F45, 0x0F47, 0x0F43, 0x0F49, 0x0F4B, 0x13FB, 0x13B0, 0x0F4D, 0x1403, 0x0F62, 0x1405, 0x143D, 0x13B4, 0x1407, 0x0F5C, 0x143B, 0x1439, 0x1441, 0x143F, 0x13FF, 0x0F5E, 0x0F61, 0x13B8, 0x13B9, 0x13B6, 0x13F8, 0x0E89, 0x0F51, 0x0F50, 0x1401, 0x13B2, 0x0F4F, 0x13FD, 0x13DB, 0x13E2, 0x13DA, 0x13E1, 0x13D4, 0x13DC, 0x13D5, 0x13DD, 0x1415, 0x1416, 0x1417, 0x1410, 0x1411, 0x141B, 0x1414, 0x1418, 0x1412, 0x1419, 0x13BF, 0x13C4, 0x13BE, 0x13C5, 0x13CB, 0x13D2, 0x13CC, 0x13D3, 0x13C6, 0x13CE, 0x13EC, 0x13ED, 0x13F0, 0x13F1, 0x13EE, 0x13EF, 0x13EB, 0x13F2, 0x13D6, 0x1413, 0x1409, 0x13C7, 0x13D6, 0x13BB, 0x13C0, 0x13BF, 0x1451, 0x1412, 0x1B72, 0x1B73, 0x1B74, 0x1B75, 0x1B76, 0x1B77, 0x1B78, 0x1B79, 0x1B7A, 0x1B7B, 0x0F3F ); } if(isInArea("healer", Q4VS, 0x00)) { Q5JX = list( 0x0EE9, 0x0E9B, 0x0F0C ); } if(isInArea("herbalist", Q4VS, 0x00)) { Q5JX = list( 0x0F84, 0x0F85, 0x0F86, 0x0F90, 0x0C3C, 0x0C3E, 0x0C40, 0x0C42 ); } if(isInArea("inn", Q4VS, 0x00)) { Q5JX = list( 0x0A1D, 0x0F64, 0x0A28 ); } if(isInArea("jeweler", Q4VS, 0x00)) { Q5JX = list( 0x1086, 0x108A, 0x108B, 0x1087, 0x1085, 0x1088, 0x1089, 0x0F0F, 0x0F10, 0x0F11, 0x0F13, 0x0F15, 0x0F16, 0x0F18, 0x0F25, 0x0F26 ); } if(isInArea("library", Q4VS, 0x00)) { Q5JX = list( 0x0FEF, 0x0FF0, 0x0FF1, 0x0FF2 ); } if(isInArea("mag", Q4VS, 0x00)) { Q5JX = list( 0x1F2D, 0x1F2E, 0x1F2F, 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F2D, 0x1F2E, 0x1F2F, 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F2D, 0x1F2E, 0x1F2F, 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F2D, 0x1F2E, 0x1F2F, 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F2D, 0x1F2E, 0x1F2F, 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F2D, 0x1F2E, 0x1F2F, 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F2D, 0x1F2E, 0x1F2F, 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1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09B7, 0x09B8, 0x09B9, 0x09BA, 0x09D3, 0x09C9, 0x1609, 0x160A, 0x09F2, 0x09F1, 0x09C0, 0x09C1, 0x1607, 0x1608, 0x0C5C, 0x0C5D, 0x0C61, 0x0C62, 0x0C63, 0x0C64, 0x0C65, 0x0C66, 0x0C67, 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D, 0x0C6E, 0x0C70, 0x0C71, 0x0C72, 0x0C73, 0x0C74, 0x0C75, 0x0C78, 0x0C79, 0x0C7A, 0x0C7B, 0x0C7C, 0x0C7F, 0x0C80, 0x0C81, 0x0C82 ); } if(isInArea("mill", Q4VS, 0x00)) { Q5JX = list( 0x1039 ); } if(isInArea("mine", Q4VS, 0x00)) { Q5JX = list( 0x0E86, 0x0E85, 0x18C5, 0x0FB2, 0x1BEF, 0x106D, 0x0F39, 0x0F3A ); } if(isInArea("observatory", Q4VS, 0x00)) { Q5JX = list( 0x1058, 0x1057, 0x104B, 0x104C, 0x14F5, 0x00018D45, 0x00018D46, 0x00018D47, 0x00018D48, 0x00018D49, 0x00018D4A, 0x00018D4B, 0x00018D4C, 0x00018D4D, 0x00018D4E, 0x00018D4F, 0x00018D50, 0x00018D51, 0x00018D52, 0x00018D53, 0x00018D54, 0x00018D55, 0x00018D56, 0x00018D57, 0x00018D58, 0x00018D59, 0x00018D5A, 0x00018D5B, 0x00018D5C, 0x00018D5D, 0x00018D5E, 0x00018D5F, 0x00018D60 ); } if(isInArea("painter", Q4VS, 0x00)) { Q5JX = list( 0x0FC1, 0x0FBF, 0x0FC0 ); } if(isInArea("provisioner", Q4VS, 0x00)) { Q5JX = list( 0x097E, 0x097D, 0x097C, 0x09B5, 0x09CC, 0x09CD, 0x09CE, 0x09CF, 0x097A, 0x097B, 0x09D0, 0x171F, 0x1720, 0x1721, 0x1722, 0x1723, 0x1724, 0x1725, 0x1726, 0x1727, 0x09D1, 0x1728, 0x1729, 0x172A, 0x172B, 0x172C, 0x172D, 0x0976, 0x0977, 0x0978, 0x0979, 0x097A, 0x097B, 0x09B7, 0x09B8, 0x09B9, 0x09BA, 0x09D3, 0x09C9, 0x1609, 0x160A, 0x09F2, 0x09F1, 0x09C0, 0x09C1, 0x1607, 0x1608, 0x0C5C, 0x0C5D, 0x0C61, 0x0C62, 0x0C63, 0x0C64, 0x0C65, 0x0C66, 0x0C67, 0x0C6A, 0x0C6B, 0x0C6C, 0x0C6D, 0x0C6E, 0x0C70, 0x0C71, 0x0C72, 0x0C73, 0x0C74, 0x0C75, 0x0C78, 0x0C79, 0x0C7A, 0x0C7B, 0x0C7C, 0x0C7F, 0x0C80, 0x0C81, 0x0C82 ); } if(isInArea("ranger", Q4VS, 0x00)) { Q5JX = list( 0x171A, 0x13DB, 0x13E2, 0x13DA, 0x13E1, 0x13D4, 0x13DC, 0x13D5, 0x13DD, 0x13C5, 0x13CB, 0x13D2, 0x13CC, 0x13D3, 0x13C6, 0x13CE, 0x13C7, 0x13D6, 0x1409, 0x1716, 0x171A, 0x153F, 0x1515, 0x13F8, 0x13F9, 0x166E, 0x1711, 0x1712, 0x170B, 0x170C, 0x13B2, 0x13B1, 0x0F4F, 0x0F50, 0x13FD, 0x13FC, 0x0F3F, 0x0F3F, 0x0F3F, 0x0F3F ); } if(isInArea("stables", Q4VS, 0x00)) { Q5JX = list( 0x0C55, 0x0C78 ); } if(isInArea("tanner", Q4VS, 0x00)) { Q5JX = list( 0x171A, 0x13C5, 0x13CB, 0x13D2, 0x13CC, 0x13D3, 0x13C6, 0x13CE, 0x13C7, 0x1068, 0x1067 ); } if(isInArea("tavern", Q4VS, 0x00)) { Q5JX = list( 0x099F, 0x09C7, 0x099B, 0x09C8 ); } if(isInArea("thievesguild", Q4VS, 0x00)) { Q5JX = list( 0x1545, 0x1547, 0x1F0B, 0x1F0C, 0x154B, 0x1549, 0x1F0B, 0x1F0C, 0x14FB ); } if(isInArea("tinker", Q4VS, 0x00)) { Q5JX = list( 0x14FB, 0x1011, 0x104C, 0x1050, 0x104F, 0x1051, 0x1052, 0x1054, 0x1053, 0x1056, 0x1055, 0x1025, 0x104B, 0x1058, 0x1057, 0x105A, 0x1059, 0x105C, 0x105B, 0x105E, 0x105D, 0x1EB8, 0x1EB9, 0x1EBA, 0x1EBB, 0x1EBC, 0x100E, 0x100F, 0x1010, 0x1013 ); } if(isInArea("vet", Q4VS, 0x00)) { Q5JX = list( 0x0EE9, 0x0E9B, 0x0F0C, 0x0C55, 0x0C78 ); } if(isInArea("weapon", Q4VS, 0x00)) { Q5JX = list( 0x0F45, 0x0F47, 0x0F43, 0x0F49, 0x0F4B, 0x13FB, 0x13B0, 0x0F4D, 0x1403, 0x0F62, 0x1405, 0x143D, 0x13B4, 0x1407, 0x0F5C, 0x143B, 0x1439, 0x1441, 0x143F, 0x13FF, 0x0F5E, 0x0F61, 0x13B8, 0x13B9, 0x13B6, 0x13F8, 0x0E89, 0x0F51, 0x0F50, 0x1401, 0x13B2, 0x0F4F, 0x13FD, 0x13B2, 0x13B1, 0x0F4F, 0x0F50, 0x0F3F ); } if((isInArea("dungn", Q4VS, 0x00)) || (isInArea("mountain", Q4VS, 0x00))) { Q5JX = list( 0x0EF3, 0x0EF3, 0x0EF3, 0x0EF3, 0x0EF3, 0x0EF3, 0x0EF3, 0x0EF3, 0x1F2D, 0x1F2E, 0x1F2F, 0x1F30, 0x1F31, 0x1F32, 0x1F33, 0x1F34, 0x1F35, 0x1F36, 0x1F37, 0x1F38, 0x1F39, 0x1F3A, 0x1F3B, 0x1F3C, 0x1F3D, 0x1F3E, 0x1F3F, 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F3D, 0x1F3E, 0x1F3F, 0x1F40, 0x1F41, 0x1F42, 0x1F43, 0x1F44, 0x1F4D, 0x1F4E, 0x1F4F, 0x1F50, 0x1F51, 0x1F52, 0x1F53, 0x1F54, 0x1F55, 0x1F56, 0x1F57, 0x1F58, 0x1F59, 0x1F5A, 0x1F5B, 0x1F5C, 0x1F5D, 0x1F5E, 0x1F5F, 0x1F60, 0x1F61, 0x1F62, 0x1F63, 0x1F64, 0x1F65, 0x1F66, 0x1F67, 0x1F68, 0x1F69, 0x1F6A, 0x1F6B, 0x1F6C, 0x0F45, 0x0F47, 0x0F43, 0x0F49, 0x0F4B, 0x13FB, 0x13B0, 0x0F4D, 0x1403, 0x0F62, 0x1405, 0x143D, 0x13B4, 0x1407, 0x0F5C, 0x143B, 0x1439, 0x1441, 0x143F, 0x13FF, 0x0F5E, 0x0F61, 0x13B8, 0x13B9, 0x13B6, 0x13F8, 0x0E89, 0x0F51, 0x0F50, 0x1401, 0x13B2, 0x0F4F, 0x13FD, 0x13B2, 0x13B1, 0x0F4F, 0x0F50, 0x0F3F, 0x13DB, 0x13E2, 0x13DA, 0x13E1, 0x13D4, 0x13DC, 0x13D5, 0x13DD, 0x1415, 0x1416, 0x1417, 0x1410, 0x1411, 0x141B, 0x1414, 0x1418, 0x1412, 0x1419, 0x13BF, 0x13C4, 0x13BE, 0x13C5, 0x13CB, 0x13D2, 0x13CC, 0x13D3, 0x13C6, 0x13CE, 0x13EC, 0x13ED, 0x13F0, 0x13F1, 0x13EE, 0x13EF, 0x13EB, 0x13F2, 0x144F, 0x1452, 0x144E, 0x1455, 0x13D6, 0x1413, 0x1409, 0x13C7, 0x13D6, 0x13BB, 0x13C0, 0x13BF, 0x1451, 0x1412, 0x1B72, 0x1B73, 0x1B74, 0x1B75, 0x1B76, 0x1B77, 0x1B78, 0x1B79, 0x1B7A, 0x1B7B, 0x1086, 0x108A, 0x108B, 0x1087, 0x1085, 0x1088, 0x1089, 0x0F0F, 0x0F10, 0x0F11, 0x0F13, 0x0F15, 0x0F16, 0x0F18, 0x0F25, 0x0F26, 0x1CDD, 0x1CE5, 0x1CE0, 0x1CE8, 0x1CE1, 0x1CE9, 0x1CEF, 0x1CF0, 0x1B09, 0x1B0A, 0x1B0B, 0x1B0C, 0x1B0D, 0x1B0E, 0x1B0F, 0x1B10, 0x1B11, 0x1B12, 0x1B13, 0x1B14, 0x1B15, 0x1B16, 0x1B17, 0x1B18, 0x1B19, 0x1B1A, 0x1B1B, 0x1B1C, 0x0ECA, 0x0ED2, 0x0ECB, 0x0ECC, 0x0ECD, 0x0ECE, 0x0ECF, 0x0ED0, 0x0ED1, 0x0F06, 0x0F07, 0x0F08, 0x0F09, 0x0F0A, 0x0F0B, 0x0F0C, 0x0F0D, 0x1545, 0x1547, 0x1F0B, 0x1F0C, 0x154B, 0x1549, 0x1F0B, 0x1F0C ); } if(numInList(Q5JX) < 0x01) { return(0x00); } getContents(Q4E5, it); if(numInList(Q4E5) <= Q55X) { Q56F = random(0x00, ((Q55X - numInList(Q4E5)) + 0x01) * 0x02); for(i = 0x00; i < Q56F; i ++) { Q5E7 = random(0x00, numInList(Q5JX) - 0x01); Q60E = Q5JX[Q5E7]; if(Q60E > 0x000186A0) { Q60E = Q60E - 0x000186A0; there = loc( getLocation(it) ); Q4Q1 = requestCreateNPCAt(Q60E, there, 0x32); if(Q4Q1 != NULL()) { Q60E = putObjContainer(Q4Q1, it); } } else { Q4Q1 = requestCreateObjectIn(Q5JX[Q5E7], it); } } } list Q5DB = list( 0x09AC, 0x09B1, 0x0E76, 0x0E77, 0x0E7F ); if(isInList(Q5DB, getObjType(it))) { return(0x01); } int Q53L = getValue(it) / 0x05; if(Q53L > 0xFA) { Q53L = 0xFA; } if(Q53L < 0x64) { if(random(0x00, 0x0A) < 0x03) { return(0x00); } } setObjVar(it, "isLocked", Q53L); attachScript(it, "locked"); return(0x00); }
TRIGGER( creation )() { Q5W8 = getObjType(this); setObjVar(this, "statueTileNumberFlag", Q5W8); return(0x00); }
TRIGGER( targetobj )(obj user, obj usedon) { removeObjVar(this, "inUse"); if(usedon == NULL()) { return(0x00); } if(getDistanceInTiles(getLocation(user), getLocation(usedon)) > 0x03) { systemMessage(user, "That is too far away."); return(0x00); } if(getDistanceInTiles(getLocation(this), getLocation(usedon)) > 0x03) { systemMessage(user, "The ore is too far away."); return(0x00); } if(!canSeeObj(user, usedon)) { systemMessage(user, "You can't see that."); return(0x00); } int Q4Q1; int Q4YO; Q4Q1 = getResource(Q4YO, this, "metal", 0x03, 0x02); int Q4Z5 = 0x00; int Q4ZU = 0x00; obj ore = this; int Q62A = getObjType(this); int Q66P = getObjType(usedon); if(Q66P == 0x0FB1) { Q4Z5 = 0x01; } if(Q66P >= 0x197A) { if(Q66P <= 0x19A9) { Q4Z5 = 0x01; } } if(Q66P > 0x19B6) { if(Q66P < 0x19BB) { Q4ZU = 0x01; if(isInContainer(this)) { obj Q61O = getTopmostContainer(this); int Q62E = getWeight(Q61O) + getWeight(usedon); } if(isInContainer(usedon)) { obj Q66Q = getTopmostContainer(usedon); int Q66T = getWeight(Q66Q) + getWeight(this); } if((Q62E > 0x03E8) || (Q66T > 0x03E8)) { ebarkTo(user, user, "The weight is too great to combine in a container."); return(0x00); } } } if(Q4ZU) { ore = this; if(Q62A == 0x19B9) { Q4Q1 = getResource(Q4YO, ore, "metal", 0x03, 0x02); transferResources(usedon, ore, Q4YO, "metal"); } if(Q62A == 0x19B8) { switch(Q66P) { case 0x19B9: case 0x19B8: Q4Q1 = getResource(Q4YO, usedon, "metal", 0x03, 0x02); transferResources(ore, usedon, Q4YO, "metal"); break; case 0x19B7: case 0x19BA: Q4Q1 = getResource(Q4YO, ore, "metal", 0x03, 0x02); transferResources(usedon, ore, Q4YO, "metal"); break; default: return(0x00); break; } } if(Q62A == 0x19BA) { switch(Q66P) { case 0x19B9: case 0x19B8: Q4Q1 = getResource(Q4YO, usedon, "metal", 0x03, 0x02); transferResources(ore, usedon, Q4YO, "metal"); break; case 0x19B7: case 0x19BA: Q4Q1 = getResource(Q4YO, ore, "metal", 0x03, 0x02); transferResources(usedon, ore, Q4YO, "metal"); break; default: return(0x00); break; } } if(Q62A == 0x19B7) { switch(Q66P) { case 0x19B9: case 0x19B8: case 0x19BA: Q4Q1 = getResource(Q4YO, usedon, "metal", 0x03, 0x02); transferResources(ore, usedon, Q4YO, "metal"); break; case 0x19B7: Q4Q1 = getResource(Q4YO, ore, "metal", 0x03, 0x02); transferResources(usedon, ore, Q4YO, "metal"); break; default: return(0x00); break; } } Q4Q1 = getResource(Q4YO, ore, "metal", 0x03, 0x02); if(Q4YO < 0x01) { deleteObject(ore); } Q4Q1 = getResource(Q4YO, usedon, "metal", 0x03, 0x02); if(Q4YO < 0x01) { deleteObject(usedon); } if(hasObjVar(this, "inUse")) { removeObjVar(this, "inUse"); } return(0x00); } if(Q4Z5) { obj Q47G = getBackpack(user); ore = this; int Q5GQ = getObjType(ore); int Q4Y6 = 0x1BF2; Q4Q1 = getResource(Q4YO, ore, "metal", 0x03, 0x02); int count = Q4YO / 0x02; if(count < 0x01) { systemMessage(user, "There is not enough metal-bearing ore in this pile to make an ingot."); if(hasObjVar(this, "inUse")) { removeObjVar(this, "inUse"); } return(0x00); } if(testSkill(user, 0x2D)) { obj Q5BW = createNoResObjectIn(Q4Y6, Q47G); transferResources(Q5BW, ore, count, "metal"); returnResourcesToBank(ore, count, "metal"); Q4Q1 = putObjContainer(Q5BW, Q47G); Q4Q1 = getResource(Q4YO, ore, "metal", 0x03, 0x02); if(Q4YO < 0x01) { deleteObject(ore); } systemMessage(user, "You smelt the ore removing the impurities and put the metal in your backpack."); } else { if(count == 0x01) { systemMessage(user, "You burn away the impurities but are left with no useable metal."); deleteObject(ore); return(0x01); } returnResourcesToBank(ore, count, "metal"); systemMessage(user, "You burn away the impurities but are left with less useable metal."); Q4Q1 = getResource(Q4YO, ore, "metal", 0x03, 0x02); if(Q4YO < 0x01) { deleteObject(ore); } } } return(0x01); }
// Real-C #include "ENGINE.hpp" #include "globals.h" TRIGGER( enterrange , 0x00 )(obj target) { if(isDead(target)) { return(0x01); } int Q5A2 = getObjType(this); if(hasObjVar(this, "working")) { return(0x01); } setObjVar(this, "working", 0x01); switch(Q5A2) { case 0x01: setType(this, 0x1122); setObjVar(this, "plateDown", 0x01); shortcallback(this, 0x01, 0x24); break; case 0x1122: break; case 0x1123: break; case 0x1124: break; default:
TRIGGER( targetobj )(obj user, obj usedon) { if(usedon == NULL()) { return(0x00); } if(isAtHome(usedon)) { systemMessage(user, "That belongs to someone else."); return(0x00); } int Q62A = getObjType(this); int Q66P = getObjType(usedon); loc Q66U = loc( getLocation(user) ); loc Q61U = loc( getLocation(this) ); loc Q66N = loc( getLocation(usedon) ); obj Q4EZ; list args; if(testAndLearnSkill(user, 0x08, 0x00, 0x50) > 0x00) { switch(Q62A) { case 0x1BD1: switch(Q66P) { case 0x1BD4: attachScript(user, "makingarrows"); args = list( this, usedon ); message(user, "makearrows", args); break; default: systemMessage(user, "Can't use feathers on that."); return(0x00); break; } break; case 0x1BD4: switch(Q66P) { case 0x1BD1: attachScript(user, "makingarrows"); args = list( usedon, this ); message(user, "makearrows", args); break; default: systemMessage(user, "Can't use shafts on that."); return(0x00); break; } break; default: return(0x00); break; } } else { systemMessage(user, "Fletching failed."); int Q5MT; int Q4Q1; if(!random(0x00, 0x03)) { debugMessage("!rand"); debugMessage("thistype = " + Q62A); if(Q62A == 0x1BD1) { systemMessage(user, "A feather was destroyed."); returnResourcesToBank(this, 0x01, "feathers"); Q4Q1 = getResource(Q5MT, this, "feathers", 0x03, 0x02); } if(Q62A == 0x1BD4) { systemMessage(user, "A shaft was destroyed."); returnResourcesToBank(this, 0x01, "wood"); Q4Q1 = getResource(Q5MT, this, "wood", 0x03, 0x02); } if(Q5MT < 0x01) { deleteObject(this); } } } return(0x01); }
FUNCTION int Q659(obj user) { int Q62A = getObjType(this); if(hasObjVar(this, "fuel")) { int fuel = getObjVar(this, "fuel"); } switch(Q62A) { case 0x0A26: setObjVar(this, "burning", 0x01); setType(this, 0x0B1A); break; case 0x0A27: setObjVar(this, "burning", 0x01); setType(this, 0x0B1D); break; case 0x0A29: setObjVar(this, "burning", 0x01); setType(this, 0x0B26); break; case 0x1853: setObjVar(this, "burning", 0x01); setType(this, 0x1854); break; case 0x1857: setObjVar(this, "burning", 0x01); setType(this, 0x1858); break; case 0x1849: setObjVar(this, "burning", 0x01); setType(this, 0x184A); break; case 0x184D: setObjVar(this, "burning", 0x01); setType(this, 0x184E); break; case 0x0A28: int Q527; obj Q47F = getBackpack(user); obj Q5BO = requestCreateObjectAt(0x0A0F, getLocation(user)); setObjVar(this, "fuel", 0x64); setObjVar(Q5BO, "burning", 0x01); attachscript(Q5BO, "torch"); callback(Q5BO, 0x1E, 0x39); if(!isInContainer(this)) { Q527 = teleport(Q5BO, getLocation(this)); if(getQuantity(this) > 0x01) { destroyOne(this); if(canHold(Q47F, this)) { systemMessage(user, "You put the remaining unlit candles into your backpack."); Q527 = putObjContainer(this, Q47F); } else { systemMessage(user, "You put the remaining unlit candles at your feet."); Q527 = teleport(this, getLocation(user)); } } } else { destroyOne(this); if(getItemAtSlot(user, 0x02) != NULL()) { systemMessage(user, "You cannot hold the candle, so it has been placed at your feet."); } else { Q527 = equipObj(Q5BO, user, 0x02); systemMessage(user, "You put the candle in your left hand."); } } if(getQuantity(this) == 0x01) { destroyOne(this); } break; case 0x0F64: case 0x0F6B: Q47F = getBackpack(user); obj Q5CB = requestCreateObjectAt(0x0A12, getLocation(user)); setObjVar(this, "fuel", 0x64); setObjVar(Q5CB, "burning", 0x01); attachscript(Q5CB, "torch"); callback(Q5CB, 0x1E, 0x39); if(!isInContainer(this)) { Q527 = teleport(Q5CB, getLocation(this)); if(getQuantity(this) > 0x01) { destroyOne(this); if(canHold(Q47F, this)) { systemMessage(user, "You put the remaining unlit torches into your backpack."); Q527 = putObjContainer(this, Q47F); } else { systemMessage(user, "You put the remaining unlit torches at your feet."); Q527 = teleport(this, getLocation(user)); } } } else { destroyOne(this); if(getItemAtSlot(user, 0x02) != NULL()) { systemMessage(user, "You cannot hold the torch, so it has been placed at your feet."); } else { Q527 = equipObj(Q5CB, user, 0x02); systemMessage(user, "You put the torch in your left hand."); } } if(getQuantity(this) == 0x01) { destroyOne(this); } break; case 0x0A18: case 0x0A1D: case 0x0A25: if(fuel > 0x00) { setObjVar(this, "burning", 0x01); callback(this, 0x1E, 0x39); setType(this, Q62A - 0x03); } else { systemMessage(user, "The lantern is out of fuel."); } break; default: return(0x00); break; } sfx(getLocation(this), 0x47, 0x00); return(0x01); }
// Real-C #include "ENGINE.hpp" TRIGGER( message , "fireInTheHole" )(obj sender, list args) { int Q62A = getObjType(this); loc Q61U = loc( getLocation(this) ); list Q67G; getMobsInRange(Q67G, Q61U, 0x01); if(numInList(Q67G) != 0x00) { obj target = Q67G[0x00]; } if(!hasObjVar(this, "disarmed")) { switch(Q62A) { case 0x10FC: doLocAnimation(Q61U, 0x10FE, 0x02, 0x10, 0x00, 0x00); break; case 0x1110: doLocAnimation(Q61U, 0x1111, 0x02, 0x10, 0x00, 0x00); break; default: break; } int Q4GH = dice(0x03, 0x0F); loseHP(target, Q4GH); } return(0x01); }
bool ObjFileLoader::load(const QString& file, std::vector<GLModel*>& modelList) { QFile f(file); if(!f.open(QIODevice::ReadOnly)) return false; QString path = "./"; int idx = file.lastIndexOf('/'); if(idx != -1) { path = file.left(idx+1); } QHash<QString, material> materials; QHash<QString, material>::iterator m_itr; QTextStream str(&f); GLModel *model = new GLModel(""); int vertexTotal = 0; int vertexModel = 0; int normalsTotal = 0; int normalsModel = 0; for(QString line = str.readLine(); !line.isNull(); line = str.readLine()) { if(line.startsWith('#')) continue; QStringList parts = line.split(' ', QString::SkipEmptyParts); if(parts.size() < 2) continue; int type = getObjType(parts[0]); if(type == -1) continue; switch(type) { case 5: // model { if(model) { model->createNormals(); modelList.push_back(model); } model = new GLModel(parts.back()); if(type == 5) { vertexTotal += vertexModel; vertexModel = 0; normalsTotal += normalsModel; normalsModel = 0; } continue; } case 8: // group { if(!model) model = new GLModel(parts.back()); continue; } case 6: // mtllib loadMaterials(path + parts.back(), materials); continue; } if(!model) continue; switch(type) { case 0: // vertex { double coords[4] = { 0.0, 0.0, 0.0, 1.0 }; for(int i = 1; i < parts.size() && i < 5; ++i) coords[i-1] = parts[i].toDouble(); model->addVertex(coords); ++vertexModel; break; } case 1: // face { polygonFace f; if(loadFace(parts, &f, vertexTotal, normalsTotal)) model->addFace(f); break; } case 2: // textures break; case 3: // normals { double coords[3] = { 0.0, 0.0, 0.0 }; for(int i = 1; i < parts.size() && i < 4; ++i) coords[i-1] = parts[i].toDouble(); model->addNormal(coords); ++normalsModel; break; } case 4: // smooth shading model->setSmoothShading(parts.back() != "off"); break; case 7: // usemtl { if(parts.back().isNull()) parts.back() = ""; m_itr = materials.find(parts.back()); if(m_itr == materials.end()) break; model->addMaterial(*m_itr); break; } } } if(model) { model->createNormals(); modelList.push_back(model); } return true; }
void showStgObjRecPretty(LogLevel priority, Obj *p) { if (p == NULL) { LOG(priority, "NULL"); return; } // depth check first if (depth+1 >= showDepthLimit) { LOG(LOG_ERROR, "******showStgObjRec depth exceeded\n"); return; } InfoTab it = *(getInfoPtr(p)); for (int i=0; i != depth; i++) { if (p == stack[i]) { LOG(priority, "((%s))", it.name); return; } } stack[depth++] = p; ObjType type = getObjType(p); if (type != BLACKHOLE && type != INDIRECT && type != it.objType) { if (!(type == PAP && it.objType == FUN)) { LOG(LOG_ERROR, "getObjType(p) = %s, it.objType = %s\n", objTypeNames[type], objTypeNames[it.objType]); assert(false); } } if (strcmp(it.name, p->ident)) { if(type != PAP) { LOG(LOG_ERROR, "mismatch in infotab and object names \"%s\" != \"%s\"\n", it.name, p->ident); assert(false); } } switch (type) { case PAP: { LOG(priority, "%s = <%s>", p->ident, objTypeNames[type]); int start = startPAPFVsB(p); int div = endPAPFVsB(p); int end = endPAPFVsU(p); LOG(priority, "["); for (int i = start; i != end; i++ ) { if (i == div) LOG(priority, "|"); PtrOrLiteral v = p->payload[i]; if (mayBeBoxed(v) && mayBeUnboxed(v)) LOG(priority, "?"); else if (mayBeBoxed(v)) LOG(priority, "B"); else LOG(priority, "U"); } LOG(priority, "]["); Bitmap64 bm = p->payload[end].b; int size = bm.bitmap.size; uint64_t mask = bm.bitmap.mask; LOG(priority, "%d,%" PRIx64 ",", size, mask); for ( int i = 0; i != size; i++, mask >>= 1 ) { PtrOrLiteral v = p->payload[end + 1 + i]; if (mask & 0x1) { if (!mayBeBoxed(v)) LOG(priority, "!"); else LOG(priority, "B"); } else { if (!mayBeUnboxed(v)) LOG(priority, "!"); else LOG(priority, "U"); } } LOG(priority, "]"); break; } case FUN: case THUNK: case BLACKHOLE: { LOG(priority, "%s = <%s>", p->ident, objTypeNames[type]); break; } case CON: LOG(priority, "%s = %s", p->ident, it.conFields.conName ); int arity = it.conFields.arity; if (arity > 0) { if (arity > 1) LOG(priority, "("); else LOG(priority, " "); showStgValPretty(priority, p->payload[0]); for (int i = 1; i < arity; i++) { LOG(priority, ", "); showStgValPretty(priority, p->payload[i]); } if (arity > 1) LOG(priority, ")"); } break; case INDIRECT: LOG(priority, "%s --> ", p->ident ); showStgObjRecPretty(priority, p->payload[0].op); break; default: LOG(LOG_ERROR,"********* default in showStgObj!\n"); // exit(0); } depth--; }