SHARE
TWEET

Untitled

a guest Jun 19th, 2019 53 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  
  2.  
  3. const SFUNCTION_SEND_CHAT = 0
  4.  
  5. #define CHAT_INTERFACE 'chat'
  6. #define INTERFACE_OUTPUT 'main_output'
  7.  
  8. World
  9.     gameWidth = 1024
  10.     gameHeight = 640
  11.     playerMode = 3
  12.     gameVersion = 'Version 0.0.0'
  13.  
  14.  
  15. Interface
  16.     chat
  17.         main_input
  18.             interfaceType = 'CommandInput'
  19.             width = 400
  20.             height = 20
  21.             color = '#777'
  22.  
  23.         main_output
  24.             interfaceType = 'WebBox'
  25.             width = 400
  26.             height = 300
  27.             color = '#777'
  28.  
  29. Client
  30.     onConnect()
  31.         this.name = this.getAccountName()
  32.         this.showInterface(CHAT_INTERFACE)
  33.         World.log('Client ' + this.name + ' has joined the server.')
  34.  
  35.  
  36. #BEGIN CLIENTCODE
  37.  
  38. Interface
  39.     chat
  40.         main_input
  41.             onExecute(user_client)
  42.                 if(!this.text)
  43.                     return
  44.                 user_client.sendPacket(SFUNCTION_SEND_CHAT, [user_client.id, this.text, CHAT_INTERFACE, INTERFACE_OUTPUT])
  45.                 user_client.setFocus()
  46.                 this.text = ''
  47.  
  48. #END CLIENTCODE
  49.  
  50.  
  51. #BEGIN SERVERCODE
  52.  
  53. Client
  54.     onConnect()
  55.         alert(1)
  56.  
  57. var network_manager = new Object('network_manager')
  58.  
  59. network_manager
  60.     var s_functions = ['s_send_chat']
  61.  
  62.     onNew()
  63.         World.log('network_manager created!')
  64.  
  65.     function s_send_chat(args_list)
  66.  
  67. Client
  68.     onPacket(packet_id, args_list)
  69.         World.log(network_manager.s_functions[packet_id] + '() called for ' + this.name + ' on the server!')
  70.         //network_manager[network_manager.s_functions[packet_id]](args_list)
  71.  
  72. #END SERVERCODE
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top