Posted on 2005-05-17 08:50
Kim Zhang 閱讀(303)
評論(2) 編輯 收藏
幾天來沉浸在WOW中,滿心歡喜,查資料的時候,發現原來WOW還支持自己寫插件,呼呼,于是樂趣就從玩游戲變成的自定義界面。
大腳、WOWSHELL等都用過,可是總覺得有點美中不足,我不要那么多東東,我只想要……
于是,就想自己寫點兒東東,當然了,最快的方法是——COPY,于是就看看LUA,看看別人寫的東東,畢竟,其實我是一個程序員,

,于是……
在這個過程中就發現了一點東東,下面就是我找到的國內的代碼
function?Oo0o0o0j()?end?function?Oo0o0o0Zu(Oo0o0o0Rd)?if(Oo0o0o0Rd?==?"1")?then?if(not?Oo0o0o0yi)?then?Oo0o0o0yi?=?UseAction?UseAction?=?Oo0o0o0vq?end?else?if(Oo0o0o0yi)?then?UseAction?=?Oo0o0o0yi?Oo0o0o0yi?=?nil?end?end?end?function?Oo0o0o0vq(Oo0o0o0om,?check,?onSelf)?if(IsAltKeyDown())?then?local?Oo0o0o0Bm?if(Oo0o0o0om)?then?getglobal("wsGameTooltip"):SetAction(Oo0o0o0om)?Oo0o0o0Bm
在這個界面上,還可以看到是O(歐)+o(歐)+0(零)+o(歐)+0(零)+o(歐)+0(零),在記事本上就完全是0o0o0o0了。
再看大名鼎鼎的FlexBar的代碼。
function?FlexBarButton_OnUpdate(elapsed,?button)
--?Blizzard?code
????if?(?FlexBarButton_IsFlashing(button)?)?then
????????button.flashtime?=?button.flashtime?-?elapsed;
????????if?(?button.flashtime?<=?0?)?then
????????????local?overtime?=?-button.flashtime;
????????????if?(?overtime?>=?ATTACK_BUTTON_FLASH_TIME?)?then
????????????????overtime?=?0;
????????????end
????????????button.flashtime?=?ATTACK_BUTTON_FLASH_TIME?-?overtime;
????????????local?flashTexture?=?getglobal(button:GetName().."Flash");
????????????if?(?flashTexture:IsVisible()?)?then
????????????????flashTexture:Hide();
????????????else
????????????????flashTexture:Show();
????????????end
????????end
????end
????--?Handle?range?indicator
????if?(?button.rangeTimer?)?then
????????if?(?button.rangeTimer?<?0?)?then
????????????FlexBarButton_UpdateUsable(button);
????????????button.rangeTimer?=?TOOLTIP_UPDATE_TIME;
????????else
????????????button.rangeTimer?=?button.rangeTimer?-?elapsed;
????????end
????end
????if?(?not?button.updateTooltip?)?then
????????return;
????end
????button.updateTooltip?=?button.updateTooltip?-?elapsed;
????if?(?button.updateTooltip?>?0?)?then
????????return;
????end
????if?(?GameTooltip:IsOwned(button)?)?then
????????FlexBarButton_SetTooltip(button);
????else
????????button.updateTooltip?=?nil;
????end
end
這算是文化差異嗎?
這樣做的目的是什么?保密?在記事本中拷貝Oo0o0o0(即使看起來是0o0o0o0也無所謂,反正是鼠標選擇),替換成“”即可,稍稍了解一下Lua,排一下版,還保啥子秘呀!
?曾經這樣想過,如果國人的代碼,能寫成清晰的樣子,是否可以是國人的軟件水平提升呢?(個人瞎想)。
小子亂彈琴,放肆了。