// ZZ> This function makes an item fall to the floor when spawned IfSpawned // tmpargument = ACTIONJB // DoAction // KeepAction // MakeCrushValid MakeAmmoKnown IfCrushed tmpx = selfx tmpy = selfy tmpdistance = selfz tmpargument = 2 SpawnExactParticle SpawnExactParticle SpawnExactParticle SpawnExactParticle GoPoof tmpargument = 6 SendMessageNear IfDropped // Make it lie on floor KeepAction // IfHitGround // Make a sound tmpargument = 0 // tmpdistance = rand & 2047 + 10000 // PlaySound // IfInWater IfHeld GetState // NOP Else // Go blank GetContent tmpx = tmpargument tmpy = 0 IfXIsEqualToY tmpargument = 1 SetContent tmpargument = 5 SendMessageNear MakeNameKnown // To keep messages okay IfGrabbed // Tell them what they've won... SetTargetToWhoeverIsHolding // SetOwnerToTarget IfTargetIsAPlayer // GetContent SendMessageNear // IfUsed GetContent tmpx = tmpargument tmpy = 0 IfXIsEqualToY // Find Target state tmpargument = 1 SetState // Make sparklies around caster SetTargetToWhoeverIsHolding tmpx = targetx tmpy = targety tmpdistance = targetz tmpargument = 0 SpawnExactParticle // Make sparklies around target tmpargument = [NONE] tmpdistance = 5 // Dead friends SetTargetToNearestBlahID tmpx = targetx tmpy = targety tmpdistance = targetz tmpargument = 0 SpawnExactParticle Else // Can't use a blank scroll... tmpargument = 0 SetState tmpargument = 7 SendMessageNear tmpargument = 50 SetReloadTime Else // Has it been charged? IfStateIs1 // Revert to uncharged state tmpargument = 0 SetState // Respawn the target tmpargument = [NONE] tmpdistance = 5 // Dead friends SetTargetToNearestBlahID RespawnTarget // Play the gong sound tmpargument = 1 tmpdistance = 8000 PlayFullSound // Let all the players know tmpargument = 2 SendMessage // Give experience to caster IfNameIsKnown GetState Else SetTargetToWhoeverIsHolding tmpargument = 5 tmpdistance = EXPSECRET GiveExperienceToTarget MakeSimilarNamesKnown Else // Say that it didn't work... tmpargument = 3 SendMessageNear // Don't use a second one right away SetTargetToWhoeverIsHolding tmpargument = 20 SetTargetReloadTime // Get rid of a scroll CostAmmo IfAmmoOut GoPoof IfReaffirmed IfHeld GetState Else tmpx = selfx tmpy = selfy tmpdistance = selfz tmpargument = 2 SpawnExactParticle SpawnExactParticle SpawnExactParticle SpawnExactParticle GoPoof tmpargument = 4 SendMessageNear End // All done