Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Aschi Telam Ludus AddOn System #
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Emoticon System
- # CREATED BY: Andrian FK
- # HELPED BY: Woratana
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Script ini bisa memunculkan emoticon yang ada di IconSet
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Cara Pemasangan:
- # -Taruh script ini dibawah Materials diatas Main Process
- # -Konfigurasi script ini agar bisa dipakai
- # -Buat IconSet sesuai konfigurasimu
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Logs:
- # 29/11/2014 - Started Developing this script
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # Configuration
- # (nb Agar mudah mencari indeks icon di IconSet, gunakan Woratana Icon Preview
- # Window, tersedia dibawah script ini :D
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- module Vocab
- Emoticons = ":v",":o","/sword",":D",":p",":s","/staff","/orbs"
- # Teks yang membuat emoticon muncul
- EmotIndex = 20,21,22,23,24,25,26,27
- # Indeks icon di IconSet
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- # End of Configuration
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
- class Window_Chat < Window_Base
- alias emot_refresh refresh
- def refresh
- emot_refresh
- last_text = $game_temp.chat_text[1]
- for i in Vocab::Emoticons
- if last_text.include?(i)
- @index = i
- @clone_text = last_text
- @size = @clone_text.size
- @emot_size = @index.size
- for i2 in 0..@size
- if @clone_text[i2,@emot_size]==@index
- @emot_loc = i2
- for i in 0..@index.size
- $game_temp.chat_text[1][i2,@emot_size]+=" "
- break
- end
- end
- $game_temp.chat_text[1].gsub!(/#{index}/,"")
- @icon_x = @emot_loc * Font.default_size
- @icon_y = y
- @emot_index = proc(i)
- self.contents.draw_icon(@emot_index,@icon_x,@icon_y)
- end
- end
- end
- def proc(index)
- for i in 0..Vocab::Emoticons.size
- if Vocab::Emoticons[i] == index
- return i
- end
- end
- end
- end
- #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement