肥羊修罗场_2.5 汉化笔记

网易官方对战平台的肥羊修罗场_2.5b已经将原有的save/load保存加载积分解锁英雄模式调整为开局输入-load识别你的地图等级来解锁相应等级的英雄。如下图:

我当前的平台等级为2
没有输入-load时漆黑之弓是锁定状态(不可选)
输入-load后就可以选择了

一、准备工作

endglobals
     native DzAPI_Map_HasMallItem takes player whichPlayer, string key returns boolean

二、英雄重复购买

function l1lIIII takes nothing returns nothing
call SetPlayerUnitAvailableBJ(GetUnitTypeId(GetSoldUnit()),false,GetEnumPlayer())
endfunction

把上面的false改成true后可以重复购买英雄


三、VIP英雄

function IlllI1I takes nothing returns boolean
if (DzAPI_Map_HasMallItem(GetTriggerPlayer(),"SPECARENA1") == true) then
return true
endif

四、积分系统→等级系统

 set l11I1I=CreateTrigger()
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(0),"-load ",false)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(1),"-load ",false)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(2),"-load ",false)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(3),"-load ",false)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(4),"-load ",false)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(5),"-load ",false)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(6),"-load ",false)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(7),"-load ",false)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(8),"-load ",false)
 call TriggerAddCondition(l11I1I,Condition(function l11IlII))
 call TriggerAddAction(l11I1I,function l11l1II)
function l11IlII takes nothing returns boolean
 if(not(SubStringBJ(GetEventPlayerChatString(),1,6)==GetEventPlayerChatStringMatched()))then
 return false
 endif
 if(not(StringLength(GetEventPlayerChatString())>6))then
 return false
 endif
 return true
 endfunction
function l11l1II takes nothing returns nothing
 set ll11l1=SubStringBJ(GetEventPlayerChatString(),7,StringLength(GetEventPlayerChatString()))
 set ll1Il1=Illl1lI(ll11l1)
 if(l11l11I())then
 set lIIIl1[GetConvertedPlayerId(GetTriggerPlayer())]=1
 set lIl111[GetConvertedPlayerId(GetTriggerPlayer())]=ll1I11[2]
 set l1III1[2]=200
 set l1III1[3]=450
 set l1III1[4]=750
 set l1III1[5]=1100
 set l1III1[6]=1450
 set l1III1[7]=2000
 set l1III1[8]=2500
 set l1III1[9]=3150
 set l1III1[10]=3500
 set l1III1[11]=4000
 set l1III1[12]=4700
 set l1III1[13]=5200
 set l1III1[14]=5750
 set l1III1[15]=6200
 set l1III1[16]=6750
 set l1III1[17]=7150
 set l1III1[18]=7700
 set l1III1[19]=8400
 set l1III1[20]=8800
 set l1III1[21]=9400
 set l1III1[22]=10000
 set l1III1[23]=12000
 set l1III1[24]=14000
 set l1III1[25]=18000
 set bj_forLoopAIndex=2
 set bj_forLoopAIndexEnd=25
 loop
 exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
 if(l11IllI())then
 set lIIIl1[GetConvertedPlayerId(GetTriggerPlayer())]=GetForLoopIndexA()
 else
 endif
 set bj_forLoopAIndex=bj_forLoopAIndex+1
 endloop
 set bj_forLoopAIndex=1
 set bj_forLoopAIndexEnd=lIIIl1[GetConvertedPlayerId(GetTriggerPlayer())]
 loop
 exitwhen bj_forLoopAIndex>bj_forLoopAIndexEnd
 call SetPlayerTechResearchedSwap(lIIl11[GetForLoopIndexA()],1,GetTriggerPlayer())
 set bj_forLoopAIndex=bj_forLoopAIndex+1
 endloop
 call DisplayTimedTextToForce(IlI111I(GetTriggerPlayer()),15.00,("你的积分 -"+(I2S((lIIII1[GetConvertedPlayerId(GetTriggerPlayer())]+lIl111[GetConvertedPlayerId(GetTriggerPlayer())]))+(" "+(("等级 - |cffd42424"+(I2S(lIIIl1[GetConvertedPlayerId(GetTriggerPlayer())])+(" |r 下一等级积分 - "+I2S(l1III1[(lIIIl1[GetConvertedPlayerId(GetTriggerPlayer())]+1)])))))))))
 else
 call DisplayTextToForce(IlI111I(GetTriggerPlayer()),"代码加载错误!")
 endif
 endfunction

增加变量和DZapi代码

integer udg_dzdtdj=0

endglobals
native DzAPI_Map_GetMapLevel takes player whichPlayer returns integer

保留原有触发事件

 call TriggerRegisterPlayerChatEvent(l11I1I,Player(0),"-load",true)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(1),"-load",true)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(2),"-load",true)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(3),"-load",true)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(4),"-load",true)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(5),"-load",true)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(6),"-load",true)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(7),"-load",true)
 call TriggerRegisterPlayerChatEvent(l11I1I,Player(8),"-load",true)
 call TriggerAddAction(l11I1I,function l11l1II)

删除对代码长度的判断:

function l11IlII takes nothing returns boolean
 if(not(SubStringBJ(GetEventPlayerChatString(),1,6)==GetEventPlayerChatStringMatched()))then
 return false
 endif
 if(not(StringLength(GetEventPlayerChatString())>6))then
 return false
 endif
 return true
 endfunction 

以下是错误的动作写法:

function l11l1II takes nothing returns nothing
     set udg_dzdtdj=DzAPI_Map_GetMapLevel(GetTriggerPlayer())
     if ( ( udg_dzdtdj == 1 ) ) then
         call DisplayTimedTextToPlayer(GetTriggerPlayer(), 0, 0, 10.00, "|cFFFF3333你的地图等级只有1级,只能选择初始的9个英雄!请尽快提升地图等级吧!|r")
     else
         if ( ( udg_dzdtdj == 2 ) ) then
             call AddPlayerTechResearched(GetTriggerPlayer(), 'R00B', 1)
         else
             if ( ( udg_dzdtdj == 3 ) ) then
                 call AddPlayerTechResearched(GetTriggerPlayer(), 'R00D', 1)
             else
                 if ( ( udg_dzdtdj == 4 ) ) then
                     call AddPlayerTechResearched(GetTriggerPlayer(), 'R00E', 1)
                 else
                     if ( ( udg_dzdtdj == 5 ) ) then
                         call AddPlayerTechResearched(GetTriggerPlayer(), 'R00F', 1)
                     else
                         if ( ( udg_dzdtdj == 6 ) ) then
                             call AddPlayerTechResearched(GetTriggerPlayer(), 'R00G', 1)
                         else
                             if ( ( udg_dzdtdj == 7 ) ) then
                                 call AddPlayerTechResearched(GetTriggerPlayer(), 'R00H', 1)
                             else
                                 if ( ( udg_dzdtdj == 8 ) ) then
                                     call AddPlayerTechResearched(GetTriggerPlayer(), 'R00I', 1)
                                 else
                                     if ( ( udg_dzdtdj == 9 ) ) then
                                         call AddPlayerTechResearched(GetTriggerPlayer(), 'R00J', 1)
                                     else
                                         if ( ( udg_dzdtdj == 10 ) ) then
                                             call AddPlayerTechResearched(GetTriggerPlayer(), 'R00K', 1)
                                         else
                                             if ( ( udg_dzdtdj == 11 ) ) then
                                                 call AddPlayerTechResearched(GetTriggerPlayer(), 'R00L', 1)
                                             else
                                                 if ( ( udg_dzdtdj == 12 ) ) then
                                                     call AddPlayerTechResearched(GetTriggerPlayer(), 'R00M', 1)
                                                 else
                                                     if ( ( udg_dzdtdj == 13 ) ) then
                                                         call AddPlayerTechResearched(GetTriggerPlayer(), 'R00N', 1)
                                                     else
                                                         if ( ( udg_dzdtdj == 14 ) ) then
                                                             call AddPlayerTechResearched(GetTriggerPlayer(), 'R00O', 1)
                                                         else
                                                             if ( ( udg_dzdtdj == 15 ) ) then
                                                                 call AddPlayerTechResearched(GetTriggerPlayer(), 'R00P', 1)
                                                             else
                                                                 if ( ( udg_dzdtdj == 16 ) ) then
                                                                     call AddPlayerTechResearched(GetTriggerPlayer(), 'R00Q', 1)
                                                                 else
                                                                     if ( ( udg_dzdtdj == 17 ) ) then
                                                                         call AddPlayerTechResearched(GetTriggerPlayer(), 'R00R', 1)
                                                                     else
                                                                         if ( ( udg_dzdtdj == 18 ) ) then
                                                                             call AddPlayerTechResearched(GetTriggerPlayer(), 'R00S', 1)
                                                                         else
                                                                             if ( ( udg_dzdtdj == 19 ) ) then
                                                                                 call AddPlayerTechResearched(GetTriggerPlayer(), 'R00T', 1)
                                                                             else
                                                                                 if ( ( udg_dzdtdj == 20 ) ) then
                                                                                     call AddPlayerTechResearched(GetTriggerPlayer(), 'R00U', 1)
                                                                                 else
                                                                                     if ( ( udg_dzdtdj == 21 ) ) then
                                                                                         call AddPlayerTechResearched(GetTriggerPlayer(), 'R00A', 1)
                                                                                     else
                                                                                         if ( ( udg_dzdtdj == 22 ) ) then
                                                                                             call AddPlayerTechResearched(GetTriggerPlayer(), 'R00V', 1)
                                                                                         else
                                                                                             if ( ( udg_dzdtdj == 23 ) ) then
                                                                                                 call AddPlayerTechResearched(GetTriggerPlayer(), 'R00W', 1)
                                                                                             else
                                                                                             endif
                                                                                         endif
                                                                                     endif
                                                                                 endif
                                                                             endif
                                                                         endif
                                                                     endif
                                                                 endif
                                                             endif
                                                         endif
                                                     endif
                                                 endif
                                             endif
                                         endif
                                     endif
                                 endif
                             endif
                         endif
                     endif
                 endif
             endif
         endif
     endif
 endfunction

