Jump to content
  • 0

Scripts UTF-8-BOM not working in Rathena sever


tathanngudong

Question


  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   3
  • Joined:  04/17/15
  • Last Seen:  

Previous versions of Rathena sever I can Script with Encode UTF-8-BOM (It helps me to get the Vietnamese in the game) ... But
Why with new Rathena sever i can make script for NPC with that Encode?
if who know how to fix it,please help...

http: //uL0hVT.png

My script Npc:

prontera,164,173,3	script	Refiner	826,{
mes "^3355FF[%100 Refiner]^000000";
mes "Ta là Gunderax,bậc thầy thợ rèn huyền thoại.Ta có thể cường hóa vũ khí đạt đến cực hạn của nó!";
mes " Muốn ta làm cho ư?Ha ha...ta muốn một cái giá xứng đáng với điều đó: 10 viên Kryptonite";
next;
mes "Thế mi có à? Tốt! Chọn trang bị mi muốn cường hóa đi!!";
mes "Chọn cẩn thận nhé! ";
mes "Ta đã làm thì 100% sẽ thành công!";
mes "Với kĩ thuật tuyệt đỉnh! Ta hoàn toàn tự tin về điều đó!!";
next;
menu "Upper Headgear",L0,"Middle Headgear",L1,"Lower Headgear",L2,"Armor",L3,"Left Hand",L4,"Right Hand",L5,"Garment",L6,"Shoes",L7,"Right Accesories",L8,"Left Accesories",L9,"Cancel",LEnd;

L0:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 256 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L1:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 512 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L2:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 1 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L3:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 16 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L4:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 32 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L5:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 2 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L6:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 4 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L7:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 64 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L8:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 128 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L9:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 8 +20";
announce "["+strcharinfo(0)+"], Thanks for using my great service :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

LEnd:
mes "[100% Refiner]";
mes "Đùa à? Không đủ mà còn đòi ta làm cho sao? haiz...";
close;

LNotEnough:
mes "[100% Refiner]";
mes "Đùa ta chắc?! Không có Kryptonite mà đòi ta rèn cho à? Biến đi!!";
close;
}

 

Edited by tathanngudong
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  7
  • Topics Per Day:  0.00
  • Content Count:  34
  • Reputation:   3
  • Joined:  04/13/15
  • Last Seen:  

On 1/20/2018 at 12:30 AM, tathanngudong said:

Previous versions of Rathena sever I can Script with Encode UTF-8-BOM (It helps me to get the Vietnamese in the game) ... But
Why with new Rathena sever i can make script for NPC with that Encode?
if who know how to fix it,please help...

http: //uL0hVT.png

My script Npc:


prontera,164,173,3	script	Refiner	826,{
mes "^3355FF[%100 Refiner]^000000";
mes "Ta là Gunderax,bậc thầy thợ rèn huyền thoại.Ta có thể cường hóa vũ khí đạt đến cực hạn của nó!";
mes " Muốn ta làm cho ư?Ha ha...ta muốn một cái giá xứng đáng với điều đó: 10 viên Kryptonite";
next;
mes "Thế mi có à? Tốt! Chọn trang bị mi muốn cường hóa đi!!";
mes "Chọn cẩn thận nhé! ";
mes "Ta đã làm thì 100% sẽ thành công!";
mes "Với kĩ thuật tuyệt đỉnh! Ta hoàn toàn tự tin về điều đó!!";
next;
menu "Upper Headgear",L0,"Middle Headgear",L1,"Lower Headgear",L2,"Armor",L3,"Left Hand",L4,"Right Hand",L5,"Garment",L6,"Shoes",L7,"Right Accesories",L8,"Left Accesories",L9,"Cancel",LEnd;

L0:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 256 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L1:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 512 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L2:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 1 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L3:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 16 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L4:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 32 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L5:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 2 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L6:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 4 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L7:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 64 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L8:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 128 +20";
announce "["+strcharinfo(0)+"], Xem đây,ta bắt đầu đấy :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

L9:
if(countitem(512) < 10 ) goto LNotEnough;
delitem 512,10;
atcommand "@refine 8 +20";
announce "["+strcharinfo(0)+"], Thanks for using my great service :)).",bc_self,0;
next;
mes "[100% Refiner]";
mes "Hô hô...Được quá chứ gì?! Lần sau cần cường hóa gì cứ tới tìm ta!!";
close;

LEnd:
mes "[100% Refiner]";
mes "Đùa à? Không đủ mà còn đòi ta làm cho sao? haiz...";
close;

LNotEnough:
mes "[100% Refiner]";
mes "Đùa ta chắc?! Không có Kryptonite mà đòi ta rèn cho à? Biến đi!!";
close;
}

 

 

Hello,

What you have to do is the following:

1.- Download the Notepad ++ program
2.- Open the TXT file with the program.
3.- Convert the file to UTF-8 only, without the BOM. I leave an illustrative image.

image.png.3a3c57bf6d775a2cf77b3bc5f92a9863.png

 

Save the changes of the TXT file and holy remedy.

 

 

 

 

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

you should upload the npc if you want faster help

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   3
  • Joined:  04/17/15
  • Last Seen:  

15 minutes ago, sader1992 said:

you should upload the npc if you want faster help

Sorry...i'll upload script!! 

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

use this please 111111.png.f194496bc38f9a461ba606c9529665f0.png and recopy the script from the txt file

or it would be better to upload the txt it self

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

perhaps you should use UTF-8 and not UTF-8-BOM ...

2WhTwJN.png

I am not sure if the text are valid since I cant read the language.

Edited by Emistry
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   3
  • Joined:  04/17/15
  • Last Seen:  

1 hour ago, Emistry said:

perhaps you should use UTF-8 and not UTF-8-BOM ...

2WhTwJN.png

I am not sure if the text are valid since I cant read the language.

please...tell me where i wrong? 
My ROext codepage: UTF-8

http://z125.jpg


I  change Encode UTF-8 but it's not working... 

z124.jpg

Edited by tathanngudong
Link to comment
Share on other sites

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

change your langtype for it to support any languages other than english.  langtype 11 or 13 should work i think

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   3
  • Joined:  04/17/15
  • Last Seen:  

1 hour ago, Emistry said:

change your langtype for it to support any languages other than english.  langtype 11 or 13 should work i think

it's still not working... :unsure: 

maybe your sever to old than me, i think...

Link to comment
Share on other sites

  • 0

  • Group:  Content Moderator
  • Topic Count:  55
  • Topics Per Day:  0.02
  • Content Count:  1678
  • Reputation:   703
  • Joined:  12/21/14
  • Last Seen:  

rAthena/src/map/npc.ccp

	if ((unsigned char)buffer[0] == 0xEF && (unsigned char)buffer[1] == 0xBB && (unsigned char)buffer[2] == 0xBF) {
		// UTF-8 BOM. This is most likely an error on the user's part, because:
		// - BOM is discouraged in UTF-8, and the only place where you see it is Notepad and such.
		// - It's unlikely that the user wants to use UTF-8 data here, since we don't really support it, nor does the client by default.
		// - If the user really wants to use UTF-8 (instead of latin1, EUC-KR, SJIS, etc), then they can still do it <without BOM>.
		// More info at http://unicode.org/faq/utf_bom.html#bom5 and http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
		ShowError("npc_parsesrcfile: Detected unsupported UTF-8 BOM in file '%s'. Stopping (please consider using another character set).\n", filepath);
		aFree(buffer);
		return 0;
	}

You could try to comment the Exception but I suggest not , Even tho it may now work

Edited by sader1992
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   3
  • Joined:  04/17/15
  • Last Seen:  

1 hour ago, sader1992 said:

rAthena/src/map/npc.ccp


	if ((unsigned char)buffer[0] == 0xEF && (unsigned char)buffer[1] == 0xBB && (unsigned char)buffer[2] == 0xBF) {
		// UTF-8 BOM. This is most likely an error on the user's part, because:
		// - BOM is discouraged in UTF-8, and the only place where you see it is Notepad and such.
		// - It's unlikely that the user wants to use UTF-8 data here, since we don't really support it, nor does the client by default.
		// - If the user really wants to use UTF-8 (instead of latin1, EUC-KR, SJIS, etc), then they can still do it <without BOM>.
		// More info at http://unicode.org/faq/utf_bom.html#bom5 and http://en.wikipedia.org/wiki/Byte_order_mark#UTF-8
		ShowError("npc_parsesrcfile: Detected unsupported UTF-8 BOM in file '%s'. Stopping (please consider using another character set).\n", filepath);
		aFree(buffer);
		return 0;
	}

You could try to comment the Exception but I suggest not , Even tho it may now work

I don't care about having to switch to utf-8.every i want is make npc talk vietnames when uses script "Mes"...  

i don't know where i wrong? :unsure: 

This is my ragexe add,i hope it can help something... 
 

8 Custom Window Title
9 Disable 1rag1 type parameters (Recommended)
12 Disable 4 Letter Password Limit
13 Disable Ragexe Filename Check (Recommended)
17 Enable Official Custom Fonts
18 Skip Service Selection Screen
24 Fix Camera Angles (Recommended)
28 Increase Headgear ViewID
32 Increase Zoom Out Max
33 Always Call SelectKoreaClientInfo() (Recommended)
34 Enable /showname (Recommended)
35 Read Data Folder First
36 Read msgstringtable.txt (Recommended)
37 Read questid2display.txt (Recommended)
38 Remove Gravity Ads (Recommended)
39 Remove Gravity Logo (Recommended)
40 Restore Login Window (Recommended)
41 Disable Nagle Algorithm (Recommended)
42 Skip Resurrection Button
44 Translate Client (Recommended)
45 Use Custom Aura Sprites
46 Use Normal Guild Brackets (Recommended)
47 Use Ragnarok Icon
48 Use Plain Text Descriptions (Recommended)
49 Enable Multiple GRFs (Recommended)
50 Skip License Screen
53 Use Ascii on All LangTypes (Recommended)
64 @ Bug Fix (Recommended)
65 Load Custom lua file instead of iteminfo*.lub (Recommended)
68 Enable 64k Hairstyle
71 Ignore Resource Errors
72 Ignore Missing Palette Error
73 Remove Hourly Announce (Recommended)
76 Enforce Official Login Background
77 Enable Custom 3D Bones
84 Remove Serial Display (Recommended)
85 Show Cancel To Service Select
86 Only First Login Background
90 Enable DNS Support (Recommended)
97 Cancel to Login Window (Recommended)
205 Enable Monster Tables
218 Show Exp Numbers
225 Show Register Button

 

Edited by tathanngudong
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  20
  • Topics Per Day:  0.01
  • Content Count:  64
  • Reputation:   3
  • Joined:  04/17/15
  • Last Seen:  

5 hours ago, calaluis said:

 

Hello,

What you have to do is the following:

1.- Download the Notepad ++ program
2.- Open the TXT file with the program.
3.- Convert the file to UTF-8 only, without the BOM. I leave an illustrative image.

image.png.3a3c57bf6d775a2cf77b3bc5f92a9863.png

 

Save the changes of the TXT file and holy remedy.

 

 

 

 

it's work!! thanks

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...