作者hmml (hmml)
看板mud_sanc
標題[心得] MushClient 掛角色圖檔
時間Sat Sep 14 14:55:06 2013
掛角色圖檔,純粹自己看的。感覺上也不錯。結果像這樣
http://ppt.cc/EO4y
--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--
<aliases>
<alias
match="^shoimg(
0*)$"
enabled="y"
echo_alias="y"
regexp="y"
send_to="12"
keep_evaluating="y"
sequence="100"
>
<send>
--設定迷你視窗ID到imgchar
imgchar = 'img'..GetAlphaOption("name")
--建立角色圖的迷你視窗
WindowCreate (imgchar
, --迷你視窗ID
739
, 23
, 204
, 303
, --位置,左,上,寬,高。
6
, --因下個參數的設定,無效。
3
, --以座標值為位置設定,並置於最底。
ColourNameToRGB("black"
)) --視窗底色。
--圖檔路徑,設定上同角色檔案同目錄。
imgpatch =
GetInfo (67
)
--載入圖檔,套上 Note 和 ErrorDesc,方便除錯。
--顯示 執行結果 載入圖檔
Note (ErrorDesc(WindowLoadImage (imgchar, --迷你視窗名稱
"im"
, --物件ID
imgpatch..
string.lower(GetAlphaOption("player"
))..".bmp"
))) --圖檔目錄
--目錄 ..轉換小寫 抓取角色名 ..副檔名
-嵌入圖片
--顯示 執行結果 載入圖檔
Note (ErrorDesc(WindowImageOp (imgchar, --迷你視窗名稱
miniwin.image_fill_rectangle
, --矩形
4
, 4
, 200
, 400
, --位置,左,上,右,下。
ColourNameToRGB("lime"
), --外框線條顏色
miniwin.pen_null
, --外框線條常數:無框
1
, --外框線條粗細
ColourNameToRGB("cyan"
), --底色
"im"
, --圖檔ID
20
, 20
))) --圓角矩形才有用。
--用來顯示或隱藏圖片
if tonumber('
%1') == 0 then
WindowShow (imgchar, false)
else
WindowShow (imgchar, true)
end --if
</send>
</alias>
</aliases>
<script>
<![CDATA[
--偵測Plugin Reinstall,只要plugin被載入就執行以下內容。
function OnPluginInstall ()
ReWorld =
GetWorld(GetAlphaOption("player"
)) --載入角色名
ReWorld:
Execute('shoimg'
) --執行別名shoing。
end -- function
]]>
</script>
--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--==-==--
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.132.196.45