------------------------------------------------------------------ -- \author tsuneoka -- \date 2009/06/22 14:52:40 ------------------------------------------------------------------ -- start local id = ccGetScriptId(); local n = 0; local index = 0; local time = 0; local curActionNum = ccGetAdvMobActionNum( id ); local preActionNum = curActionNum; local itemBoxId = ccGetItemBoxId( id ); local enable = ccGetEnableItemBox( id, itemBoxId ); local pos = ccGetAdvMobPosition( id ); n = math.random( 0, 3 ); time = math.random( 0, 30 ); ccWaitAdvMob( id, time ); ccSuspendScript(); while( 1 ) do index = n % 4; curActionNum = ccGetAdvMobActionNum( id ); if( preActionNum < curActionNum ) then break; elseif( index == 0 ) then ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "rbrdnut00" ); elseif( index == 1 ) then ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "rbrdnut01" ); elseif( index == 2 ) then ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "rbrdspk00" ); elseif( index == 3 ) then ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "rbrdspk01" ); end time = math.random( 300, 600 ); ccWaitAdvMob( id, time ); ccSuspendScript(); n = n+ 1; end -- 壁と地面のヒットを外す ccSetAdvMobWorldCollisionXY( id, false ); ccSetAdvMobWorldCollisionZ( id, false ); -- イベントのヒットも外す ccSetAdvMobEventCollision( id, false ); if( ccIsTutorialGet( "TUTORIAL_052" ) == false ) then ccChangeTutorial( id, "TUTORIAL_052"); ccSuspendScript(); end ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "rbrdrun00" ); ccAdvPlay3dSeByCurPos( id, S_ADV_bird2 ); if( enable == true ) then ccCreateAdvItem( id, pos.x, pos.y, pos.z, 0.0, itemBoxId ); end ccMoveLengthAdvMob( id, 2000.0, 2000.0, 180 ); ccSuspendScript(); ccSetAdvMobDisp( id, false ); ------------------------------------------------------------------ -- EOF ------------------------------------------------------------------