Jump to content
Rpg²S Forum

BBCode Message


Astro86
 Share

Recommended Posts

BBCode Message

Descrizione

La script simula l'effetti del BBcode, scrivendo nel box messaggi ad esempio
[b]testo[/b]

il risultato sarà (
testo
) ecc.

 

Autore

berka (non ne sono sicuro al 100% pero)

 

Allegati

N\A

 

Istruzioni per l'uso

Inserire sotto
▼ Materials

ecco i BBcode che puoi usare:

[size=i]...[/size] letters size[color=#FFFFFF]...[/color] hexa color[color=black]...[/color] named color[list][*]...[*]...[/list] check list[list=1][*]...[*]...[/list] numbers list[u]...[/u] underscored[s]...[/s] strike == [strike]...[/strike][font=arial]...[/font] police[sup]...[/sup] exposant (sorry for french)[blur]...[/blur][img=img_name]

 

Script:

 

#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# Bbcode messages  v 0.6#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=# permet l'utilisation de certaines balises bbcode dans les messages de rmvx## [b]...[/b] gras == [strong]...[/strong]# [i]...[/i] italique# [o]...[/o] non ombré# [size=i]...[/size] taille des caractères# [color=#FFFFFF]...[/color] couleur hexadecimale# [color=black]...[/color] couleur nominale html# [list][*]...[*]...[/list] liste à puce# [list=1][*]...[*]...[/list] liste à chiffres# [list=a][*]...[*]...[/list] liste à lettre# [u]...[/u] souligné# [s]...[/s] barré == [strike]...[/strike]# [font=arial]...[/font] police# [sup]...[/sup] exposant# [shadow=#FFFFFF]...[/shadow] ombre portée# [shadow=black]...[/shadow] ombre portée# [blur]...[/blur] flou# [img=nom de l'image sans extention] insertion image (placée dans Graphics/system)# d'autres fonctions viendront;^)#=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=$KCODE="UTF8"module Berka  module Bbcode	Puce="● " #∆	Surligneur="#0000CD" #html	Blur_Opacite=125 #opacité [blur]	Ombre_Portee=[6,6] #[x,y] nbr de pixels de décalage	#couleurs html <> hexadecimales	HTML={:aliceblue=>"#F0F8FF",:aqua=>"#00FFFF",:aquamarine=>"#7FFFD4",:azure=>"#F0FFFF",:beige=>"#F5F5DC",:bisque=>"#FFE4C4",	:black=>"#000000",:blanchedalmond=>"#FFEBCD",:blue=>"#0000FF",:blueviolet=>"#8A2BE2",:brown=>"#A52A2A",:burlywood=>"#DEB887",	:cadetblue=>"#5F9EA0",:chartreuse=>"#7FFF00",:chocolate=>"#D2691E",:coral=>"#FF7F50",:cornflowerblue=>"#6495ED",:cornsilk=>"#FFF8DC",	:crimson=>"#DC143C",:cyan=>"#00FFFF",:darkblue=>"#00008B",:darkcyan=>"#008B8B",:darkgoldenrod=>"#B8860B",:darkgray=>"#A9A9A9",	:darkgreen=>"#006400",:darkkhaki=>"#BDB76B",:darkmagenta=>"#8B008B",:darkolivegreen=>"#556B2F",:darkorange=>"#FF8C00",	:darkorchid=>"#9932CC",:darkred=>"#8B0000",:darksalmon=>"#E9967A",:darkseagreen=>"#8FBC8F",:darkslateblue=>"#483D8B",	:darkslategray=>"#2F4F4F",:darkturquoise=>"#00CED1",:darkviolet=>"#9400D3",:deeppink=>"#FF1493",:deepskyblue=>"#00BFFF",	:dimgray=>"#696969",:dodgerblue=>"#1E90FF",:firebrick=>"#B22222",:floralwhite=>"#FFFAF0",:forestgreen=>"#228B22",:fuchsia=>"#FF00FF",	:gainsboro=>"#DCDCDC",:ghostwhite=>"#F8F8FF",:gold=>"#FFD700",:goldenrod=>"#DAA520",:gray=>"#808080",:green=>"#008000",	:greenyellow=>"#ADFF2F",:honeydew=>"#F0FFF0",:hotpink=>"#FF69B4",:indianred=>"#CD5C5C",:indigo=>"#4B0082",:ivory=>"#FFFFF0",	:khaki=>"#F0E68C",:lavender=>"#E6E6FA",:lavenderblush=>"#FFF0F5",:lawngreen=>"#7CFC00",:lemonchiffon=>"#FFFACD",:lightblue=>"#ADD8E6",	:lightcoral=>"#F08080",:lightcyan=>"#E0FFFF",:lightgoldenrodyellow=>"#FAFAD2",:lightgreen=>"#90EE90",:lightgrey=>"#D3D3D3",	:lightpink=>"#FFB6C1",:lightsalmon=>"#FFA07A",:lightseagreen=>"#20B2AA",:lightskyblue=>"#87CEFA",:lightslategray=>"#778899",	:lightsteelblue  =>"#B0C4DE",:lightyellow=>"#FFFFE0",:lime=>"#00FF00",:limegreen=>"#32CD32",:linen=>"#FAF0E6",:magenta=>"#FF00FF",	:maroon=>"#800000",:mediumaquamarine=>"#66CDAA",:mediumblue=>"#0000CD",:mediumorchid=>"#BA55D3",:mediumpurple=>"#9370DB",	:mediumseagreen=>"#3CB371",:mediumslateblue=>"#7B68EE",:mediumspringgreen=>"#00FA9A",:mediumturquoise=>"#48D1CC",	:mediumvioletred=>"#C71585",:midnightblue=>"#191970",:mintcream=>"#F5FFFA",:mistyrose=>"#FFE4E1",:moccasin=>"#FFE4B5",	:navajowhite=>"#FFDEAD",:navy=>"#000080",:oldlace=>"#FDF5E6",:olive=>"#808000",:olivedrab=>"#6B8E23",:orange=>"#FFA500",	:orangered=>"#FF4500",:orchid=>"#DA70D6",:palegoldenrod=>"#EEE8AA",:palegreen=>"#98FB98",:paleturquoise=>"#AFEEEE",	:palevioletred=>"#DB7093",:papayawhip=>"#FFEFD5",:peachpuff=>"#FFDAB9",:peru=>"#CD853F",:pink=>"#FFC0CB",:plum=>"#DDA0DD",	:powderblue=>"#B0E0E6",:purple=>"#800080",:red=>"#FF0000",:rosybrown=>"#BC8F8F",:royalblue=>"#4169E1",:saddlebrown=>"#8B4513",	:salmon=>"#FA8072",:sandybrown=>"#F4A460",:seagreen=>"#2E8B57",:seashell=>"#FFF5EE",:sienna=>"#A0522D",:silver=>"#C0C0C0",	:skyblue=>"#87CEEB",:slateblue=>"#6A5ACD",:slategray=>"#708090",:snow=>"#FFFAFA",:springgreen=>"#00FF7F",:steelblue=>"#4682B4",	:tan=>"#D2B48C",:teal=>"#008080",:thistle=>"#D8BFD8",:tomato=>"#FF6347",:turquoise=>"#40E0D0",:violet=>"#EE82EE",:wheat=>"#F5DEB3",	:white=>"#FFFFFF",:whitesmoke=>"#F5F5F5",:yellow=>"#FFFF00",:yellowgreen=>"#9ACD32"}	Alpha="abcdefghijklmnopqrstuvwxyz".scan(/./)  endendinclude Berka::Bbcodeclass Window_Message < Window_Selectable  alias berka_bbcode_convert convert_special_characters  def start_message	@text=""	for i in 0...$game_message.texts.size   @text+="	" if i >= $game_message.choice_start   @text+=$game_message.texts[i].clone	end	@item_max=$game_message.choice_max	convert_special_characters	reset_window	new_page  end  def convert_special_characters	berka_bbcode_convert	@a=0	@text.gsub!('[b]')	 {"xA1"}	@text.gsub!('[strong]')  {"xA1"}	@text.gsub!('[/b]')	  {"xA2"}	@text.gsub!('[/strong]')  {"xA2"}	@text.gsub!('[i]')	 {"xA3"}	@text.gsub!('[/i]')	  {"xA4"}	@text.gsub!('[o]')	 {"xA5"}	@text.gsub!('[/o]')	  {"xA6"}	@text.gsub!(/[size=(d+)]/)  {"xA7[#{$1}]"}	@text.gsub!('[/size]')	{"xA8"}	@text.gsub!(/[color=#([0-9A-Za-z]+?)]/x){"xA9[#{$1}]"}	@text.gsub!(/[color=([0-9A-Za-z]+?)]/x){"xA9[#{$1}]"}	@text.gsub!('[/color]')  {"xAA"}	@text.gsub!('[list]')	 { @a=nil;@t=nil;''}	@text.gsub!(/[list=(d+)]/)  { @a=0;@t=0;'' }	@text.gsub!(/[list=([A-Za-z]+)]/){ @a=0;@t=nil;'' }	@text.gsub!('[*]')	 {(@t.nil? ? (@a+=1;"x00	#{Alpha[@a-1]}-"):(@a+=1;"x00	#{@a+=1}-"))rescue "x00	"+Puce }	@text.gsub!('[/list]')	{ @a=nil;@t=nil;""}	@text.gsub!('[u]')	 {"xAB"}	@text.gsub!('[/u]')	  {"xAV"}	@text.gsub!('[s]')	 {"xAD"}	@text.gsub!('[strike]')  {"xAD"}	@text.gsub!('[/s]')	  {"xAE"}	@text.gsub!('[/strike]')  {"xAE"}	@text.gsub!(/[font=([A-Za-z]+)]/){ "xAF[#{$1}]"}	@text.gsub!('[/font]')	{"xB0"}	@text.gsub!('[sup]')	  {"xB1"}	@text.gsub!('[/sup]')	 {"xB2"}	@text.gsub!('[fluo]')	 {"xB3"}	@text.gsub!('[/fluo]')	{"xB4"}	@text.gsub!('[blur]')	 {"xB5"}	@text.gsub!('[/blur]')	{"xB6"}	@text.gsub!(/[shadow=#([0-9A-Za-z]+?)]/x){"xB7[#{$1}]"}	@text.gsub!(/[shadow=([0-9A-Za-z]+?)]/x){"xB7[#{$1}]"}	@text.gsub!('[/shadow]')  {"xB8"}	@text.gsub!('[img]')	  {"xB9"}  	@text.gsub!('[/img]')	 {"xBA"}  end  def update_message	loop {   c=@text.slice!(/./m)     case c   when nil	    finish_message	    break   when "x00"	    new_line  if @line_count >= MAX_LINE		unless @text.empty?  	  self.pause=true  	  break	end  end   when "x01";@text.sub!(/[([0-9]+)]/,"");contents.font.color=text_color($1.to_i);next   when "x02";@gold_window.refresh;@gold_window.open   when "x03";@wait_count=15;break   when "x04";@wait_count=60;break   when "x05";self.pause=true;break   when "x06";@line_show_fast=true   when "x07";@line_show_fast=false   when "x08";@pause_skip=true	   when "xA1";self.contents.font.bold=true   when "xA2";self.contents.font.bold=Font.default_bold     when "xA3";self.contents.font.italic=true   when "xA4";self.contents.font.italic=Font.default_italic   when "xA5";self.contents.font.shadow=false   when "xA6";self.contents.font.shadow=Font.default_shadow   when "xA7";@text.sub!(/[(d+)]/,'');self.contents.font.size=$1.to_i;next   when "xA8";self.contents.font.size=Font.default_size   when "xA9";@text.sub!(/[([0-9A-Za-z]+)]/ix,'');@bbcouleur=self.contents.font.color=hexa($1);next   when "xAA";self.contents.font.color=Font.default_color   when "xAB";@soul=true   when "xAC";@soul=false   when "xAD";@str=true   when "xAE";@str=false   when "xAF";@text.sub!(/[([A-Za-z]+)]/,"");self.contents.font.name=$1 if Font.exist?($1)   when "xB0";self.contents.font.name=Font.default_name     when "xB1";self.contents.font.size*=0.5   when "xB2";self.contents.font.size=Font.default_size   when "xB3";@fluo=true   when "xB4";@fluo=false     when "xB5";@flou=true   when "xB6";@flou=false	   when "xB7";@text.sub!(/[([0-9A-Za-z]+)]/,'');@ombre=$1   when "xB8";@ombre=nil   when "xB9";@text.sub!(/([0-9A-Za-z]+)/,'');@img=Cache.system($1)   when "xBA";   else  c_width=contents.text_size©.width  (contents.blt(@contents_x,@contents_y,@img,@img.rect);@contents_x+=@img.wid
th)if !@img.nil?  contents.fill_rect(@contents_x,@contents_y,c_width,self.contents.font.size,
hexa(Surligneur)) if @fluo    contents.ombre_portee(c,@contents_x,@contents_y,[6,6],@ombre)if !@ombre.nil?  contents.draw_text(@contents_x,@contents_y,40,self.contents.font.size,c)  contents.flou([@contents_x,@contents_y,c_width,self.contents.font.size])if @flou  contents.draw_text(@contents_x,@contents_y+1,c_width,self.contents.font.siz
e,"___") if @soul  contents.draw_text(@contents_x,@contents_y-self.contents.font.size/3,c_width,self.contents.font.size,"___") if @str  @contents_x+=c_width  @img=nil   end   break unless @show_fast||@line_show_fast}  end  def hexa(hex)	hex=HTML[hex.to_sym] if HTML.has_key?(hex.to_sym)   hex=hex.scan(/./)   (rgb=[hex[0]+hex[1],hex[2]+hex[3],hex[4]+hex[5]]) rescue (return normal_color)   return Color.new(rgb[0].to_i(16),rgb[1].to_i(16),rgb[2].to_i(16))  endendclass Bitmap  def ombre_portee(string,x,y,d,col)	a,b,m,n=false,false,d[0],d[1]	loop do   self.font.color=Color.new(hexa(col)[0],hexa(col)[1],hexa(col)[2],255-255*m/d[0])   draw_text(Rect.new(x-m,y+n,text_size(string).width,self.font.size),string)   m>0 ? m-=1 :a=true;n>0 ? n-=1 :b=true   break if a&&b	end  end  def flou(rect,of=2,opacite=Blur_Opacite,spac=1)	x,y,w,h=rect[0],rect[1],rect[2],rect[3]	dummy = self.dup	of.times{|i|   src_rects=[]   src_rects<<Rect.new(x+i*spac,y+i*spac,w,h)   src_rects<<Rect.new(x-i*spac,y+i*spac,w,h)   src_rects<<Rect.new(x+i*spac,y-i*spac,w,h)   src_rects<<Rect.new(x-i*spac,y-i*spac,w,h)   o=Integer(opacite*(of-i)/of)   src_rects.each{|src_rect|blt(x,y,dummy,src_rect,o)}}  end  def hexa(hex)	hex=HTML[hex.to_sym] if HTML.has_key?(hex.to_sym) rescue return	hex=hex.scan(/./)	(rgb=[hex[0]+hex[1],hex[2]+hex[3],hex[4]+hex[5]]) rescue (return normal_color)	return rgb[0].to_i(16),rgb[1].to_i(16),rgb[2].to_i(16)  endend

 

 