上面的动作写法忽略了源代码中的一段循环,这段循环是给玩家设置N个科技。这样玩家才可以选择等级以下的英雄。所以,我们来尝试正确的写法!

先对地图等级做判断,如果地图等级=1,则直接显示游戏文本。否则用变量捕捉地图等级,再使用循环整数A进行循环,当循环整数A小于地图等级时,执行一次玩家科技动作。全部循环结束后,显示游戏提示文本。
function l11l1II takes nothing returns nothing
   if ((DzAPI_Map_GetMapLevel(GetTriggerPlayer()) == 1)) then
        call DisplayTimedTextToPlayer( GetTriggerPlayer(), 0, 0, 30, "|cffd42424地图等级1级,解锁英雄失败!|r" )
    else
        set udg_dzdtdj = DzAPI_Map_GetMapLevel(GetTriggerPlayer())
        set bj_forLoopAIndex = 2
        set bj_forLoopAIndexEnd = udg_dzdtdj
        loop
            exitwhen bj_forLoopAIndex > bj_forLoopAIndexEnd
            call SetPlayerTechResearchedSwap(lIIl11[GetForLoopIndexA()], 1, GetTriggerPlayer() )
            set bj_forLoopAIndex = bj_forLoopAIndex + 1
        endloop
        call DisplayTimedTextToPlayer( GetTriggerPlayer(), 0, 0, 30, "|cffd42424解锁英雄成功!|r" )
    endif
endfunction

2005.08.18 回忆の天空

把回忆留给天空,它是我的宝盒。­

从那以后,我不再怀念以前了。累了看看窗外的天,回忆在天空挥洒着最大的画笔,赐给我快乐。往后的天空多了几分色彩,白中带蓝,黄中带微红。天空似乎也显得快乐起来了。­

把回忆留给天空保存,这是我的选择!­

无论晴天还是阴天,她永远这么宁静,这么单纯,不为任何风霜雨雪所撼动。也许正是这片天空,才使我跟她同样的简单;也许正是这片天空,才使我对生命中的挫折有了新的见解;也许因为这片天空,才使我的回忆也有了一片天空。­

抬头仰望天穹,无边的天空中,白云悠悠,我的回忆在闪烁……­



不要去忘却,去回忆吧!任何回忆都是无罪的。之所以产生不同是因为你心。用客观的心看问题,你会发现一切都是矛盾而不矛盾的。

2005.08.18 守候冬季

那整整一冬季
我默默地守候
那份穿越时空的孤独
却不知它已尘封多久
但是我还是憧憬
寂寞无人的深夜
一个人躺在滨江的草坪上
一个人欣赏着浩淼的星空
一个人守候着寂寞的冬季
千年的思念
冬季的执着
我愿意守夜而歌
愿为你而歌

10年前的自评:
我发现自己写冬季的文字很多,也许冬天真的有很多回忆吧。
一个人躺在滨江的草坪上 
一个人欣赏着浩淼的星空 
感觉好孤独,我也希望和朋友一起啊。可是他们都面临升学压力啊,你愿意吗?

2015.08.18 她

她的出现无法带给我一丝惊喜
只是生命的细节里平添了一份无奈
你知道吗
她的触角里有那么多悲剧神经
她善于把泪水埋葬在笑容里
善于把脆弱埋葬在冷漠里
以至于我的豁达
无法靠近她的心
而现在呢
我却不知道她会流浪到何方
也不知道她将会在哪里徘徊
只知道在我贫瘠的心里
再也无法滋生爱的秧苗


这篇应该是原创的。具体创作时间不详。我遇见过的女孩中也许只有那两个是这样的。或许我只看到了她们冷的一面,因为我的心也是冰的。

2005.08.18 千年遗憾

在唐代
因错过了一年的桃花
而错过了一生的你
到宋代
隔不断你笑声的矮墙
却隔断了我们几世的缘份
在现在的一个夜晚
传来了你的报怨声
也有一颗水晶被摔碎
我有时孤单地站在原地
等待你的回应
却可望而不可及
我时常想象你远去的背影
你又是否知道
仅仅几次擦肩而过
已令我遗憾整整一千年


这篇文字半抄半写的。学习戴望舒的《雨巷》时,受了他朦胧恍惚的风格。

其实原篇不是这样的!后来请一位故人修改过。

其实那颗水晶我还留着。做个纪念也好。