Advertisement
Guest User

ATLAoS Emot System REVIVE 0.8

a guest
Dec 19th, 2014
192
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  2. # Aschi Telam Ludus AddOn System                                               #
  3. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  4. # Emoticon System
  5. # CREATED BY: Andrian FK
  6. # HELPED BY: Woratana
  7. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  8. # Script ini bisa memunculkan emoticon yang ada di IconSet
  9. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  10. # Cara Pemasangan:
  11. # -Taruh script ini dibawah Materials diatas Main Process
  12. # -Konfigurasi script ini agar bisa dipakai
  13. # -Buat IconSet sesuai konfigurasimu
  14. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  15. # Logs:
  16. # 29/11/2014 - Started Developing this script
  17. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  18. # Configuration
  19. # (nb Agar mudah mencari indeks icon di IconSet, gunakan Woratana  Icon Preview
  20. # Window, tersedia dibawah script ini :D
  21. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  22. module Vocab
  23.   Emoticons = ":v",":o","/sword",":D",":p",":s","/staff","/orbs"
  24.   # Teks yang membuat emoticon muncul
  25.   EmotIndex = 20,21,22,23,24,25,26,27
  26.   # Indeks icon di IconSet
  27. end
  28. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  29. # End of Configuration
  30. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
  31. class Window_Chat < Window_Base
  32.     alias emot_refresh refresh
  33.     def refresh
  34.         emot_refresh
  35.         last_text = $game_temp.chat_text[1]
  36.         for i in Vocab::Emoticons
  37.             if last_text.include?(i)
  38.                 @index = i
  39.                 @clone_text = last_text
  40.                 @size = @clone_text.size
  41.                 @emot_size = @index.size
  42.                 for i2 in 0..@size
  43.                     if @clone_text[i2,@emot_size]==@index
  44.                         @emot_loc = i2
  45.                         for i in 0..@index.size
  46.                             $game_temp.chat_text[1][i2,@emot_size]+=" "
  47.                             break
  48.                         end
  49.                     end
  50.                 $game_temp.chat_text[1].gsub!(/#{index}/,"")
  51.                 @icon_x = @emot_loc * Font.default_size
  52.                 @icon_y = y
  53.                 @emot_index = proc(i)
  54.                 self.contents.draw_icon(@emot_index,@icon_x,@icon_y)
  55.             end
  56.         end
  57.     end
  58.    
  59.     def proc(index)
  60.         for i in 0..Vocab::Emoticons.size
  61.             if Vocab::Emoticons[i] == index
  62.                 return i
  63.             end
  64.         end
  65.     end
  66. end
  67. #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement