找回密码
 点一下
查看: 1563|回复: 12

用jasscraft扫了一遍 没问题啊 是不是本地玩家用的不对?

[复制链接]
发表于 2009-5-26 16:39:52 | 显示全部楼层 |阅读模式
RT

[jass]function 07A takes nothing returns nothing
local integer h
local integer i
set h = 1
loop
if ( GetBooleanAnd( ConvertedPlayer(h) == GetLocalPlayer() , h <= 5 ) ) then
set i = 1
loop
call MultiboardSetItemValue( ABC_MBI_STRIKE,I2S(ABC_MBV_STRIKE) )
set ABC_MBV_GOLD = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_GOLD)
call MultiboardSetItemValue( ABC_MBI_GOLD,I2S(ABC_MBV_GOLD) )
set ABC_MBV_LUMBER = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_LUMBER)
call MultiboardSetItemValue( ABC_MBI_LUMBER,I2S(ABC_MBV_LUMBER) )
set ABC_MBV_FOOD_USED = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_FOOD_USED)
set ABC_MBV_FOOD = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_FOOD_CAP_CEILING)
call MultiboardSetItemValue( ABC_MBI_FOOD,I2S(ABC_MBV_FOOD_USED)+"/"+I2S(ABC_MBV_FOOD) )
set i = i + 1
exitwhen i > 5
endloop
endif
if ( GetBooleanAnd( ConvertedPlayer(h) == GetLocalPlayer() , h >= 7 ) ) then
set i = 7
loop
call MultiboardSetItemValue( ABC_MBI_STRIKE[(i - 6)],I2S(ABC_MBV_STRIKE) )
set ABC_MBV_GOLD = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_GOLD)
call MultiboardSetItemValue( ABC_MBI_GOLD[(i - 6)],I2S(ABC_MBV_GOLD) )
set ABC_MBV_LUMBER = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_LUMBER)
call MultiboardSetItemValue( ABC_MBI_LUMBER[(i - 6)],I2S(ABC_MBV_LUMBER) )
set ABC_MBV_FOOD_USED = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_FOOD_USED)
set ABC_MBV_FOOD = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_FOOD_CAP_CEILING)
call MultiboardSetItemValue( ABC_MBI_FOOD[(i - 6)],I2S(ABC_MBV_FOOD_USED)+"/"+I2S(ABC_MBV_FOOD) )
set i = i + 1
exitwhen i > 11
endloop
endif
set h = h + 1
exitwhen h >= 11
endloop
endfunction[/jass]
 楼主| 发表于 2009-5-26 16:44:04 | 显示全部楼层
模仿的这个帖子 http://www.wow8.org/bbs/thread-92542-1-1.html
而且是改一张加密图...
回复

使用道具 举报

发表于 2009-5-26 16:44:45 | 显示全部楼层
非常不对,全局变量不能异步
回复

使用道具 举报

 楼主| 发表于 2009-5-26 16:47:48 | 显示全部楼层
对不起~~~ 不是这里的问题 变量申明那里有个笔误... 没事了
回复

使用道具 举报

 楼主| 发表于 2009-5-26 16:54:26 | 显示全部楼层

回 2楼(lunaflywar) 的帖子

[jass]function Trig____________________002_Conditions takes nothing returns boolean
    if ( not ( udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())] == null ) ) then
        return false
    endif
    return true
endfunction

function Trig____________________002_Func004C takes nothing returns boolean
    if ( not ( GetTriggerPlayer() == GetLocalPlayer() ) ) then
        return false
    endif
    return true
endfunction

function Trig____________________002_Actions takes nothing returns nothing
    call SetUnitOwner( GetTriggerUnit(), GetTriggerPlayer(), true )
    set udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())] = GetTriggerUnit()
    if ( Trig____________________002_Func004C() ) then
        call MultiboardSetItemValue( udg_boardproject[1], GetUnitName(udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())]) )
        call MultiboardSetItemValue( udg_boardproject[2], I2S(GetHeroLevel(udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())])) )
        call MultiboardSetItemValue( udg_boardproject[3], I2S(GetHeroStr(udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())], true)) )
        call MultiboardSetItemValue( udg_boardproject[4], I2S(GetHeroAgi(udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())], true)) )
        call MultiboardSetItemValue( udg_boardproject[5], I2S(GetHeroInt(udg_Hero[GetConvertedPlayerId(GetTriggerPlayer())], true)) )
    else
    endif
endfunction[/jass]
这个是wow8那个帖子里的演示部分... (马甲君那个转换器下不来 又不能截图 所以... 凑合着看吧)
回复

使用道具 举报

发表于 2009-5-26 17:27:28 | 显示全部楼层
地下室的代码中明显没有对全局变量赋值,而你的代码对全局变量(ABC打头的)赋值了
回复

使用道具 举报

 楼主| 发表于 2009-5-26 17:59:12 | 显示全部楼层
嗯 确实不行 那要怎么写啊 我对地下室那个东西还不太理解

这样用本地玩家算是利用bug吗?


本地玩家照这么用的时候是什么原理呀?
回复

使用道具 举报

 楼主| 发表于 2009-5-26 18:00:49 | 显示全部楼层
明天再说了... 把赋值那部分摘出来重做太麻烦了
回复

使用道具 举报

