Thetroz

Sistema de emotes random

Jan 5th, 2014
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.76 KB | None | 0 0
  1. funcion1 = {name="Sientate", numero="8", players={}};
  2. funcion2 = {name="Llora", numero="2", players={}};
  3.  
  4.         local funcion;
  5.         if #funcion1.players < #funcion2.players then
  6.                 funcion = funcion1;
  7.         elseif #funcion1.players > #funcion2.players then
  8.                 funcion = funcion2;
  9.         elseif math.random() < 0.5 then
  10.                 funcion = funcion1;
  11.         else
  12.                 funcion = funcion2;
  13.         end
  14.  
  15. function eventChatCommand(name, command)
  16.         if command == "mensaje" then
  17.     ui.addPopup (1,0,"<b>"..funcion.name.."</b> para tener meep", name, 200, 200, nil)
  18.         end
  19. end
  20.  
  21.  function eventEmotePlayed(name, emote)
  22.          if emote == funcion.numero then
  23.         tfm.exec.giveMeep(name)
  24.            end
  25.          end
Advertisement
Add Comment
Please, Sign In to add comment