KO API UO Info - LIHACHTETAN/ClassicUO-Bad-Newbie-CSharp-Scripts-IDE GitHub Wiki
ะฃะบัะฐัะฝััะบะฐ ยท ะ ัััะบะธะน ยท English ยท Deutsch ยท Franรงais ยท Italiano ยท Espaรฑol ยท ็น้ซไธญๆ ยท ๆฅๆฌ่ช ยท ํ๊ตญ์ด
UO.Info
C# ์๊ทธ๋์ฒ
string UO.Info();
string UO.Info(object? serial);
string UO.Info(object? type, object? x = null, object? y = null);
string UO.Info(object? type, object? x, object? y, object? z);
๋์ ๋ฐ ๋ฐํ๊ฐ
ํธ์ถ ์์น๊ฐ ํ์ ๋ฐฉ์์ ๊ฒฐ์ ํฉ๋๋ค. ๊ฒ์์ ๊ทธ๋ํฝ ์ฑํ ๋ช ๋ น์ ํ๋, ๊ฐ, Ctrl+C์ ์คํฌ๋กค์ด ์๋ ํ๋ฅผ ์ฝ๋๋ค. ์ผ๋ฐ C# ์คํฌ๋ฆฝํธ๋ ๊ฒ์ ์ฐฝ์ด ์ด๋ ค ์์ด๋ ์ฐฝ์ด๋ ํ๊น ์์ด ๋ณด๊ณ ์ ๋ฌธ์์ด๋ง ๋ฐ์ต๋๋ค. ํด๋ผ์ด์ธํธ๊ฐ ์๊ณ ์๋ ๋ฐ์ดํฐ๋ง ์ฌ์ฉํ ์ ์์ต๋๋ค.
๊ทธ๋ํฝ ์ฑํ ์์ ์ธ์ ์๋ Info์ InfoTile์ ํ๊น์ ์์ํฉ๋๋ค. ์คํฌ๋ฆฝํธ์ Info()๋ ๋ง์ง๋ง ๋ฌผ์ฒด ํ๊น ๋๋ ํ๋ ์ด์ด๋ฅผ, InfoTile()์ ๋ฐ๋ฐ ์งํ์ ์ฝ์ต๋๋ค. serial, type, ์ขํ๋ก ๋์์ ์ง์ ํฉ๋๋ค. InfoTile(x,y,map)์ ์ธ ๋ฒ์งธ ์ธ์๋ ๋งต ๋ฒํธ์ ๋๋ค.
๋งค๊ฐ๋ณ์
serialโ ๊ฐ์ฒด ์๋ฆฌ์ผ ๋ฒํธ ๋๋ ์ ์ฅ๋ ๋ณ์นญ.typeโ ์์ดํ ๊ทธ๋ํฝ ID. -1์ ์ง์ ์์น์ ๋ชจ๋ ์ข ๋ฅ์ ์ผ์น.xโ ์๋ X ์ขํ.yโ ์๋ Y ์ขํ.zโ Z ๋์ด. ์งง์ ํ์์ 0 ์ฌ์ฉ.
UO.Info(type: 0x0EED)๋ ๋์ ์ปค์ ์์ด ํด๋น ์ ํ์ ๊ฐ์ฅ ๊ฐ๊น์ด ๋ก๋๋ ๊ฐ์ฒด๋ฅผ ์ฝ์ต๋๋ค. ์ปจํ
์ด๋ ์์ ํญ๋ชฉ์ ์ต์์ ์์ ์์ ์์น๋ก ๊ฑฐ๋ฆฌ๋ฅผ ๊ณ์ฐํ๋ฉฐ, ๊ฑฐ๋ฆฌ๊ฐ ๊ฐ์ผ๋ฉด serial๋ก ๊ฒฐ์ ํฉ๋๋ค. ํด๋ผ์ด์ธํธ๊ฐ ๋ชจ๋ฅด๋ ์๋ฒ ๊ฐ์ฒด๋ฅผ ๋ก๋ํ์ง ์์ต๋๋ค. UO.Info(serial)์ ์ฌ์ ํ type์ด ์๋ serial์ ๋ปํฉ๋๋ค. ์ขํ๋ x์ y๋ฅผ ํจ๊ป ์ง์ ํด์ผ ํฉ๋๋ค. ํ๋๋ง ์ง์ ํ๋ฉด ์ค๋ฅ ์ค๋ช
์ ๋ฐํํ๋ฉฐ ๋์ ์ปค์๋ ์ด๋ฆฌ์ง ์์ต๋๋ค. ์ฑํ
ํ์ #info type 0x0EED๋ ๊ฐ์ ์ต๊ทผ์ ๊ฒ์์ ์ฌ์ฉํฉ๋๋ค.
์ฑํ ๋ช ๋ น
#info
#UO.Info id 0x40001234
#info type 0x0EED
#info xy 1450 1690
#info type 0x0EED xy 1450 1690 0
์์ ํ C# ์์
๊ฐ ์ฝ๋ ๋ธ๋ก์ ์์ ํ ๋ ๋ฆฝ .csx์ ๋๋ค. ์์ serial, type๊ณผ ์ขํ๋ฅผ ๋ฐ๊พธ์ธ์. ์ธ์ ์์์ C# ๋ช ๋ช ๋ ์ธ์๋ ์๊ทธ๋์ฒ๋ฅผ ๋ฐ๋ฆ ๋๋ค.
1
string report = UO.Info(0x40001234);
UO.Print(report);
2
string InspectSelf() => UO.Info("self");
UO.Print(InspectSelf());
3
foreach (int serial in new[] { 0x40001234, 0x40005678 })
{
string report = UO.Info(serial);
UO.Print(report);
}
4
new CommandSample().Execute(UO);
sealed class CommandSample
{
public void Execute(global::ClassicUO.CSharp.CSharpGameApi api)
{
string report = api.Info(0x40001234);
api.Print(report);
}
}
๋ด๋ถ ํธ์ถ
CSharpGameApi.Info
-> CSharpScriptGlobals
-> InjectionScript.Runtime.InjectionApiUO.Info
ClassicUOInjectionApiBridge -> YokoInfoReport -> YokoInfoGump
ushort goldType = 0x0EED;
string report = UO.Info(type: goldType);
UO.Print(report);
int playerX = UO.GetX();
int playerY = UO.GetY();
int playerZ = UO.GetZ();
string report = UO.Info(type: 0x0EED, x: playerX, y: playerY, z: playerZ);
UO.Print(report);