发表于 2009-5-26 18:31:22 | 显示全部楼层
对不起,GA不讨论改图相关的内容
回复

使用道具 举报

 楼主| 发表于 2009-5-26 18:33:34 | 显示全部楼层
LS误会了... 只是加个多面板自己玩而已.
回复

使用道具 举报

发表于 2009-5-26 18:48:37 | 显示全部楼层
set ABC_MBV_GOLD[i ] = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_GOLD)
明显是在给全局变量赋值
localplayer不支持除了用户交互性界面之外的其他任何改动
回复

使用道具 举报

 楼主| 发表于 2009-5-26 19:16:18 | 显示全部楼层
[jass]function ABC_07_A2 takes nothing returns nothing
local integer i =1
loop
exitwhen i > 12
set ABC_MBV_GOLD = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_GOLD)
set ABC_MBV_LUMBER = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_LUMBER)
set ABC_MBV_FOOD_USED = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_FOOD_USED)
set ABC_MBV_FOOD = GetPlayerState(ConvertedPlayer(i), PLAYER_STATE_RESOURCE_FOOD_CAP)
set i = i + 1
endloop
endfunction


function ABC_07_A3 takes multiboard mb,integer x,integer y,string str returns nothing
local multiboarditem mbi = null
set mbi=MultiboardGetItem(mb,x,y)
call MultiboardSetItemValue(mbi,str)
call MultiboardReleaseItem(mbi)
endfunction


function ABC_07_A takes nothing returns nothing
local integer h
local integer i

set h = 1
loop
if ( GetBooleanAnd( (ConvertedPlayer(h) == GetLocalPlayer()) , h <= 5 ) ) then

call ABC_07_A3(bj_lastCreatedMultiboard,1,6,("|cFFff0000"+GetPlayerName(ConvertedPlayer(1))+"|r"))
call ABC_07_A3(bj_lastCreatedMultiboard,1,7,("|cFF0000ff"+GetPlayerName(ConvertedPlayer(2))+"|r"))
call ABC_07_A3(bj_lastCreatedMultiboard,1,8,("|cFF00ffff"+GetPlayerName(ConvertedPlayer(3))+"|r"))
call ABC_07_A3(bj_lastCreatedMultiboard,1,9,("|cFF800080"+GetPlayerName(ConvertedPlayer(4))+"|r"))
call ABC_07_A3(bj_lastCreatedMultiboard,1,10,("|cFFffff00"+GetPlayerName(ConvertedPlayer(5))+"|r"))

set i = 1
loop
call ABC_07_A3(bj_lastCreatedMultiboard,2,(i+5),I2S(ABC_MBV_STRIKE) )
call ABC_07_A3(bj_lastCreatedMultiboard,3,(i+5),I2S(ABC_MBV_GOLD) )
call ABC_07_A3(bj_lastCreatedMultiboard,4,(i+5),I2S(ABC_MBV_LUMBER) )
call ABC_07_A3(bj_lastCreatedMultiboard,5,(i+5),I2S(ABC_MBV_FOOD_USED)+"/"+I2S(ABC_MBV_FOOD) )
set i = i + 1
exitwhen i > 5
endloop

endif
if ( GetBooleanAnd( (ConvertedPlayer(h) == GetLocalPlayer()) , h >= 7 ) ) then
call ABC_07_A3(bj_lastCreatedMultiboard,1,6,("|cFF00ff00"+GetPlayerName(ConvertedPlayer(7))+"|r"))
call ABC_07_A3(bj_lastCreatedMultiboard,1,7,("|cFFff80ff"+GetPlayerName(ConvertedPlayer(8))+"|r"))
call ABC_07_A3(bj_lastCreatedMultiboard,1,8,("|cFF808080"+GetPlayerName(ConvertedPlayer(9))+"|r"))
call ABC_07_A3(bj_lastCreatedMultiboard,1,9,("|cFF80ffff"+GetPlayerName(ConvertedPlayer(10))+"|r"))
call ABC_07_A3(bj_lastCreatedMultiboard,1,10,("|cFF800000"+GetPlayerName(ConvertedPlayer(11))+"|r"))
set i = 7
loop
call ABC_07_A3(bj_lastCreatedMultiboard,2,i-1,I2S(ABC_MBV_STRIKE) )
call ABC_07_A3(bj_lastCreatedMultiboard,3,i-1,I2S(ABC_MBV_GOLD) )
call ABC_07_A3(bj_lastCreatedMultiboard,4,i-1,I2S(ABC_MBV_LUMBER) )
call ABC_07_A3(bj_lastCreatedMultiboard,5,i-1,I2S(ABC_MBV_FOOD_USED)+"/"+I2S(ABC_MBV_FOOD) )
set i = i + 1
exitwhen i > 11
endloop

endif
set h = h + 1
exitwhen h >= 11
endloop

call MultiboardDisplay(bj_lastCreatedMultiboard,true)
call TriggerSleepAction(1.00)
call ABC_07_A2()
endfunction[/jass]
回复

使用道具 举报

发表于 2009-5-26 19:23:48 | 显示全部楼层
不论出于什么目的,GA都不讨论改图唉唉

解决的话把分类改了吧
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 点一下

本版积分规则

Archiver|移动端|小黑屋|地精研究院

GMT+8, 2024-7-21 22:26 , Processed in 0.029460 second(s), 18 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表