ShowMessage("һף $Rev: 100 $")


function _SMain(...)

	local nPrayCount = 0 

	--ףԼ
	local PlayerGUID = Player:GetGUID()
	DoPray(tostring(PlayerGUID) , 0)

	System:Sleep(500)

	--ף
	for iGroup = 1,4 do 
		local MaxFriendNum = DataPool:GetFriendOnlineNumber(iGroup)

		for index = 0 , MaxFriendNum - 1 do
			DbgPrintf("  %d/%d" , index,MaxFriendNum)
			--local sName = DataPool:GetFriend( iGroup , index , "NAME")
			--DbgPrintf("%d,%d = %s" , iGroup , index , tostring(sName))
			local nFlag = DataPool:GetFriend( iGroup , index , "SNS_Icon")
			--if nFlag == 1 then
				local FriendID = DataPool:GetFriend( iGroup , index , "ID")
				DoPray(tostring(FriendID) , 1)
				nPrayCount = nPrayCount + 1 
				System:Sleep(500)
			--end
		end
	end

	System:Sleep(2000)

	ShowMessage("ܹ %d ߺף" , tonumber(nPrayCount))

	if UI:IsWindowShow("Sns") then
		UI:WindowHide("Sns")
	end

	DoLuaString("SnsGame_Env" , "SnsGame_Bound_Button_Clicked()" )
end

_SMain()