lundi 17 mars 2008

Ephemeral 2.1 New stuff and added tutorial

Hello again !

I've been busy for some time now, but I'm coming here with great news : The new version of Ephemeral is out.

List of changes since last version :

- Bug Fixes :
- The right-click menu can now be used when groupped.

- Localization :
- Added a localization.lua. The localization - in French for now - partially works, but will need some more work for the addon to be fully translated.

- Props API.

- I am currently adding some wrappers and new functions for an easier use of the Props scripting.


Ephemeral API


You can either use these functions by the "/script" command, or use them by scripting Props.

/!\ Parameters between [Brackets] are optional.

- Emote ( )
--> Wrapper that works like a "/e" command.

- Say ( )
--> Wrapper that works like a "/s" command.

Action( [, [, ] ] )
--> Send an Ephemeral broadcast for an anonymous RP action.
: description of the action
: true or false. If true, send both a chat message descripting the action, and an on-screen notice.
: "Zone", "target", or "playerName". If set to "Zone", will broadcast the action to all Ephemeral users in the zone (ie Stormwind City). If set to "target", will only send the descripted action to current target. If "playerName", will send the action to the specified player, no matter if he's the current target or not.

By default : = false and = nil. This means that the action will be sent either to the current zone (if no target), or the selected player (if there is a target).

- Sound ( [, [, ] ] )
--> Will broadcast a sound to the selected Ephemeral user(s).
: Relative path for the sound (can be a .wav or .mp3 from a Blizzard mpq)
: If true, send and an on-screen notice telling to turn on the sound.
: "Zone", "target", or "playerName". If set to "Zone", will broadcast the sound to all Ephemeral users in the zone (ie Stormwind City). If set to "target", will only send the sound to current target. If "playerName", will play the sound to the specified player, no matter if he's the current target or not.

- Music ( [, [, ] ] )
--> Will broadcast a music to the selected Ephemeral user(s).
: Relative path for the music (can be a .wav or .mp3 from a Blizzard mpq)
: true or false. If true, send and an on-screen notice telling to turn on the sound.
: "Zone", "target", or "playerName". If set to "Zone", will broadcast the action to all Ephemeral users in the zone (ie Stormwind City). If set to "target", will only send the music to current target. If "playerName", will play the music to the specified player, no matter if he's the current target or not.



Example Prop scripts :

Ex. 1, a poisoned beer.

local playerName = UnitName("player");
Emote(playerName.." is slowly drinking a beer, but seems to be shaking.");
Sound("Sound\\interface\\iDrinking1.wav");
Say("What the...");
Action(playerName.." has been poisoned and has fallen on the ground.", true, "Zone");


Ex. 2, a corrupted sword.

local playerName = UnitName("player"); -- We get the name of the player.
Sound("Sound\\Creature\\Ashbringer\\ASH_SPEAK_01.wav", true, "Zone")
Music("Sound\\Creature\\Voidwalker_VoidWraith\\VoidWalkerLoop.wav", false, "Zone")

local resist = math.random(100) -- test to see if the player is mentally strong enough
if resist > 80 then -- the player has 20% chance to have the sword obey him.
Say("Shut up, cursed sword. You WILL obey me.")
else -- game over :)
Emote(playerName.." is looking at the runesword, slowly smiling as he feels its unholy power flowing in his veins")
Say("Yes... I will kill them all... One - by - one." )
end


Don't hesitate to try out new things !

Good luck :)

Aucun commentaire: