Tigrounette « Consul » 1380187980000
| 98 | ||
How to use LUA script http://www.lua.org/docs.html launch a script : type /lua in chat You can only launch a lua script in your tribe house. Want some help ? /chat lua Last edit on 1402859820000 |
Tigrounette « Consul » 1380187980000
| 90 | ||
Version 0.28 Changelog: https://atelier801.com/topic?f=5&t=451587&p=1#m19 Lua tree _G assert bit32 coroutine debug
disableTimerLog getCurrentLuaThreadName traceback getmetatable ipairs math
acos asin atan atan2 ceil cos cosh deg exp floor fmod frexp huge ldexp log max min modf pi pow rad random randomseed sin sinh sqrt tan tanh os pairs pcall rawequal rawget rawlen rawset select setmetatable string system
bindMouse disableChatCommandDisplay exit giveEventGift loadFile loadPlayerData luaEventLaunchInterval newTimer removeTimer saveFile savePlayerData tfm
speed : 1 death : 2 spring : 3 booster : 5 electricArc : 6
laugh : 1 cry : 2 kiss : 3 angry : 4 clap : 5 sleep : 6 facepaw : 7 sit : 8 confetti : 9 flag : 10 marshmallow : 11 selfie : 12 highfive : 13 highfive_1 : 14 highfive_2 : 15 partyhorn : 16 hug : 17 hug_1 : 18 hug_2 : 19 jigglypuff : 20 kissing : 21 kissing_1 : 22 kissing_2 : 23 carnaval : 24 rockpaperscissors : 25 rockpaperscissors_1 : 26 rockpaperscissor_2 : 27
ice : 1 trampoline : 2 lava : 3 chocolate : 4 earth : 5 grass : 6 sand : 7 cloud : 8 water : 9 stone : 10 snow : 11 rectangle : 12 circle : 13 invisible : 14 web : 15 yellowGrass : 17 pinkGrass : 18 acid : 19
blueGlitter : 1 orangeGlitter : 2 cloud : 3 dullWhiteGlitter : 4 heart : 5 bubble : 6 tealGlitter : 9 spirit : 10 yellowGlitter : 11 ghostSpirit : 12 redGlitter : 13 waterBubble : 14 plus1 : 15 plus10 : 16 plus12 : 17 plus14 : 18 plus16 : 19 meep : 20 redConfetti : 21 greenConfetti : 22 blueConfetti : 23 yellowConfetti : 24 diagonalRain : 25 curlyWind : 26 wind : 27 rain : 28 star : 29 littleRedHeart : 30 littlePinkHeart : 31 daisy : 32 bell : 33 egg : 34 projection : 35 mouseTeleportation : 36 shamanTeleportation : 37 lollipopConfetti : 38 yellowCandyConfetti : 39 pinkCandyConfetti : 40
littleBox : 1 box : 2 littleBoard : 3 board : 4 ball : 6 trampoline : 7 anvil : 10 cannon : 17 bomb : 23 orangePortal : 26 blueBalloon : 28 redBalloon : 29 greenBalloon : 30 yellowBalloon : 31 rune : 32 chicken : 33 snowBall : 34 cupidonArrow : 35 apple : 39 sheep : 40 littleBoardIce : 45 littleBoardChocolate : 46 iceCube : 54 cloud : 57 bubble : 59 tinyBoard : 60 companionCube : 61 stableRune : 62 balloonFish : 65 longBoard : 67 triangle : 68 sBoard : 69 paperPlane : 80 rock : 85 pumpkinBall : 89 tombstone : 90 paperBall : 95
addConjuration addImage addJoint addPhysicObject addShamanObject attachBalloon bindKeyboard changePlayerSize chatMessage disableAfkDeath disableAllShamanSkills disableAutoNewGame disableAutoScore disableAutoShaman disableAutoTimeLeft disableDebugCommand disableMinimalistMode disableMortCommand disablePhysicalConsumables disablePrespawnPreview disableWatchCommand displayParticle explosion freezePlayer getPlayerSync giveCheese giveConsumables giveMeep giveTransformations killPlayer linkMice lowerSyncDelay moveObject movePlayer newGame playEmote playerVictory removeBonus removeCheese removeImage removeJoint removeObject removePhysicObject respawnPlayer setAutoMapFlipMode setGameTime setNameColor setPlayerSync setPlayerScore setRoomMaxPlayers setRoomPassword setShaman setShamanMode setUIMapName setUIShamanName setVampirePlayer setWorldGravity snow
transformiceVersion : 6.09
language : int isTribeHouse : false currentMap : 0 maxPlayers : 50 mirroredMap : false name : - objectList
baseType : 2 colors
2 3 id : 1 type : 203 vx : 0 vy : 0 x : 400 y : 200 playerList
community : en gender : 0 hasCheese : false id : 0 inHardMode : 0 isDead : true isFacingRight : true isInvoking : false isJumping : false isShaman : false isVampire : false language : int look : 1;0,0,0,0,0,0,0,0,0 movingLeft : false movingRight : false playerName : Tigrounette#0001 registrationDate : 0 score : 0 shamanMode : 0 spouseId : 1 spouseName : Pikashu#0095 title : 0 tribeId : 1234 tribeName : Kikoo vx : 0 vy : 0 x : 0 y : 0 xmlMapInfo
mapCode : 184924 permCode : 1 xml : <C><P /><Z><S /><D /><O /></Z></C> tostring type ui
addTextArea removeTextArea setBackgroundColor setMapName setShamanName showColorPicker updateTextArea Last edit on 1643407800000 |
Pikashu « Consul » 1446120300000
| 84 | ||
Events • eventChatCommand ( playerName, command ) This event is triggered when a player uses a chat command (a message beginning with « ! »). Arguments: - playerName (String) : the player who sent the command - command (String) : the message (without the initial « ! ») • eventChatMessage ( playerName, message ) This event is triggered when a player talks in the room chat. Arguments: - playerName (String) : the player who sent the message - message (String) : the message • eventContactListener ( playerName, groundId, contactInfo ) This event is triggered when a player hits a ground with a contact listener. Arguments: - playerName (String) : the player who hit the ground - groundId (Int) : the ground identifier - contactInfo (Table) : Collision informations - contactX (Int), contactY (Int), playerX (Int), playerY (Int), speedX (Int), speedY (Int) • eventEmotePlayed ( playerName, emoteType, emoteParam ) This event is triggered when the player does an emote. Arguments: - playerName (String) : the player who did the emote - emoteType (Int) : the type of emote played - emoteParam (String) : the parameter used with the emote (only applies to the flag one) • eventFileLoaded ( fileNumber, fileData ) This event is triggered when a file gets fully loaded. Arguments: - fileNumber (String) : the file identifier - fileData (String) : the file data • eventFileSaved ( fileNumber ) This event is triggered when a file gets saved. Arguments: - fileNumber (String) : the name of the file • eventKeyboard ( playerName, keyCode, down, xPlayerPosition, yPlayerPosition ) This event is triggered when a player presses a key. Arguments: - playerName (String) : the player who typed the key - keyCode (Int) : the code of the typed key - down (Boolean) : whether it was the press event, or the release one - xPlayerPosition (Int) : the horizontal coordinate of the player when he or she typed the key - yPlayerPosition (Int) : the vertical coordinate of the player when he or she typed the key • eventMouse ( playerName, xMousePosition, yMousePosition ) This event is triggered when a player perfoms a mouse click. Arguments: - playerName (String) : the player who made the click - xMousePosition (Int) : the horizontal coordinate of the mouse click - yMousePosition (Int) : the vertical coordinate of the mouse click • eventLoop ( elapsedTime, remainingTime ) This event occurs every 500 milliseconds. Arguments: - elapsedTime (Int) : the time in milliseconds elapsed since the beginning of the round - remainingTime (Int) : the time in milliseconds remaining before the next round • eventNewGame () This event is triggered when a new round begins. • eventNewPlayer ( playerName ) This event is triggered when a new player joins the room. Arguments: - playerName (String) : the player who joined the room • eventPlayerDataLoaded ( playerName, playerData ) This event is triggered when player data gets loaded. Arguments: - playerName (String) : the player whose data got loaded - playerData (String) : the data about the player • eventPlayerDied ( playerName ) This event is triggered when a player dies. Arguments: - playerName (String) : the player who died • eventPlayerGetCheese ( playerName ) This event is triggered when a player gets the cheese. Arguments: - playerName (String) : the player who got the cheese • eventPlayerBonusGrabbed ( playerName, bonusId ) This event is triggered when a player grabs a bonus of type 0 (point). Arguments: - playerName (String) : the player who grabbed the bonus - bonusId (Int) : bonus identifier (if the bonus belongs to the map, this will be 0) • eventPlayerLeft ( playerName ) This event is triggered when a player leaves the room. Arguments: - playerName (String) : the player who left the room • eventPlayerVampire ( playerName, vampire ) This event is triggered when a player turns into a vampire. Arguments: - playerName (String) : the player who turned into a vampire - vampire (String) : the vampire who contamined the player (or nil if it hasn't been contamined by another player) • eventPlayerWon ( playerName, timeElapsed, timeElapsedSinceRespawn ) This event triggers when a player enters the hole. Arguments: - playerName (String) : the player who entered the hole - timeElapsed (Int) : the time in milliseconds elapsed since the beginning of the round - timeElapsedSinceRespawn (Int) : the time in milliseconds elapsed since the last respawn • eventPlayerRespawn ( playerName ) This event is triggered when a player respawns. Arguments: - playerName (String) : the player who respawned • eventPlayerMeep ( playerName, xPosition, yPosition ) This event is triggered when a player meeps. Arguments: - playerName (String) : the player who meeped - xPosition (Int) : the horizontal coordinate of the player when they meeped - yPosition (Int) : the vertical coordinate of the player when they meeped • eventPopupAnswer ( popupId, playerName, answer ) This event is triggered when a player answers a popup (only type 1 and 2 popups). Arguments: - popupId (Int) : the popup identifier - playerName (String) : the player who answered the popup - answer (String) : the player's answer - yes or no for a type 1 popup - any string for a type 2 poup • eventSummoningStart ( playerName, objectType, xPosition, yPosition, angle ) This event is triggered when a player starts summoning a shaman object. Arguments: - playerName (String) : the player who started summoning - objectType (Int) : the kind of shaman object being summoned - xPosition (Int) : the horizontal coordinate of the summoning point - yPosition (Int) : the vertical coordinate of the summoning point - angle (Int) : the rotation angle of the object being summoned • eventSummoningCancel ( playerName ) This event is triggered when a player cancels an object invocation. Arguments: - playerName (String) : the player who stopped summoning • eventSummoningEnd ( playerName, objectType, xPosition, yPosition, angle, objectDescription ) This event triggers when a player has finished an invocation. Arguments: - playerName (String) : the player who summoned the object - objectType (Int) : the kind of the object - xPosition (Int) : the horizontal position of the summoned object - yPosition (Int) : the vertical position of the summoned object - angle (Int) : the rotation angle of the summoned object - objectDescription (Table) : the object table description as it would appear in the room's objectList • eventTalkToNPC ( playerName, npcName ) This event is triggered when a player clicks in an interactive NPC. Arguments: - playerName (String) : the name of the player who clicked the NPC - npcName (String) : the name of the NPC • eventTextAreaCallback ( textAreaId, playerName, eventName ) This event is triggered when a player clicks a text event. Text event links are anchors tags links beginning with the "event:" string (e.g. : <a href="event:callbackString">Click here</a>). If the link eventName begins with '#clear,' the text area will be cleared, and the received eventName will be the text following the coma. Arguments: - textAreaId (Int) : the text area identifier - playerName (String) : the player who clicked - eventName (String) : the name of the clicked text event • eventColorPicked ( colorPickerId, playerName, color ) This event is triggered when a player chooses a color with a color picker. Arguments: - colorPickerId (Int) : the color picker identifier - playerName (String) : the player who picked a color - color (Int) : the color picked (-1 if the player didn't pick one)) Last edit on 1647124860000 |
Pikashu « Consul » 1446125520000
| 80 | ||
Functions • debug.disableEventLog ( activate ) Deactivates the events log. Parameters: - activate (Boolean) : whether it should be active (default value = true) • system.bindKeyboard ( playerName, keyCode, down, activate ) Listens to the player's keyboard events. Parameters: - playerName (String) : the player you want to listen keyboard events from - keyCode (Int) : the code of the key you want to listen - to accurately listen for player movement (both arrows and wasd/zqsd keys), you can use 0 (left), 1 (up), 2 (right) or 3 (down) - regular AS3 keycodes can be found on Adobe website - down (Boolean) : whether it should listen for the press event, or the release one - activate (Boolean) : whether it should be active (default value = true) • system.bindMouse ( playerName, active ) Listens to a player's mouse events. Parameters: - playerName (String) : the player you want to listen mouse events from - active (Boolean) : whether it should be active (default value = true) • system.disableChatCommandDisplay ( command, hide ) Prevents a module command (commands starting with « ! ») to be displayed in the room. If the supplied command is nil, the parameter will apply to all the commands. Parameters: - command (String) : the command (without the initial « ! ») to hide (default value = nil) - hide (Boolean) : whether the command should be hided (default value = true) • system.exit () Deactivates the lua script running. • system.giveEventGift ( playerName, giftCode ) Gives an event reward to the targeted player. Parameters: - playerName (String) : the player to give the gift to - giftCode (String) : the gift identifier (given by an admin) • system.loadFile ( fileNumber ) Requests the loading of a data file. The event eventFileLoaded is triggered when the file gets loaded. Parameters: - fileNumber (Int) : the identifier of the file to load (default value = 0) Returns: (Boolean) whether the loading got started • system.loadPlayerData ( playerName ) Requests the loading of the player's data for this module. The event eventPlayerDataLoaded is triggered when the player data gets loaded. Parameters: - playerName (String) : the player about whom you want to get the data Returns: (Boolean) whether the loading got started • system.luaEventLaunchInterval ( interval, random ) Gets or sets the timer interval between two Lua events. Parameters: - interval (Int) : timer interval in minutes (default value = 40) - random (Int) : random added interval in minutes (default value = 20) Returns: (Table) current interval settings • system.newTimer ( callback, time, loop, arg1, arg2, arg3, arg4 ) Creates a new timer to call a function after a delay, once or continuously. Parameters: - callback (Function) : The function to call - time (Int) : the number of milliseconds that the function call should be delayed by - loop (Boolean) : whether the function call should loop or happen only once (default value = false) - arg1 (Object) : 1st argument of the callback function (default value = nil) - arg2 (Object) : 2nd argument of the callback function (default value = nil) - arg3 (Object) : 3rd argument of the callback function (default value = nil) - arg4 (Object) : 4th argument of the callback function (default value = nil) Returns: (Int) the new timer id • system.removeTimer ( timerId ) Destroys a timer. Parameters: - timerId (Int) : the identifier of the timer to stop • system.saveFile ( data, fileNumber ) Requests the saving of a data file (throttled to one per minute). The event eventFileSaved is triggered when the file get saved. Parameters: - data (String) : the data to store in the file - fileNumber (Int) : the identifier (from 0 to 99) of the file to write the data in (default value = 0) Returns: (Boolean) whether the saving got started • system.savePlayerData ( playerName, data ) Saves module data about a player. Please note that this data is per player and per Lua dev, so take care not to overwrite data from another one of your modules. Parameters: - playerName (String) : the player about whom you want to save data - data (String) : the player data to save • system.setLuaEventBanner ( bannerId ) Sets the event banner in the login page. Parameters: - bannerId (Number) : the banner id • tfm.exec.addBonus ( type, x, y, id, angle, visible, targetPlayer ) Adds a defilante bonus to the map, and if it is of type 0 (point), it will trigger eventPlayerBonusGrabbed when someone grabs it. Parameters: - type (Int) : Bonus type (see tfm.enum.bonus) (default value = 1) - x (Int) : X position. (default value = 0) - y (Int) : Y position. (default value = 0) - id (Int) : Identifier. (default value = 0) - angle (Int) : Angle (deg). (default value = 0) - visible (Boolean) : Make the bonus visible or not. (default value = true) - targetPlayer (String) : Send only to this specific player. (default value = nil) • tfm.exec.addConjuration ( xPosition, yPosition, duration ) Adds conjuration to the map. Note: Grid coordinate are regular coordinate divided by 10 (as conjuration is a 10x10 pixel square). Parameters: - xPosition (Int) : the horizontal grid coordinate of the conjuration - yPosition (Int) : the vertical grid coordinate of the conjuration - duration (Int) : the duration of the conjuration in milliseconds (default value = 10000) • tfm.exec.addImage ( imageId, target, xPosition, yPosition, targetPlayer, scaleX, scaleY, angle, alpha, anchorX, anchorY ) Displays an image on the map. Parameters: - imageId (String) : the image identifier - target (String) : the game element to attach the image to - #mobileId (with the object sprite removed) - $playerName (on the mouse sprite) - %playerName (with the mouse sprite removed) - ?backgroundLayerDepth - _groundLayerDepth - !foregroundLayerDepth - &fixedLayerDepthBeforeLuaInterfaces - :fixedLayerDepthBehindLuaInterfaces - +physicObjectID - ~interfaceLayerDepth - =mobileId (on the object sprite) - xPosition (Int) : the horizontal offset of the top-left corner of the image (0 being the middle of the game element) (default value = 0) - yPosition (Int) : the vertical offset of the top-left corner of the image (0 being the middle of the game element) (default value = 0) - targetPlayer (String) : the player who will see the image (if nil, applies to all players) (default value = nil) - scaleX (Number) : the X (width) scale of the image (default value = 1) - scaleY (Number) : the Y (height) scale of the image (default value = 1) - angle (Number) : the angle of the image (in radians) (default value = 0) - alpha (Number) : the image opacity (default value = 1) - anchorX (Number) : The horizontal anchor in which the image's angle will use. (from -1 to 1, 0.5 being the center) (default value = 0) - anchorX (Number) : The vertical anchor in which the image's angle will use. (from -1 to 1, 0.5 being the center) (default value = 0) Returns: (Int) the image identifier • tfm.exec.addJoint ( id, ground1, ground2, jointDef ) Adds a joint between two physic objects. . Note: In map XML codes, you can also add a « lua="id" » property in a joint definition to be able to interact with it with Lua code. Parameters: - id (Int) : the identifier of the joint - ground1 (Int) : the first ground the joint will affect - ground2 (Int) : the second ground the joint will affect - jointDef (Table) : the ground description - type (Int): 0 -> distance joint, 1 -> prismatic joint, 2 -> pulley joint, 3 -> revolute joint - point1 (String "x,y"): location of the ground1 anchor (default: the ground1's center) - point2 (String "x,y"): location of the ground2 anchor (default: the ground2's center), only used with distance and pulley joints - point3 (String "x,y"), point4 (String "x,y"): locations of the pulley's anchors, only used with pulley joints - frequency (Float), damping (Float): distance joints' frequency and damping ratio - axis (String "x,y"), angle (Int): prismatic joints' axis and angle - limit1 (Float), limit2 (Float), forceMotor (Float), speedMotor (Float): prismatic and revolute joints' translation/rotation limits and motors - ratio (Float): revolute joints' ratio - line (Int), color (Int), alpha (Float), foreground (Boolean): if none of these properties is defined, the joint won't be drawn • tfm.exec.addNPC ( npcName, npcDef ) Places a NPC in the map. Parameters: - npcName (String) : the name of the NPC - npcDef (Table) : the NPC description - title (Int), look (String), x (Int), y (Int), female (Boolean), lookLeft (Boolean), lookAtPlayer (Boolean), interactive (Boolean) • tfm.exec.addPhysicObject ( id, xPosition, yPosition, bodyDef ) Spawns a ground. Parameters: - id (Int) : the identifier of the physic object - xPosition (Int) : the horizontal coordinate of the center of the ground - yPosition (Int) : the vertical coordinate of the center of the ground - bodyDef (Table) : the ground description - type (Int), width (Int), height (Int), foreground (Boolean), friction (Float), restitution (Float), angle (Int), color (Int), miceCollision (Boolean), groundCollision (Boolean) - dynamic (Boolean), fixedRotation (Boolean), mass (Int), linearDamping (Float), angularDamping (Float) for dynamic grounds • tfm.exec.addShamanObject ( objectType, xPosition, yPosition, angle, xSpeed, ySpeed, ghost, options ) Spawns a shaman object. Parameters: - objectType (Int) : the type of the shaman object to spawn - xPosition (Int) : the horizontal position of the spawn - yPosition (Int) : the vertical position of the spawn - angle (Int) : the rotation angle of the object, in degrees (default value = 0) - xSpeed (Int) : the horizontal speed of the object (default value = 0) - ySpeed (Int) : the vertical speed of the object (default value = 0) - ghost (Boolean) : whether the spawned object should be transparent (default value = false) - options (Table) : the object description - fixedXSpeed (Number), fixedYSpeed (Number) Returns: (Int) the shaman object identifier • tfm.exec.attachBalloon ( playerName, isAttached, colorType, ghost, , speed ) Attaches a balloon to player. Parameters: - playerName (String) : the player's nickname - isAttached (Boolean) : whether the balloon should be attached or detached from the player (default value = true) - colorType (Int) : the color type of the balloon [1-4] (default value = 1) - ghost (Boolean) : whether the spawned balloon should be transparent (default value = false) - speed (Number) : the vertical speed of the balloon. (default value = 1) • tfm.exec.changePlayerSize ( playerName, size ) Changes the size of a player. Parameters: - playerName (String) : the player's nickname - size (Number) : the new size of the player (between 0.1 and 5) (default value = 1) • tfm.exec.chatMessage ( message, playerName ) Displays a chat message. Parameters: - message (String) : the chat message to display - playerName (String) : the player who will get the message (if nil, applies to all players) (default value = nil) • tfm.exec.disableAfkDeath ( activate ) Deactivates the automatic afk death. Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disableAllShamanSkills ( active ) Deactivates all shaman skills. Parameters: - active (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disableAutoNewGame ( activate ) Deactivates the automatic renewal of rounds. Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disableAutoScore ( activate ) Deactivates the automatic scoring management. Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disableAutoShaman ( activate ) Deactivates the automatic selection of shaman. Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disableAutoTimeLeft ( activate ) Deactivates the automatic remaining time change to 20s (when the shaman dies for example). Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disableDebugCommand ( activate ) Disables the effects of the /debug command. Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disableMinimalistMode ( activate ) Disables the minimalist mode. Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disableMortCommand ( activate ) Disables the /mort command. Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disablePhysicalConsumables ( active ) Deactivates physical consumables (like in racing and bootcamp rooms). Parameters: - active (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.disablePrespawnPreview ( display ) Enables or disables the shaman objects prespawn preview. Parameters: - display (Boolean) : whether the prespawn preview should not be displayed (default value = true) • tfm.exec.disableWatchCommand ( activate ) Disables the effects of the /watch command. Parameters: - activate (Boolean) : whether the deactivation should be active (default value = true) • tfm.exec.displayParticle ( particleType, xPosition, yPosition, xSpeed, ySpeed, xAcceleration, yAcceleration, targetPlayer ) Displays a particle. Parameters: - particleType (Int) : the kind of particle you want to display - xPosition (Int) : the horizontal coordinate of the particle - yPosition (Int) : the vertical coordinate of the particle - xSpeed (Number) : the horizontal speed of the particle (default value = 0) - ySpeed (Number) : the vertical speed of the particle (default value = 0) - xAcceleration (Number) : the horizontal acceleration of the particle (default value = 0) - yAcceleration (Number) : the vertical acceleration of the particle (default value = 0) - targetPlayer (String) : the player who should see the particle (if nil, applies to all players) (default value = nil) • tfm.exec.explosion ( xPosition, yPosition, power, radius, miceOnly ) Throws an explosion. Parameters: - xPosition (Int) : the horizontal coordinate of the center of the explosion - yPosition (Int) : the vertical coordinate of the center of the explosion - power (Int) : the maximum power of the explosion - radius (Int) : the explosion radius (players further away won't be affected) - miceOnly (Boolean) : whether the explosion should affect only mice, or objects too (default value = false) • tfm.exec.freezePlayer ( playerName, freeze, displayIce ) Freezes a player. Parameters: - playerName (String) : the player who is going to be frozen - freeze (Boolean) : if the player should be frozen (default value = true) - displayIce (Boolean) : if the ice image should be displayed on the player (default value = true) • tfm.exec.getPlayerSync ( ) Gets the room's sync player. • tfm.exec.giveCheese ( playerName ) Gives the cheese to a player. Parameters: - playerName (String) : the player who should get the cheese • tfm.exec.giveConsumables ( playerName, consumableId, amount ) Gives consumables to the targeted player. Parameters: - playerName (String) : the player to give the gift to - consumableId (String) : the consumable identifier - amount (String) : the amount of consumables to give (default value = "1") • tfm.exec.giveMeep ( playerName, canMeep ) Gives the meep competence to a player, or removes it. Parameters: - playerName (String) : the player's nickname - canMeep (Boolean) : whether the player should be able to meep (default value = true) • tfm.exec.giveTransformations ( playerName, canTransform ) Gives the transformations to a player, or removes them. Parameters: - playerName (String) : the player's nickname - canTransform (Boolean) : whether the player should be able to use transformations (default value = true) • tfm.exec.killPlayer ( playerName ) Kills the selected player. Parameters: - playerName (String) : the player to kill • tfm.exec.linkMice ( playerName1, playerName2, linked ) Allows to link players like in soulmate maps. Parameters: - playerName1 (String) : the first player's nickname - playerName2 (String) : the second player's nickname - linked (Boolean) : whether the two players should be linked (default value = true) • tfm.exec.lowerSyncDelay ( playerName ) Lowers the synchronization delay of a player to 400ms max Parameters: - playerName (String) : the player who should have a lower sync delay • tfm.exec.moveObject ( objectId, xPosition, yPosition, positionOffset, xSpeed, ySpeed, speedOffset, angle, angleOffset ) Defines the speed and position of a shaman object. Parameters: - objectId (Int) : the shaman object identifier - xPosition (Int) : the horizontal coordinate of the point where the object will be moved - yPosition (Int) : the vertical coordinate of the point where the object will be moved - positionOffset (Boolean) : whether the specified position is an offset to apply to the current one, or the absolute one (default value = false) - xSpeed (Int) : the horizontal coordinate of the speed to give to the object (default value = 0) - ySpeed (Int) : the vertical coordinate of the speed to give to the object (default value = 0) - speedOffset (Boolean) : whether the specified speed is an offset to apply to the current one, or the absolute one (default value = false) - angle (Int) : the angle of the the object (default value = 0) - angleOffset (Boolean) : whether the specified angle is an offset to apply to the current one, or the absolute one (default value = false) • tfm.exec.movePlayer ( playerName, xPosition, yPosition, positionOffset, xSpeed, ySpeed, speedOffset ) Defines the speed and position of a player. Parameters: - playerName (String) : the player to move - xPosition (Int) : the horizontal coordinate of the point where the player will be moved - yPosition (Int) : the vertical coordinate of the point where the player will be moved - positionOffset (Boolean) : whether the specified position an offset to apply to the current one, or the absolute one (default value = false) - xSpeed (Int) : the horizontal coordinate of the speed to give to the player (default value = 0) - ySpeed (Int) : the vertical coordinate of the speed to give to the player (default value = 0) - speedOffset (Boolean) : whether the specified speed an offset to apply to the current one, or the absolute one (default value = false) • tfm.exec.newGame ( mapCode, flipped ) Starts a new game Parameters: - mapCode (String) : the map code (default value = nil) - nil (a random map) - 6 (vanilla map) - @42583 (editor map) - #4 (perm category map) - anything beginning with '<' (xml map) - flipped (Boolean) : whether the map should be flipped (default value = nil (randomly mirrored in racing and bootcamp rooms, unless)) • tfm.exec.playEmote ( playerName, emoteId, emoteArg ) Makes a player do an emote. Parameters: - playerName (String) : the player who should do the emote - emoteId (Int) : the emote to do - emoteArg (String) : the emote attribute (for the flag emote for example) (default value = nil) • tfm.exec.playerVictory ( playerName ) Makes a player enter the hole. It only works if the player already has a cheese! Parameters: - playerName (String) : the player who should win • tfm.exec.removeBonus ( id, targetPlayer ) Removes a bonus previously spawned with tfm.exec.addBonus Parameters: - id (Int) : Identifier. (default value = 0) - targetPlayer (String) : Send only to this specific player. (default value = nil) • tfm.exec.removeCheese ( playerName ) Takes away the cheese from a player. Parameters: - playerName (String) : the player who should get their cheese removed • tfm.exec.removeImage ( imageId ) Removes an image. Parameters: - imageId (Int) : the image identifier • tfm.exec.removeJoint ( id ) Removes a joint from the game. Parameters: - id (Int) : the identifier of the joint to remove • tfm.exec.removeObject ( objectId ) Removes a shaman object. Parameters: - objectId (Int) : the shaman object identifier • tfm.exec.removePhysicObject ( id ) Removes a ground from the game. Parameters: - id (Int) : the identifier of the ground to remove • tfm.exec.respawnPlayer ( playerName ) Respawns a player. Parameters: - playerName (String) : the player to respawn • tfm.exec.setAieMode ( enable, sensibility, targetPlayer ) Enables the AIE mode (when mice die when they hit something too hard). Lasts until the next map. Parameters: - enable (Boolean) : whether the AIE mode should be enabled (default value = true) - sensibility (Number) : sensibility of the AIE mode (default value = 1) - targetPlayer (String) : the player in which the AIE mode should be enabled to (default value = nil) • tfm.exec.setAutoMapFlipMode ( flipped ) Sets whether the following maps should be flipped (always, never, or TFM's default behaviour). Parameters: - flipped (Boolean) : whether the maps should be flipped (default value = nil (the default TFM behaviour)) • tfm.exec.setGameTime ( time, init ) Sets the game remaining time. Parameters: - time (Int) : the remaining time in seconds - init (Boolean) : whether the remaining time should change even if the specified remaining time is higher than the current one (default value = true) • tfm.exec.setNameColor ( playerName, color ) Changes a player's nickname's color. Parameters: - playerName (String) : the player whose nickname should be colored - color (Int) : the color of the nickname • tfm.exec.setPlayerGravityScale ( playerName, gravityScale ) Sets the world's gravity scale for a player. Parameters: - playerName (String) : the player who should get their gravity changed - gravityScale (Number) : the gravity scale (default value = 1) • tfm.exec.setPlayerNightMode ( enable, playerName ) Enables the night mode for a player. Parameters: - enable (Boolean) : whether the night mode should be enabled (default value = true) - playerName (String) : the player whom should have the night mode enabled (default value = nil) • tfm.exec.setPlayerScore ( playerName, score, add ) Sets the player's score. Parameters: - playerName (String) : the player who should get his or her score changed - score (Int) : the score - add (Boolean) : whether the current score should be added to the specified one (default value = false) • tfm.exec.setPlayerSync ( playerName ) Defines the new room's sync player. Parameters: - playerName (String) : the username of the player who is going to be the sync. Use nil for the server to choose. • tfm.exec.setRoomMaxPlayers ( maxPlayers ) Sets the max number of players in a room. Parameters: - maxPlayers (Int) : the maximum number of players the room can hold • tfm.exec.setRoomPassword ( password ) Password-protects a room. Parameters: - password (String) : the string to set as the password (an empty string removes the protection) • tfm.exec.setShaman ( playerName, makeAShaman ) Makes a player a shaman. Parameters: - playerName (String) : the player who should become a shaman - makeAShaman (Boolean) : whether the player should be a shaman (default value = true) • tfm.exec.setShamanMode ( playerName, mode ) Changes the shaman mode of a player. Parameters: - playerName (String) : the player's nickname who will have another shaman mode - mode (Int) : the new shaman mode of the target (use nil to use the player's real mode) (default value = nil) • tfm.exec.setVampirePlayer ( playerName, makeAVampire ) Makes a player a vampire. Parameters: - playerName (String) : the player to make a vampire - makeAVampire (Boolean) : whether the player should be a vampire (default value = true) • tfm.exec.setWorldGravity ( x, y ) Allows you to change the world forces on the x axis (wind) and on the y axis (gravity). Parameters: - x (Int) : force on the x axis (wind) (default value = 0) - y (Int) : force on the y axis (gravity) (default value = 10) • tfm.exec.snow ( duration, snowballPower ) Makes the snow fall. Parameters: - duration (Int) : the snowfall duration in seconds (default value = 60) - snowballPower (Int) : (default value = 10) • ui.addPopup ( id, type, text, targetPlayer, x, y, width, fixedPos ) Displays a popup. Parameters: - id (Int) : the identifier of the popup - type (Int) : the popup type (0 for simple, 1 for yes or no, 2 for player input) - text (String) : the text to display - targetPlayer (String) : the player who will see the popup (if nil, applies to all players) - x (Int) : the horizontal coordinate of the top-left corner (default value = 50) - y (Int) : the vertical coordinate of the top-left corner (default value = 50) - width (Int) : the width in pixels of the popup (if 0, it will be ajusted to the text width) (default value = 0) - fixedPos (Boolean) : whether the position is fixed or if it should follow the player's camera on long maps (default value = false) • ui.addTextArea ( id, text, targetPlayer, x, y, width, height, backgroundColor, borderColor, backgroundAlpha, fixedPos ) Displays a text area. Parameters: - id (Int) : the identifier of the text area - text (String) : the text to display - targetPlayer (String) : the player who will see the text area (if nil, applies to all players) (default value = nil) - x (Int) : the horizontal coordinate of the top-left corner (default value = 50) - y (Int) : the vertical coordinate of the top-left corner (default value = 50) - width (Int) : the width in pixels of the text area (if 0, it will be ajusted to the text width) (default value = 0) - height (Int) : the height in pixels of the text area (if 0, it will be ajusted to the text height) (default value = 0) - backgroundColor (Int) : the background color of the text area (default value = 0x324650) - borderColor (Int) : the border color of the text area (default value = 0) - backgroundAlpha (Number) : the background's opacity, from 0 (transparent) to 1 (opaque) (default value = 1) - fixedPos (Boolean) : whether the position is fixed or if it should follow the player's camera on long maps (default value = false) • ui.removeTextArea ( id, targetPlayer ) Removes a text area. Parameters: - id (Int) : the identifier of the text area - targetPlayer (String) : the player whom the text area will disappear (if nil, applies to all players) (default value = nil) • ui.setBackgroundColor ( color ) Sets the background color. Lasts one map. Parameters: - color (String) : the background color (default value = #6A7495) • ui.setMapName ( text ) Sets the map name. Parameters: - text (String) : the text to display as the map name • ui.setShamanName ( text ) Sets the shaman name. Parameters: - text (String) : the text to display as the shaman name • ui.showColorPicker ( id, targetPlayer, defaultColor, title ) Displays a color picker. Parameters: - id (Int) : the identifier of the color picker - targetPlayer (String) : the player who will see the color picker (if nil, applies to all players) (default value = nil) - defaultColor (Int) : the default color on the color picker (default value = 0) - title (String) : the title of the color picker (default value = nil) • ui.updateTextArea ( id, text, targetPlayer ) Updates the content of a text area. Parameters: - id (Int) : the identifier of the text area - text (String) : the new text to display - targetPlayer (String) : the player who will get displayed the new text (if nil, applies to all players) (default value = nil) Last edit on 1647126360000 |
Pikashu « Consul » 1453480560000
| 75 | ||
29/10/2015 changes
22/01/2016 changes (version 0.21)
Last edit on 1621104480000 |
Pikashu « Consul » 1460721900000
| 78 | ||
15/04/2016 changes (version 0.22)
Last edit on 1460722200000 |
Pikashu « Consul » 1480692420000
| 79 | ||
02/12/2016 changes (version 0.23) NEW:
Bugfixes:
Miscellaneous:
Last edit on 1480694880000 |
Pikashu « Consul » 1486468020000
| 87 | ||
07/02/2017 changes (version 0.24) NEW:
Bugfixes:
|
Pikashu « Consul » 1499090340000
| 95 | ||
30/06/2017 changes (version 0.25) NEW:
|
Pikashu « Consul » 1503065760000
| 93 | ||
28/07/2017 changes (version 0.26) BUGFIXES:
|
Pikashu « Consul » 1538059020000
| 122 | ||
27/09/2018 changes (version 0.27) NEW FUNCTIONS
NEW EVENTS
OTHER NOVELTIES
CHANGES
BUGFIXES
Last edit on 1550568300000 |
Pikashu « Consul » 1550568300000
| 100 | ||
18/02/2019 changes (version 0.28) NEW FUNCTIONS
BUGFIXES
|
Jordy « Consul » 1604356440000
| 69 | ||
Changes (version 0.28) NOTES
NEW FUNCTIONS
NEW EVENTS
OTHER NOVELTIES
|
Jordy « Consul » 1611267720000
| 35 | ||||
Hello everyone, we have exciting news for you! Players can now use the functions tfm.exec.addImage and tfm.exec.removeImage! # Image codes (aka image hosting) Images that break the Rules of the game or that are just inappropriate in any sense will not be hosted. Members of the Module Team can host images, which means that if you would like to use an image, you can request them in this thread or ask one of them privately. Remember that hosting images are not our duty, so not everyone will be willing to host your images. # Documentation tfm.exec.addImage(imageName, target, xPosition, yPosition,targetPlayer) Effect: Displays an image. Returns the ID of the image. Arguments:
Example: Lua code 1 tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30) tfm.exec.removeImage(imageID) Effect: Removes an image. Arguments:
Example: Lua code 1 2 imageID = tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30)
Olá pessoal, nós temos ótimas notícias para anunciar! Jogadores agora podem utilizar as funções tfm.exec.addImage e tfm.exec.removeImage! # Hospedagem de Imagens Imagens inapropiadas ou que violarem as Regras do jogo não serão hospedadas. Membros da Module Team podem hospedar imagens, o que significa que se você deseja utilizar uma imagem específica, você poderá solicitar nesse tópico ou pedí-los privadamente. Lembre-se que eles não são obrigados a hospedá-las, então nem todos podem estar dispostos a fazê-lo. # Documentação tfm.exec.addImage(códigoDaImagem, alvo, posiçãoX, posiçãoY, jogadorAlvo) Efeito: Mostra uma imagem e retorna o seu ID junto. Argumentos:
Exemplo: Lua code 1 tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30) tfm.exec.removeImage(IdDaImagem) Efeito: Remove uma imagem. Argumentos:
Exemplo: Lua code 1 2 IdDaImagem = tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30)
¡Ahora los jugadores pueden usar las funciones tfm.exec.addImage y tfm.exec.removeImage! # Alojamiento de imágenes Las imágenes que rompan las Reglas del juego o que simplemente son inapropriadas en cualquier sentido no serán alojadas. Los miembros del Module Team pueden alojar imágenes, lo que significa que si te gustaría usar una imágen, las podés pedir en este hilo o pedirle a un miembro de forma privada. Recuerda que alojar imágenes no es nuestro trabajo, por lo que no todos los miembros estarán dispuestos a subir tus imágenes # Documentación tfm.exec.addImage(imágen, objetivo, posiciónX, posiciónY, jugador) Efecto: Muestra una imágen. Devuelve la ID de la imágen. Parámetros:
Ejemplo: Lua code 1 tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30) tfm.exec.removeImage(idDeImagen) Efecto: Elimina una imágen. Parámetros:
Ejemplo: Lua code 1 2 idDeImagen = tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30)
Ciao a tutti, abbiamo delle nuovissime notizie per voi! Ora i giocatori possono utilizzare le funzioni tfm.exec.addImage e tfm.exec.removeImage! # Codici Immagini (anche conosciuto come "Hosting delle Immagini") Le immagini che non sono conformi alle Regole del Gioco o che non sono pertinenti non verranno caricate. I membri del Module Team possono caricare immagini, ciò significa che se volessi usare un'immagine, puoi richiederla a loro in questa discussione o privatamente ad uno di loro. Ricorda che caricare le immagini non è il nostro dovere, quindi non tutti saranno disponibili nel caricare le tue immagini. # Documentazione tfm.exec.addImage(nomeImmagine, destinazione, Asse X, Asse Y,giocatore) Effetti: Mostra un'immagine. Restituisce l'ID dell'immagine. Parametri:
Esempi: Lua code 1 tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30) tfm.exec.removeImage(imageID) Effetto: Rimuove un'immagine. Parametri:
Esempio: Lua code 1 2 imageID = tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30)
Привет всем, вот новость которая вас заинтересует! Теперь игрокам доступны функции tfm.exec.addImage и tfm.exec.removeImage! # Image codes (хостинг изображений) Изображения которые нарушают правила игры или неуместные, не будут размещаться. Но размещать изображения смогут только Module Team, поэтому для того чтобы использовать ваши картинки, для начала придется попросить в этой теме или через личные сообщения о загрузке ког-нибудь из команды. Помните что размещение ваших картинок не является их обязаностью. # Документация tfm.exec.addImage(imageName, target, xPosition, yPosition,targetPlayer) Добавляет картинку, возвращает ID. Аргументы:
Пример: Lua code 1 tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30) tfm.exec.removeImage(imageID) Удаляет картинку по ее ID Аргументы:
Пример: Lua code 1 2 imageID = tfm.exec.addImage("1771d446c03.png", "%Tigrounette#0001", -21, -30)
Спасибо за перевод Smgxxx #0000! Last edit on 1611996240000 |
Bolodefchoco « Senator » 1616687580000
| 12 | ||
Changes (version 0.28) NEW:
Last edit on 1617410700000 |
Bolodefchoco « Senator » 1617411240000
| 11 | ||
Changes (version 0.28) NEW:
Last edit on 1621459860000 |
Bolodefchoco « Senator » 1621103820000
| 9 | ||
Changes (version 0.28) NEW:
Last edit on 1624758060000 |
Bolodefchoco « Senator » 1636041780000
| 9 | ||
Changes (version 0.28) NEW:
Changes (version 0.28) NEW:
Last edit on 1643407620000 |
Bolodefchoco « Senator » 1643318040000
| 6 | ||
Changes (version 0.28) NEW:
Last edit on 1643323560000 |
Bolodefchoco « Senator » 1647123960000
| 7 | ||
Changes (version 0.28) NEW:
FIX:
|