------------------------------------------------------------------ -- \author tsuneoka -- \date ------------------------------------------------------------------ local id = ccGetScriptId(); local itemBoxId = ccGetItemBoxId( id ); local enable = ccGetEnableItemBox( id, itemBoxId ); local pos = ccGetAdvMobPosition( id ); local mobDir = ccGetAdvMobDirection( id ); ccSuspendScript(); if( ccIsTutorialGet( "TUTORIAL_052" ) == false ) then ccChangeTutorial( id, "TUTORIAL_052"); ccSuspendScript(); end ccSetAdvMobEventCollision( id, false ); local charaPos = ccGetPlayerPosition( id ); local vec = ccAdvEventVector3Sub( pos, charaPos ); local dot = ccAdvEventnuVector3Dot( vec, mobDir ); local state = ccGetAdvPlayerState(); if( state == CCD_ADV_CHARA_STATE_WALK ) then if( dot > 0 ) then ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "saxgim017_f00_n2" ); else ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "saxgim017_f00_n3" ); end else if( dot > 0 ) then ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "saxgim017_f00_n4" ); else ccSetAdvMobAnm( id, "data/stage/saxgim.xfbin", "saxgim017_f00_n5" ); end end ccAdvPlay3dSeByCurPos( id, S_ADV_signboardB1 ); mobDir = ccAdvEventVector3Scale( mobDir, 50.0 ); if( dot > 0 ) then pos.x = pos.x + mobDir.x; pos.y = pos.y + mobDir.y; else pos.x = pos.x - mobDir.x; pos.y = pos.y - mobDir.y; end ccCreateEffect( id, "data/stage/saxgim.xfbin", "saxgim017_efff00", pos.x, pos.y, pos.z ); ccWaitAdvMob( id, 5 ); ccSuspendScript(); ccAdvPlay3dSeByCurPos( id, S_ADV_signboardB2 ); if( enable == true ) then ccCreateAdvItem( id, pos.x, pos.y, pos.z, 0.0, itemBoxId ); end -- end ------------------------------------------------------------------ -- EOF ------------------------------------------------------------------