Bugs e Conflitti Noti

N\A
(se ne trovate avvisate... (a me non mi da nessun problema)

Screen

http://i74.servimg.com/u/f74/11/14/27/35/captur10.jpg

http://i74.servimg.com/u/f74/11/14/27/35/captur11.jpg

Altri Dettagli

Inserite qui il testo (questo non è obbligatorio)

Link to comment
Share on other sites

Buono come script, comodo soprattutto per chi è abituato al BBcode (troppi codici ° ° XD), bel lavoro ^ ^

(\_/)
(^ ^) <----coniglietto rosso, me!
(> <)


Il mio Tumblr dove seguire i miei progetti, i progetti della Reverie : : Project ^ ^

http://i.imgur.com/KdUDtQt.png disponibile su Google Play, qui i dettagli! ^ ^

http://i.imgur.com/FwnGMI3.png completo! Giocabile online, qui i dettagli! ^ ^

REVERIE : : RENDEZVOUS (In allenamento per apprendere le buone arti prima di cominciarlo per bene ^ ^) Trovate i dettagli qui insieme alla mia intervista (non utilizzerò più rpgmaker) ^ ^

 

SUWOnzB.jpg 🖤
http://www.rpg2s.net/dax_games/r2s_regali2s.png E:3 http://www.rpg2s.net/dax_games/xmas/gifnatale123.gif
http://i.imgur.com/FfvHCGG.png by Testament (notare dettaglio in basso a destra)! E:3
http://i.imgur.com/MpaUphY.jpg by Idriu E:3

Membro Onorario, Ambasciatore dei Coniglietti (Membro n.44)

http://i.imgur.com/PgUqHPm.png
Ufficiale
"Ad opera della sua onestà e del suo completo appoggio alla causa dei Panda, Guardian Of Irael viene ufficialmente considerato un Membro portante del Partito, e Ambasciatore del suo Popolo presso di noi"


http://i.imgur.com/TbRr4iS.png<- Grazie Testament E:3
Ricorda...se rivolgi il tuo sguardo ^ ^ a Guardian anche Guardian volge il suo sguardo ^ ^ a te ^ ^
http://i.imgur.com/u8UJ4Vm.gifby Flame ^ ^
http://i.imgur.com/VbggEKS.gifhttp://i.imgur.com/2tJmjFJ.gifhttp://projectste.altervista.org/Our_Hero_adotta/ado2.png
Grazie Testament XD Fan n°1 ufficiale di PQ! :D

Viva
il Rhaxen! <- Folletto te lo avevo detto (fa pure rima) che non
avevo programmi di grafica per fare un banner su questo pc XD (ora ho di
nuovo il mio PC veramente :D)

Rosso Guardiano della
http://i.imgur.com/Os5rvhx.png

Rpg2s RPG BY FORUM:

Nome: Darth Reveal

 

PV totali 2
PA totali 16

Descrizione: ragazzo dai lunghi capelli rossi ed occhi dello stesso colore. Indossa una elegante giacca rossa sopra ad una maglietta nera. Porta pantaloni rossi larghi, una cintura nera e degli stivali dello stesso colore. E' solito trasportare lo spadone dietro la schiena in un fodero apposito. Ha un pendente al collo e tiene ben legato un pezzo di stoffa (che gli sta particolarmente a cuore) intorno al braccio sinistro sotto la giacca, copre una cicatrice.
Bozze vesti non definitive qui.

Equipaggiamento:
Indossa:
60$ e 59$ divisi in due tasche interne
Levaitan

Spada a due mani elsa lunga

Guanti del Defender (2PA)
Anello del linguaggio animale (diventato del Richiamo)

Scrinieri da lanciere (2 PA)

Elmo del Leone (5 PA)

Corazza del Leone in Ferro Corrazzato (7 PA)

ZAINO (20) contenente:
Portamonete in pelle di cinghiale contenente: 100$
Scatola Sanitaria Sigillata (può contenere e tenere al sicuro fino a 4 oggetti curativi) (contiene Benda di pronto soccorso x3, Pozione di cura)
Corda
Bottiglia di idromele
Forma di formaggio
Torcia (serve ad illuminare, dura tre settori)

Fiasca di ceramica con Giglio Amaro (Dona +1PN e Velocità all'utilizzatore)
Ampolla Bianca

Semi di Balissa

 

CAVALLO NORMALE + SELLA (30 +2 armi) contentente:
66$
Benda di pronto soccorso x3
Spada a due mani

Fagotto per Adara (fazzoletto ricamato)


 

Link to comment
Share on other sites

  • 2 months later...

mi sà che lo hai copia-incollato male :S

 

Incollandolo su rpg maker (ma anche su un txt) continua a darmi vari errori di sintasse tra le righe 175/176... se invece lo si copia senza passare dal txt mi pare che incolli un simbolo del copyright al posto di una chiocciola mi pare :S

 

Insomma non riesco a farlo funzionare T__T

Link to comment
Share on other sites

Provato a farlo andare su un progetto nuovo,senza scripts?...è possibile che nel progetto dove tu l'abbia copiato vada in conflitto con altri scripts.

Targhette
http://www.rpg2s.net/awards/mostpolite2.jpghttp://www.rpg2s.net/awards/mostpresent1.jpghttp://i51.tinypic.com/2mfnpt2.png

 

 

http://www.rpg2s.net/dax_games/r2s_regali5.png

Link to comment
Share on other sites

sì in uno nuovo pare funzionare :)

 

p.s.

sapresti come mai quando faccio nuovo progetto il menu degli script appre pieno di ?????? e caratteri giapponesi?? eppure ho la versione inglese :|

 

risolto risolto... ho cancellato il progetto corrotto salvato quello attuale reinstallato tutto rimesso il progetto attuale e ora ok... mha vai a capire :S scusate l'ot.

Edited by Tony8970
Link to comment
Share on other sites

  • 1 month later...

A me quando dovrebbe uscire il testo(formattato) mi da questo errore:

Script 'BBcode' line 166 NoMethodError occurred.

 

undefined method 'text_size[simbolo copyright]' for #<Bitmap:0x1ace290>

 

 

Ps:io mi sono presentato un bel po di tempo fa,ma la mia presentazione non c'è più(penso sia stata cancellata per inattività)Mi devo ripresentare?

Scusate l'OT

 

http://i990.photobucket.com/albums/af29/Raito95/Tombi-Cammina_zpsdd282f41.gif
Link to comment
Share on other sites

ad una prima occhiata dire che ti da quell'errore perchè probabilmente al posto di

c_width=contents.text_size©.width

nella riga 166 ci doveva essere

c_width=contents.text_size[c].width

vedi un po se rimpiazzando ti funziona.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...